diff --git a/Unity-19050-05-BallPool/Assets/Frozen/Frozen.unity b/Unity-19050-05-BallPool/Assets/Frozen/Frozen.unity index ca6b42b..2507594 100644 --- a/Unity-19050-05-BallPool/Assets/Frozen/Frozen.unity +++ b/Unity-19050-05-BallPool/Assets/Frozen/Frozen.unity @@ -2719,6 +2719,11 @@ Prefab: propertyPath: m_Enabled value: 1 objectReference: {fileID: 0} + - target: {fileID: 114504107585269582, guid: 1f68bf7cec2600e49a46d2f0554453c8, + type: 2} + propertyPath: debugInput + value: 1 + objectReference: {fileID: 0} m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: 1f68bf7cec2600e49a46d2f0554453c8, type: 2} m_IsPrefabParent: 0 @@ -4011,136 +4016,6 @@ CanvasRenderer: m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 1075112480} ---- !u!43 &1079079082 -Mesh: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_Name: 'Space Ground Mesh: (8x5x3)' - serializedVersion: 8 - m_SubMeshes: - - serializedVersion: 2 - firstByte: 0 - indexCount: 24 - topology: 0 - baseVertex: 0 - firstVertex: 0 - vertexCount: 16 - localAABB: - m_Center: {x: 0, y: 1.5, z: 0} - m_Extent: {x: 4, y: 1.5, z: 2.5} - m_Shapes: - vertices: [] - shapes: [] - channels: [] - fullWeights: [] - m_BindPose: [] - m_BoneNameHashes: - m_RootBoneNameHash: 0 - m_MeshCompression: 0 - m_IsReadable: 0 - m_KeepVertices: 1 - m_KeepIndices: 1 - m_IndexFormat: 0 - m_IndexBuffer: 000001000200010003000200040005000600050007000600080009000a0009000b000a000c000d000e000d000f000e00 - m_Skin: [] - m_VertexData: - m_CurrentChannels: 11 - m_VertexCount: 16 - m_Channels: - - stream: 0 - offset: 0 - format: 0 - dimension: 3 - - stream: 0 - offset: 12 - format: 0 - dimension: 3 - - stream: 0 - offset: 0 - format: 0 - dimension: 0 - - stream: 0 - offset: 24 - format: 0 - dimension: 2 - - stream: 0 - offset: 0 - format: 0 - dimension: 0 - - stream: 0 - offset: 0 - format: 0 - dimension: 0 - - stream: 0 - offset: 0 - format: 0 - dimension: 0 - - stream: 0 - offset: 0 - format: 0 - dimension: 0 - m_DataSize: 512 - _typelessdata: 000080c000000000000020c0000000000000803f00000000e4388e3e00000000000080c00000000000002040000000000000803f00000000e4388e3e0000203f0000804000000000000020c0000000000000803f000000008ee3383f00000000000080400000000000002040000000000000803f000000008ee3383f0000203f000080c000000000000020400000000000000000000080bfe4388e3e0000203f000080c000004040000020400000000000000000000080bfe4388e3e0000803f0000804000000000000020400000000000000000000080bf8ee3383f0000203f0000804000004040000020400000000000000000000080bf8ee3383f0000803f000080c000000000000020c00000803f0000000000000000000000000000203f000080c000004040000020c00000803f0000000000000000000000000000803f000080c000000000000020400000803f0000000000000000e4388e3e0000203f000080c000004040000020400000803f0000000000000000e4388e3e0000803f000080400000000000002040000080bf00000000000000008ee3383f0000203f000080400000404000002040000080bf00000000000000008ee3383f0000803f0000804000000000000020c0000080bf00000000000000000000803f0000203f0000804000004040000020c0000080bf00000000000000000000803f0000803f - m_CompressedMesh: - m_Vertices: - m_NumItems: 0 - m_Range: 0 - m_Start: 0 - m_Data: - m_BitSize: 0 - m_UV: - m_NumItems: 0 - m_Range: 0 - m_Start: 0 - m_Data: - m_BitSize: 0 - m_Normals: - m_NumItems: 0 - m_Range: 0 - m_Start: 0 - m_Data: - m_BitSize: 0 - m_Tangents: - m_NumItems: 0 - m_Range: 0 - m_Start: 0 - m_Data: - m_BitSize: 0 - m_Weights: - m_NumItems: 0 - m_Data: - m_BitSize: 0 - m_NormalSigns: - m_NumItems: 0 - m_Data: - m_BitSize: 0 - m_TangentSigns: - m_NumItems: 0 - m_Data: - m_BitSize: 0 - m_FloatColors: - m_NumItems: 0 - m_Range: 0 - m_Start: 0 - m_Data: - m_BitSize: 0 - m_BoneIndices: - m_NumItems: 0 - m_Data: - m_BitSize: 0 - m_Triangles: - m_NumItems: 0 - m_Data: - m_BitSize: 0 - m_UVInfo: 0 - m_LocalAABB: - m_Center: {x: 0, y: 1.5, z: 0} - m_Extent: {x: 4, y: 1.5, z: 2.5} - m_MeshUsageFlags: 0 - m_BakedConvexCollisionMesh: - m_BakedTriangleCollisionMesh: - m_MeshOptimized: 0 --- !u!1 &1164756621 GameObject: m_ObjectHideFlags: 0 @@ -5351,7 +5226,7 @@ MeshFilter: m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 1379541361} - m_Mesh: {fileID: 1079079082} + m_Mesh: {fileID: 1538287620} --- !u!114 &1379541365 MonoBehaviour: m_ObjectHideFlags: 0 @@ -6022,6 +5897,136 @@ Transform: m_Father: {fileID: 96822206} m_RootOrder: 3 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!43 &1538287620 +Mesh: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: 'Space Ground Mesh: (8x5x3)' + serializedVersion: 8 + m_SubMeshes: + - serializedVersion: 2 + firstByte: 0 + indexCount: 24 + topology: 0 + baseVertex: 0 + firstVertex: 0 + vertexCount: 16 + localAABB: + m_Center: {x: 0, y: 1.5, z: 0} + m_Extent: {x: 4, y: 1.5, z: 2.5} + m_Shapes: + vertices: [] + shapes: [] + channels: [] + fullWeights: [] + m_BindPose: [] + m_BoneNameHashes: + m_RootBoneNameHash: 0 + m_MeshCompression: 0 + m_IsReadable: 0 + m_KeepVertices: 1 + m_KeepIndices: 1 + m_IndexFormat: 0 + m_IndexBuffer: 000001000200010003000200040005000600050007000600080009000a0009000b000a000c000d000e000d000f000e00 + m_Skin: [] + m_VertexData: + m_CurrentChannels: 11 + m_VertexCount: 16 + m_Channels: + - stream: 0 + offset: 0 + format: 0 + dimension: 3 + - stream: 0 + offset: 12 + format: 0 + dimension: 3 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 24 + format: 0 + dimension: 2 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + m_DataSize: 512 + _typelessdata: 000080c000000000000020c0000000000000803f00000000e4388e3e00000000000080c00000000000002040000000000000803f00000000e4388e3e0000203f0000804000000000000020c0000000000000803f000000008ee3383f00000000000080400000000000002040000000000000803f000000008ee3383f0000203f000080c000000000000020400000000000000000000080bfe4388e3e0000203f000080c000004040000020400000000000000000000080bfe4388e3e0000803f0000804000000000000020400000000000000000000080bf8ee3383f0000203f0000804000004040000020400000000000000000000080bf8ee3383f0000803f000080c000000000000020c00000803f0000000000000000000000000000203f000080c000004040000020c00000803f0000000000000000000000000000803f000080c000000000000020400000803f0000000000000000e4388e3e0000203f000080c000004040000020400000803f0000000000000000e4388e3e0000803f000080400000000000002040000080bf00000000000000008ee3383f0000203f000080400000404000002040000080bf00000000000000008ee3383f0000803f0000804000000000000020c0000080bf00000000000000000000803f0000203f0000804000004040000020c0000080bf00000000000000000000803f0000803f + m_CompressedMesh: + m_Vertices: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_UV: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_Normals: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_Tangents: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_Weights: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_NormalSigns: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_TangentSigns: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_FloatColors: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_BoneIndices: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_Triangles: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_UVInfo: 0 + m_LocalAABB: + m_Center: {x: 0, y: 1.5, z: 0} + m_Extent: {x: 4, y: 1.5, z: 2.5} + m_MeshUsageFlags: 0 + m_BakedConvexCollisionMesh: + m_BakedTriangleCollisionMesh: + m_MeshOptimized: 0 --- !u!1 &1561705233 GameObject: m_ObjectHideFlags: 0 diff --git a/Unity-19050-05-BallPool/Assets/Frozen/FrozenDayParticleUniforms.asset b/Unity-19050-05-BallPool/Assets/Frozen/FrozenDayParticleUniforms.asset deleted file mode 100644 index 10bbed6..0000000 --- a/Unity-19050-05-BallPool/Assets/Frozen/FrozenDayParticleUniforms.asset +++ /dev/null @@ -1,30 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!114 &11400000 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 852ced439e5120c44bd352e9c29a164f, type: 3} - m_Name: FrozenDayParticleUniforms - m_EditorClassIdentifier: - numRate: 1 - movement: 1 - geomSize: 0.556 - velocityDamping: 0.1 - lifeDuration: 10 - lifeVariation: 0 - convergence: 0 - homeStrength: 0 - noiseStrength: 0.055 - noiseSeed: 0.5 - noiseTimeScale: 1 - noiseFrequency: 0.731 - forceDirection: {x: 0, y: 0, z: 1} - forceStrength: 0 - impulsePosition: {x: 0, y: 0, z: 0} - impulseRadius: 3 - impulseStrength: 0.06 diff --git a/Unity-19050-05-BallPool/Assets/Frozen/FrozenDayParticleUniforms.asset.meta b/Unity-19050-05-BallPool/Assets/Frozen/FrozenDayParticleUniforms.asset.meta deleted file mode 100644 index 4030288..0000000 --- a/Unity-19050-05-BallPool/Assets/Frozen/FrozenDayParticleUniforms.asset.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 43473f0506b1ba64c86ae17dd11d902a -timeCreated: 1513320663 -licenseType: Free -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 11400000 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/Frozen/FrozenNightParticleUniforms.asset b/Unity-19050-05-BallPool/Assets/Frozen/FrozenNightParticleUniforms.asset deleted file mode 100644 index 1e7b607..0000000 --- a/Unity-19050-05-BallPool/Assets/Frozen/FrozenNightParticleUniforms.asset +++ /dev/null @@ -1,30 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!114 &11400000 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 852ced439e5120c44bd352e9c29a164f, type: 3} - m_Name: FrozenNightParticleUniforms - m_EditorClassIdentifier: - numRate: 1 - movement: 1 - geomSize: 0.02 - velocityDamping: 0.98 - lifeDuration: 5 - lifeVariation: 0 - convergence: 0 - homeStrength: 0.63 - noiseStrength: 0.055 - noiseSeed: 0.5 - noiseTimeScale: 1 - noiseFrequency: 0.733 - forceDirection: {x: 0, y: 0, z: 1} - forceStrength: 0 - impulsePosition: {x: 0, y: 0, z: 0} - impulseRadius: 3 - impulseStrength: 0.1 diff --git a/Unity-19050-05-BallPool/Assets/Frozen/FrozenNightParticleUniforms.asset.meta b/Unity-19050-05-BallPool/Assets/Frozen/FrozenNightParticleUniforms.asset.meta deleted file mode 100644 index d39b921..0000000 --- a/Unity-19050-05-BallPool/Assets/Frozen/FrozenNightParticleUniforms.asset.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 54b82be1afe58664c8daeb575db89094 -timeCreated: 1513320663 -licenseType: Free -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 11400000 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/Frozen/FrozenParticleUniforms.asset b/Unity-19050-05-BallPool/Assets/Frozen/FrozenParticleUniforms.asset deleted file mode 100644 index 04471a8..0000000 --- a/Unity-19050-05-BallPool/Assets/Frozen/FrozenParticleUniforms.asset +++ /dev/null @@ -1,30 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!114 &11400000 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 852ced439e5120c44bd352e9c29a164f, type: 3} - m_Name: FrozenParticleUniforms - m_EditorClassIdentifier: - numRate: 1 - movement: 1 - geomSize: 1 - velocityDamping: 0.95 - lifeDuration: 10 - lifeVariation: 0 - convergence: 0 - homeStrength: 0 - noiseStrength: 0.055 - noiseSeed: 0.5 - noiseTimeScale: 1 - noiseFrequency: 0.731 - forceDirection: {x: 0, y: 0, z: 1} - forceStrength: 0 - impulsePosition: {x: 0, y: 0, z: 0} - impulseRadius: 3 - impulseStrength: 0.06 diff --git a/Unity-19050-05-BallPool/Assets/Frozen/FrozenParticleUniforms.asset.meta b/Unity-19050-05-BallPool/Assets/Frozen/FrozenParticleUniforms.asset.meta deleted file mode 100644 index 0f2c7ab..0000000 --- a/Unity-19050-05-BallPool/Assets/Frozen/FrozenParticleUniforms.asset.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 43a114cac50c03e4ea881a51dbb6e7bd -timeCreated: 1513320663 -licenseType: Free -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 11400000 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/Frozen/ParticleUniforms.asset b/Unity-19050-05-BallPool/Assets/Frozen/ParticleUniforms.asset deleted file mode 100644 index 56d42fd..0000000 --- a/Unity-19050-05-BallPool/Assets/Frozen/ParticleUniforms.asset +++ /dev/null @@ -1,30 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!114 &11400000 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 852ced439e5120c44bd352e9c29a164f, type: 3} - m_Name: ParticleUniforms - m_EditorClassIdentifier: - numRate: 1 - movement: 1 - geomSize: 0.074 - velocityDamping: 0.95 - lifeDuration: 10 - lifeVariation: 0 - convergence: 0 - homeStrength: 0 - noiseStrength: 0.055 - noiseSeed: 0.5 - noiseTimeScale: 1 - noiseFrequency: 0.731 - forceDirection: {x: 0, y: 0, z: 1} - forceStrength: 0.493 - impulsePosition: {x: 0, y: 0, z: 0} - impulseRadius: 3 - impulseStrength: 0.05 diff --git a/Unity-19050-05-BallPool/Assets/Frozen/ParticleUniforms.asset.meta b/Unity-19050-05-BallPool/Assets/Frozen/ParticleUniforms.asset.meta deleted file mode 100644 index b2f49a6..0000000 --- a/Unity-19050-05-BallPool/Assets/Frozen/ParticleUniforms.asset.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 86d4ce704ed55d343a52fed03681663d -timeCreated: 1513320663 -licenseType: Free -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 11400000 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/Frozen/Script/SceneController.cs b/Unity-19050-05-BallPool/Assets/Frozen/Script/SceneController.cs index 7b8cc3d..ef86bbe 100644 --- a/Unity-19050-05-BallPool/Assets/Frozen/Script/SceneController.cs +++ b/Unity-19050-05-BallPool/Assets/Frozen/Script/SceneController.cs @@ -22,8 +22,8 @@ namespace UltraCombos.Frozen [Range(0, 1)] public float rate = 0.0f; - [SerializeField] - UniformBlendedStructuredBuffer uniform; + // [SerializeField] + // UniformBlendedStructuredBuffer uniform; //[SerializeField] public List spaceMaterials = new List(); @@ -35,16 +35,16 @@ namespace UltraCombos.Frozen [SerializeField] Material snowMaterial; - [SerializeField] - BlendedCosineGradient cosineGradient; + // [SerializeField] + // BlendedCosineGradient cosineGradient; // [SerializeField] // KinectOpticalFlow kinect; [SerializeField] float nightKinectAmount = 30.0f; - [SerializeField] - ParticleViewerProcedural particleViewer; + // [SerializeField] + // ParticleViewerProcedural particleViewer; [SerializeField, Range(0, 1)] float dayParticleRate = 1.0f; diff --git a/Unity-19050-05-BallPool/Assets/Klak.meta b/Unity-19050-05-BallPool/Assets/Klak.meta index 200f648..b411e14 100644 --- a/Unity-19050-05-BallPool/Assets/Klak.meta +++ b/Unity-19050-05-BallPool/Assets/Klak.meta @@ -1,8 +1,6 @@ fileFormatVersion: 2 guid: 13b88616b1d47df45b1c7e4bea2670ec folderAsset: yes -timeCreated: 1519716653 -licenseType: Free DefaultImporter: externalObjects: {} userData: diff --git a/Unity-19050-05-BallPool/Assets/ParticleWorks.meta b/Unity-19050-05-BallPool/Assets/ParticleWorks.meta deleted file mode 100644 index 620083b..0000000 --- a/Unity-19050-05-BallPool/Assets/ParticleWorks.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 22351417d40ca3844ba1ccf6bd1f6f5b -folderAsset: yes -timeCreated: 1519716259 -licenseType: Free -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/ParticleWorks/CosineGradient.asset b/Unity-19050-05-BallPool/Assets/ParticleWorks/CosineGradient.asset deleted file mode 100644 index fc30dab..0000000 --- a/Unity-19050-05-BallPool/Assets/ParticleWorks/CosineGradient.asset +++ /dev/null @@ -1,16 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!114 &11400000 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 54276434dda9c694e85abaf98cdd981d, type: 3} - m_Name: CosineGradient - m_EditorClassIdentifier: - _redCoeffs: {x: 0.32, y: 0.284, z: 0.56, w: 0.453} - _greenCoeffs: {x: 0.191, y: 0.306, z: 0.3, w: 0.825} - _blueCoeffs: {x: 0.198, y: 0.558, z: 0.27, w: 0} diff --git a/Unity-19050-05-BallPool/Assets/ParticleWorks/CosineGradient.asset.meta b/Unity-19050-05-BallPool/Assets/ParticleWorks/CosineGradient.asset.meta deleted file mode 100644 index 1c256a1..0000000 --- a/Unity-19050-05-BallPool/Assets/ParticleWorks/CosineGradient.asset.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 0b6d4f25fdc8b8448a67827d394f8c07 -timeCreated: 1513340684 -licenseType: Free -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 11400000 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/ParticleWorks/Material.meta b/Unity-19050-05-BallPool/Assets/ParticleWorks/Material.meta deleted file mode 100644 index 98c02b4..0000000 --- a/Unity-19050-05-BallPool/Assets/ParticleWorks/Material.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 863ee04df261c0b4d9835a82da436f0f -folderAsset: yes -timeCreated: 1513322377 -licenseType: Free -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/ParticleWorks/Material/Ground.mat b/Unity-19050-05-BallPool/Assets/ParticleWorks/Material/Ground.mat deleted file mode 100644 index e3ac75b..0000000 --- a/Unity-19050-05-BallPool/Assets/ParticleWorks/Material/Ground.mat +++ /dev/null @@ -1,76 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!21 &2100000 -Material: - serializedVersion: 6 - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_Name: Ground - m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} - 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.448 - - _GlossyReflections: 1 - - _Metallic: 0.17 - - _Mode: 0 - - _OcclusionStrength: 1 - - _Parallax: 0.02 - - _SmoothnessTextureChannel: 0 - - _SpecularHighlights: 1 - - _SrcBlend: 1 - - _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/Unity-19050-05-BallPool/Assets/ParticleWorks/Material/Ground.mat.meta b/Unity-19050-05-BallPool/Assets/ParticleWorks/Material/Ground.mat.meta deleted file mode 100644 index 5ff8bbf..0000000 --- a/Unity-19050-05-BallPool/Assets/ParticleWorks/Material/Ground.mat.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 54c13d9de6d77834994872fbf5c7082b -timeCreated: 1513322386 -licenseType: Free -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 2100000 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/ParticleWorks/Material/Mirror.mat b/Unity-19050-05-BallPool/Assets/ParticleWorks/Material/Mirror.mat deleted file mode 100644 index 3928d5b..0000000 --- a/Unity-19050-05-BallPool/Assets/ParticleWorks/Material/Mirror.mat +++ /dev/null @@ -1,76 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!21 &2100000 -Material: - serializedVersion: 6 - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_Name: Mirror - m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} - 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.425 - - _GlossyReflections: 1 - - _Metallic: 0.653 - - _Mode: 0 - - _OcclusionStrength: 1 - - _Parallax: 0.02 - - _SmoothnessTextureChannel: 0 - - _SpecularHighlights: 1 - - _SrcBlend: 1 - - _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/Unity-19050-05-BallPool/Assets/ParticleWorks/Material/Mirror.mat.meta b/Unity-19050-05-BallPool/Assets/ParticleWorks/Material/Mirror.mat.meta deleted file mode 100644 index ba79a73..0000000 --- a/Unity-19050-05-BallPool/Assets/ParticleWorks/Material/Mirror.mat.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 305605d3346fb2f4fbad85f4e832bed2 -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 2100000 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/ParticleWorks/Material/ParticleViewerInstanced.mat b/Unity-19050-05-BallPool/Assets/ParticleWorks/Material/ParticleViewerInstanced.mat deleted file mode 100644 index 5af4e4b..0000000 --- a/Unity-19050-05-BallPool/Assets/ParticleWorks/Material/ParticleViewerInstanced.mat +++ /dev/null @@ -1,78 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!21 &2100000 -Material: - serializedVersion: 6 - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_Name: ParticleViewerInstanced - m_Shader: {fileID: 4800000, guid: 0a37c93f4a42ad341ab8b8d2dafab01d, 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: 10910, guid: 0000000000000000f000000000000000, type: 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 - - _Emission: 0 - - _GlossMapScale: 1 - - _Glossiness: 0.5 - - _GlossyReflections: 1 - - _Metallic: 0.917 - - _Mode: 0 - - _OcclusionStrength: 1 - - _Parallax: 0.02 - - _Smoothness: 0.839 - - _SmoothnessTextureChannel: 0 - - _SpecularHighlights: 1 - - _SrcBlend: 1 - - _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/Unity-19050-05-BallPool/Assets/ParticleWorks/Material/ParticleViewerInstanced.mat.meta b/Unity-19050-05-BallPool/Assets/ParticleWorks/Material/ParticleViewerInstanced.mat.meta deleted file mode 100644 index 754dc70..0000000 --- a/Unity-19050-05-BallPool/Assets/ParticleWorks/Material/ParticleViewerInstanced.mat.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: cc1041196be864c4cbe1b6a6118fe495 -timeCreated: 1514086623 -licenseType: Free -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 2100000 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/ParticleWorks/Material/ParticleViewerMesh.mat b/Unity-19050-05-BallPool/Assets/ParticleWorks/Material/ParticleViewerMesh.mat deleted file mode 100644 index 71f3704..0000000 --- a/Unity-19050-05-BallPool/Assets/ParticleWorks/Material/ParticleViewerMesh.mat +++ /dev/null @@ -1,78 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!21 &2100000 -Material: - serializedVersion: 6 - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_Name: ParticleViewerMesh - m_Shader: {fileID: 4800000, guid: c31611738f4cc1b4ea71988156cc8327, 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: 10904, guid: 0000000000000000f000000000000000, type: 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 - - _Emission: 0 - - _GlossMapScale: 1 - - _Glossiness: 0.5 - - _GlossyReflections: 1 - - _Metallic: 0.579 - - _Mode: 0 - - _OcclusionStrength: 1 - - _Parallax: 0.02 - - _Smoothness: 0.479 - - _SmoothnessTextureChannel: 0 - - _SpecularHighlights: 1 - - _SrcBlend: 1 - - _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/Unity-19050-05-BallPool/Assets/ParticleWorks/Material/ParticleViewerMesh.mat.meta b/Unity-19050-05-BallPool/Assets/ParticleWorks/Material/ParticleViewerMesh.mat.meta deleted file mode 100644 index d391301..0000000 --- a/Unity-19050-05-BallPool/Assets/ParticleWorks/Material/ParticleViewerMesh.mat.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 6c404ebf6ff877a46a9ac3132b7c648d -timeCreated: 1513321839 -licenseType: Free -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 2100000 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/ParticleWorks/Material/ParticleViewerProcedural.mat b/Unity-19050-05-BallPool/Assets/ParticleWorks/Material/ParticleViewerProcedural.mat deleted file mode 100644 index c5b919c..0000000 --- a/Unity-19050-05-BallPool/Assets/ParticleWorks/Material/ParticleViewerProcedural.mat +++ /dev/null @@ -1,77 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!21 &2100000 -Material: - serializedVersion: 6 - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_Name: ParticleViewerProcedural - m_Shader: {fileID: 4800000, guid: 6815828e001d01f4699ec8c7f1dde1fe, 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 - - _Emission: 0 - - _GlossMapScale: 1 - - _Glossiness: 0.5 - - _GlossyReflections: 1 - - _Metallic: 0 - - _Mode: 0 - - _OcclusionStrength: 1 - - _Parallax: 0.02 - - _SmoothnessTextureChannel: 0 - - _SpecularHighlights: 1 - - _SrcBlend: 1 - - _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/Unity-19050-05-BallPool/Assets/ParticleWorks/Material/ParticleViewerProcedural.mat.meta b/Unity-19050-05-BallPool/Assets/ParticleWorks/Material/ParticleViewerProcedural.mat.meta deleted file mode 100644 index 0918388..0000000 --- a/Unity-19050-05-BallPool/Assets/ParticleWorks/Material/ParticleViewerProcedural.mat.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 2c82eba6891c0044f9854bb70b0da2ef -timeCreated: 1513930866 -licenseType: Free -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 2100000 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/ParticleWorks/ParticleDance.unity b/Unity-19050-05-BallPool/Assets/ParticleWorks/ParticleDance.unity deleted file mode 100644 index a2394b7..0000000 --- a/Unity-19050-05-BallPool/Assets/ParticleWorks/ParticleDance.unity +++ /dev/null @@ -1,1287 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!29 &1 -OcclusionCullingSettings: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_OcclusionBakeSettings: - smallestOccluder: 5 - smallestHole: 0.25 - backfaceThreshold: 100 - m_SceneGUID: 00000000000000000000000000000000 - m_OcclusionCullingData: {fileID: 0} ---- !u!104 &2 -RenderSettings: - m_ObjectHideFlags: 0 - serializedVersion: 9 - m_Fog: 0 - m_FogColor: {r: 0.5921569, g: 0.47450984, b: 0.2901961, a: 1} - m_FogMode: 3 - m_FogDensity: 0.01 - m_LinearFogStart: 0 - m_LinearFogEnd: 300 - m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} - m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} - m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} - m_AmbientIntensity: 1 - m_AmbientMode: 0 - m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} - m_SkyboxMaterial: {fileID: 2100000, guid: cd4b15a8a6981924cb2791f75e92ae97, type: 2} - m_HaloStrength: 0.5 - m_FlareStrength: 1 - m_FlareFadeSpeed: 3 - m_HaloTexture: {fileID: 0} - m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} - m_DefaultReflectionMode: 0 - m_DefaultReflectionResolution: 128 - m_ReflectionBounces: 1 - m_ReflectionIntensity: 1 - m_CustomReflection: {fileID: 0} - m_Sun: {fileID: 195910678} - m_IndirectSpecularColor: {r: 0.121907264, g: 0.20316994, b: 0.260672, a: 1} - m_UseRadianceAmbientProbe: 0 ---- !u!157 &3 -LightmapSettings: - m_ObjectHideFlags: 0 - serializedVersion: 11 - m_GIWorkflowMode: 0 - m_GISettings: - serializedVersion: 2 - m_BounceScale: 1 - m_IndirectOutputScale: 1 - m_AlbedoBoost: 1 - m_TemporalCoherenceThreshold: 1 - m_EnvironmentLightingMode: 0 - m_EnableBakedLightmaps: 1 - m_EnableRealtimeLightmaps: 1 - m_LightmapEditorSettings: - serializedVersion: 10 - m_Resolution: 2 - m_BakeResolution: 40 - m_AtlasSize: 1024 - m_AO: 0 - m_AOMaxDistance: 1 - m_CompAOExponent: 1 - m_CompAOExponentDirect: 0 - m_Padding: 2 - m_LightmapParameters: {fileID: 0} - m_LightmapsBakeMode: 1 - m_TextureCompression: 1 - m_FinalGather: 0 - m_FinalGatherFiltering: 1 - m_FinalGatherRayCount: 256 - m_ReflectionCompression: 2 - m_MixedBakeMode: 2 - m_BakeBackend: 0 - m_PVRSampling: 1 - m_PVRDirectSampleCount: 32 - m_PVRSampleCount: 500 - m_PVRBounces: 2 - m_PVRFilterTypeDirect: 0 - m_PVRFilterTypeIndirect: 0 - m_PVRFilterTypeAO: 0 - m_PVRFilteringMode: 1 - m_PVRCulling: 1 - m_PVRFilteringGaussRadiusDirect: 1 - m_PVRFilteringGaussRadiusIndirect: 5 - m_PVRFilteringGaussRadiusAO: 2 - m_PVRFilteringAtrousPositionSigmaDirect: 0.5 - m_PVRFilteringAtrousPositionSigmaIndirect: 2 - m_PVRFilteringAtrousPositionSigmaAO: 1 - m_ShowResolutionOverlay: 1 - m_LightingDataAsset: {fileID: 0} - m_UseShadowmask: 1 ---- !u!196 &4 -NavMeshSettings: - serializedVersion: 2 - m_ObjectHideFlags: 0 - m_BuildSettings: - serializedVersion: 2 - agentTypeID: 0 - agentRadius: 0.5 - agentHeight: 2 - agentSlope: 45 - agentClimb: 0.4 - ledgeDropHeight: 0 - maxJumpAcrossDistance: 0 - minRegionArea: 2 - manualCellSize: 0 - cellSize: 0.16666667 - manualTileSize: 0 - tileSize: 256 - accuratePlacement: 0 - debug: - m_Flags: 0 - m_NavMeshData: {fileID: 0} ---- !u!1 &195910677 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 5 - m_Component: - - component: {fileID: 195910679} - - component: {fileID: 195910678} - - component: {fileID: 195910680} - m_Layer: 0 - m_Name: Directional Light - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!108 &195910678 -Light: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 195910677} - m_Enabled: 1 - serializedVersion: 8 - m_Type: 1 - m_Color: {r: 1, g: 0.93134546, b: 0.8715508, a: 1} - m_Intensity: 1 - m_Range: 10 - m_SpotAngle: 30 - m_CookieSize: 10 - m_Shadows: - m_Type: 2 - m_Resolution: -1 - m_CustomResolution: -1 - m_Strength: 1 - m_Bias: 0.05 - m_NormalBias: 0.4 - m_NearPlane: 0.2 - m_Cookie: {fileID: 0} - m_DrawHalo: 0 - m_Flare: {fileID: 0} - m_RenderMode: 0 - m_CullingMask: - serializedVersion: 2 - m_Bits: 4294967295 - m_Lightmapping: 4 - m_AreaSize: {x: 1, y: 1} - m_BounceIntensity: 1 - m_ColorTemperature: 6570 - m_UseColorTemperature: 0 - m_ShadowRadius: 0 - m_ShadowAngle: 0 ---- !u!4 &195910679 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 195910677} - m_LocalRotation: {x: 0.052217025, y: 0.9392279, z: -0.29613733, w: 0.16561128} - m_LocalPosition: {x: 0, y: 3, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 1 - m_LocalEulerAnglesHint: {x: 35, y: 160, z: 0} ---- !u!114 &195910680 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 195910677} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 09f74dcd336a90240853a2bb08538f0d, type: 3} - m_Name: - m_EditorClassIdentifier: - kelvin: 5500 - color: {r: 1, g: 0.93134546, b: 0.8715508, a: 1} ---- !u!1 &300019303 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 5 - m_Component: - - component: {fileID: 300019305} - - component: {fileID: 300019304} - m_Layer: 0 - m_Name: Reflection Probe - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!215 &300019304 -ReflectionProbe: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 300019303} - m_Enabled: 1 - serializedVersion: 2 - m_Type: 0 - m_Mode: 1 - m_RefreshMode: 1 - m_TimeSlicingMode: 0 - m_Resolution: 128 - m_UpdateFrequency: 0 - m_BoxSize: {x: 100, y: 100, z: 100} - m_BoxOffset: {x: 0, y: 0, z: 0} - m_NearClip: 0.3 - m_FarClip: 1000 - m_ShadowDistance: 100 - m_ClearFlags: 1 - m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} - m_CullingMask: - serializedVersion: 2 - m_Bits: 4294967295 - m_IntensityMultiplier: 1 - m_BlendDistance: 1 - m_HDR: 1 - m_BoxProjection: 0 - m_RenderDynamicObjects: 0 - m_UseOcclusionCulling: 1 - m_Importance: 1 - m_CustomBakedTexture: {fileID: 0} ---- !u!4 &300019305 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 300019303} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0.5, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 4 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1001 &388431762 -Prefab: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Modification: - m_TransformParent: {fileID: 1404171735} - m_Modifications: - - target: {fileID: 400004, guid: c61778281aa9abe459f20b5ed0581d8d, type: 3} - propertyPath: m_LocalPosition.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 400004, guid: c61778281aa9abe459f20b5ed0581d8d, type: 3} - propertyPath: m_LocalPosition.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 400004, guid: c61778281aa9abe459f20b5ed0581d8d, type: 3} - propertyPath: m_LocalPosition.z - value: -5.32 - objectReference: {fileID: 0} - - target: {fileID: 400004, guid: c61778281aa9abe459f20b5ed0581d8d, type: 3} - propertyPath: m_LocalRotation.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 400004, guid: c61778281aa9abe459f20b5ed0581d8d, type: 3} - propertyPath: m_LocalRotation.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 400004, guid: c61778281aa9abe459f20b5ed0581d8d, type: 3} - propertyPath: m_LocalRotation.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 400004, guid: c61778281aa9abe459f20b5ed0581d8d, type: 3} - propertyPath: m_LocalRotation.w - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 400004, guid: c61778281aa9abe459f20b5ed0581d8d, type: 3} - propertyPath: m_RootOrder - value: 3 - objectReference: {fileID: 0} - - target: {fileID: 9500000, guid: c61778281aa9abe459f20b5ed0581d8d, type: 3} - propertyPath: m_Controller - value: - objectReference: {fileID: 9100000, guid: 3fb04ee54d305dd46a438b8cb4303d12, type: 2} - - target: {fileID: 100004, guid: c61778281aa9abe459f20b5ed0581d8d, type: 3} - propertyPath: m_IsActive - value: 0 - objectReference: {fileID: 0} - m_RemovedComponents: [] - m_ParentPrefab: {fileID: 100100000, guid: c61778281aa9abe459f20b5ed0581d8d, type: 3} - m_IsPrefabParent: 0 ---- !u!4 &388431763 stripped -Transform: - m_PrefabParentObject: {fileID: 400004, guid: c61778281aa9abe459f20b5ed0581d8d, type: 3} - m_PrefabInternal: {fileID: 388431762} ---- !u!1 &505289391 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 5 - m_Component: - - component: {fileID: 505289392} - - component: {fileID: 505289393} - m_Layer: 0 - m_Name: ParticleViewerInstanced - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 0 ---- !u!4 &505289392 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 505289391} - 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: [] - m_Father: {fileID: 1635776204} - m_RootOrder: 4 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &505289393 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 505289391} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 6d8d9920ebddf6247accd7655895ed34, type: 3} - m_Name: - m_EditorClassIdentifier: - buffer: {fileID: 1503302983} - material: {fileID: 2100000, guid: cc1041196be864c4cbe1b6a6118fe495, type: 2} - reference: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!1 &590004640 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 5 - m_Component: - - component: {fileID: 590004641} - - component: {fileID: 590004642} - - component: {fileID: 590004644} - - component: {fileID: 590004643} - m_Layer: 0 - m_Name: ParticleViewerMesh - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &590004641 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 590004640} - 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: [] - m_Father: {fileID: 1635776204} - m_RootOrder: 3 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &590004642 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 590004640} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d54292eb10cbcf43a98b855de6807e7, type: 3} - m_Name: - m_EditorClassIdentifier: - buffer: {fileID: 1503302983} - material: {fileID: 2100000, guid: 6c404ebf6ff877a46a9ac3132b7c648d, type: 2} - shader: {fileID: 7200000, guid: 226ca53b2a6b1f34cb8e462337683d07, type: 3} - references: - - {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!23 &590004643 -MeshRenderer: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 590004640} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RenderingLayerMask: 4294967295 - m_Materials: - - {fileID: 2100000, guid: 305605d3346fb2f4fbad85f4e832bed2, type: 2} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 0 - 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 &590004644 -MeshFilter: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 590004640} - m_Mesh: {fileID: 0} ---- !u!1 &670902531 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 5 - m_Component: - - component: {fileID: 670902532} - - component: {fileID: 670902535} - - component: {fileID: 670902534} - - component: {fileID: 670902533} - m_Layer: 0 - m_Name: Sphere - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 0 ---- !u!4 &670902532 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 670902531} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 5, y: 5, z: 5} - m_Children: [] - m_Father: {fileID: 1610402962} - m_RootOrder: 1 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!23 &670902533 -MeshRenderer: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 670902531} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RenderingLayerMask: 4294967295 - m_Materials: - - {fileID: 2100000, guid: 305605d3346fb2f4fbad85f4e832bed2, type: 2} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_PreserveUVs: 1 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 0 - 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!135 &670902534 -SphereCollider: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 670902531} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - serializedVersion: 2 - m_Radius: 0.5 - m_Center: {x: 0, y: 0, z: 0} ---- !u!33 &670902535 -MeshFilter: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 670902531} - m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} ---- !u!1 &894860818 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 5 - m_Component: - - component: {fileID: 894860822} - - component: {fileID: 894860821} - - component: {fileID: 894860820} - - component: {fileID: 894860819} - - component: {fileID: 894860825} - - component: {fileID: 894860824} - - component: {fileID: 894860823} - m_Layer: 1 - m_Name: Main Camera - m_TagString: MainCamera - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!81 &894860819 -AudioListener: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 894860818} - m_Enabled: 1 ---- !u!124 &894860820 -Behaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 894860818} - m_Enabled: 1 ---- !u!20 &894860821 -Camera: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 894860818} - m_Enabled: 1 - serializedVersion: 2 - m_ClearFlags: 1 - m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} - m_NormalizedViewPortRect: - serializedVersion: 2 - x: 0 - y: 0 - width: 1 - height: 1 - near clip plane: 0.3 - far clip plane: 1000 - field of view: 60 - orthographic: 0 - orthographic size: 5 - m_Depth: -1 - m_CullingMask: - serializedVersion: 2 - m_Bits: 4294967295 - m_RenderingPath: 3 - m_TargetTexture: {fileID: 0} - m_TargetDisplay: 0 - m_TargetEye: 3 - m_HDR: 1 - m_AllowMSAA: 0 - m_AllowDynamicResolution: 0 - m_ForceIntoRT: 1 - m_OcclusionCulling: 1 - m_StereoConvergence: 10 - m_StereoSeparation: 0.022 ---- !u!4 &894860822 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 894860818} - m_LocalRotation: {x: -0, y: 0.87219614, z: -0, w: 0.4891563} - m_LocalPosition: {x: -2.26, y: 0.86, z: 1.59} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 121.43001, z: 0} ---- !u!114 &894860823 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 894860818} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 8b9a305e18de0c04dbd257a21cd47087, type: 3} - m_Name: - m_EditorClassIdentifier: - sharedProfile: {fileID: 11400000, guid: 13848f592641d12488d9f26f621f4aea, type: 2} - isGlobal: 1 - blendDistance: 0 - weight: 1 - priority: 0 ---- !u!114 &894860824 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 894860818} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 948f4100a11a5c24981795d21301da5c, type: 3} - m_Name: - m_EditorClassIdentifier: - volumeTrigger: {fileID: 894860822} - volumeLayer: - serializedVersion: 2 - m_Bits: 2 - stopNaNPropagation: 1 - antialiasingMode: 2 - temporalAntialiasing: - jitterSpread: 0.75 - sharpness: 0.25 - stationaryBlending: 0.95 - motionBlending: 0.85 - fastApproximateAntialiasing: - fastMode: 0 - keepAlpha: 0 - fog: - enabled: 1 - excludeSkybox: 1 - debugLayer: - lightMeter: - width: 512 - height: 256 - showCurves: 1 - histogram: - width: 512 - height: 256 - channel: 3 - waveform: - exposure: 0.12 - height: 256 - vectorscope: - size: 256 - exposure: 0.12 - overlaySettings: - motionColorIntensity: 4 - motionGridSize: 64 - colorBlindnessType: 0 - colorBlindnessStrength: 1 - m_Resources: {fileID: 11400000, guid: d82512f9c8e5d4a4d938b575d47f88d4, type: 2} - m_ShowToolkit: 0 - m_ShowCustomSorter: 0 - breakBeforeColorGrading: 0 - m_BeforeTransparentBundles: [] - m_BeforeStackBundles: [] - m_AfterStackBundles: [] ---- !u!114 &894860825 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 894860818} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: fdea3b4bfb3beda43b2ce0152c3dcfc8, type: 3} - m_Name: - m_EditorClassIdentifier: - superSize: 2 - prefix: ScreenCapture ---- !u!4 &933572036 stripped -Transform: - m_PrefabParentObject: {fileID: 400004, guid: 75dc5464563dbed41984cdfa83943ba2, type: 3} - m_PrefabInternal: {fileID: 1469853377} ---- !u!1 &1004254532 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 5 - m_Component: - - component: {fileID: 1004254533} - - component: {fileID: 1004254534} - - component: {fileID: 1004254536} - - component: {fileID: 1004254535} - m_Layer: 0 - m_Name: GameObject - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1004254533 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1004254532} - 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: [] - m_Father: {fileID: 0} - m_RootOrder: 6 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &1004254534 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1004254532} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 0df48618396d21940afdaf83eae62f58, type: 3} - m_Name: - m_EditorClassIdentifier: - filename: ParticleDance - rootTransforms: - - {fileID: 590004641} ---- !u!23 &1004254535 -MeshRenderer: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1004254532} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RenderingLayerMask: 4294967295 - m_Materials: - - {fileID: 10302, 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_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 0 - 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 &1004254536 -MeshFilter: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1004254532} - m_Mesh: {fileID: 0} ---- !u!1 &1183085976 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 5 - m_Component: - - component: {fileID: 1183085977} - - component: {fileID: 1183085980} - - component: {fileID: 1183085978} - m_Layer: 0 - m_Name: Cylinder - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1183085977 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1183085976} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: -1, z: 0} - m_LocalScale: {x: 100, y: 1, z: 100} - m_Children: [] - m_Father: {fileID: 1610402962} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!23 &1183085978 -MeshRenderer: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1183085976} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RenderingLayerMask: 4294967295 - m_Materials: - - {fileID: 2100000, guid: 54c13d9de6d77834994872fbf5c7082b, type: 2} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_PreserveUVs: 1 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 0 - 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 &1183085980 -MeshFilter: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1183085976} - m_Mesh: {fileID: 10206, guid: 0000000000000000e000000000000000, type: 0} ---- !u!1 &1297859255 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 5 - m_Component: - - component: {fileID: 1297859256} - - component: {fileID: 1297859257} - m_Layer: 0 - m_Name: ParticleUpdater - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1297859256 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1297859255} - 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: [] - m_Father: {fileID: 1635776204} - m_RootOrder: 1 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &1297859257 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1297859255} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 364a6df5fc849f7448e97efcaa6cefdc, type: 3} - m_Name: - m_EditorClassIdentifier: - reset: 0 - maxParticles: 3000 - particleBuffer: {fileID: 1503302983} - homeBuffer: {fileID: 1766716369} - homeVelocityBuffer: {fileID: 1705255769} - shader: {fileID: 7200000, guid: e08afbf5a516b754a8eb9de35a9f5e6a, type: 3} - uniformBuffer: {fileID: 1515258535} - cosineGradient: {fileID: 11400000, guid: 0b6d4f25fdc8b8448a67827d394f8c07, type: 2} - debug: ---- !u!1 &1404171734 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 5 - m_Component: - - component: {fileID: 1404171735} - - component: {fileID: 1404171737} - m_Layer: 0 - m_Name: HomeBuffer - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1404171735 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1404171734} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0.007, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: - - {fileID: 1766716368} - - {fileID: 1705255768} - - {fileID: 933572036} - - {fileID: 388431763} - m_Father: {fileID: 0} - m_RootOrder: 5 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &1404171737 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1404171734} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 8eb9b37b2e6fe504c948b6b2ad22a38c, type: 3} - m_Name: - m_EditorClassIdentifier: - shader: {fileID: 7200000, guid: fa89158a0f676c9479248d6a1b0cee36, type: 3} - positionBuffer: {fileID: 1766716369} - velocityBuffer: {fileID: 1705255769} ---- !u!1001 &1469853377 -Prefab: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Modification: - m_TransformParent: {fileID: 1404171735} - m_Modifications: - - target: {fileID: 400004, guid: 75dc5464563dbed41984cdfa83943ba2, type: 3} - propertyPath: m_LocalPosition.x - value: -1.22 - objectReference: {fileID: 0} - - target: {fileID: 400004, guid: 75dc5464563dbed41984cdfa83943ba2, type: 3} - propertyPath: m_LocalPosition.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 400004, guid: 75dc5464563dbed41984cdfa83943ba2, type: 3} - propertyPath: m_LocalPosition.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 400004, guid: 75dc5464563dbed41984cdfa83943ba2, type: 3} - propertyPath: m_LocalRotation.x - value: -0 - objectReference: {fileID: 0} - - target: {fileID: 400004, guid: 75dc5464563dbed41984cdfa83943ba2, type: 3} - propertyPath: m_LocalRotation.y - value: -0 - objectReference: {fileID: 0} - - target: {fileID: 400004, guid: 75dc5464563dbed41984cdfa83943ba2, type: 3} - propertyPath: m_LocalRotation.z - value: -0 - objectReference: {fileID: 0} - - target: {fileID: 400004, guid: 75dc5464563dbed41984cdfa83943ba2, type: 3} - propertyPath: m_LocalRotation.w - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 400004, guid: 75dc5464563dbed41984cdfa83943ba2, type: 3} - propertyPath: m_RootOrder - value: 2 - objectReference: {fileID: 0} - - target: {fileID: 9500000, guid: 75dc5464563dbed41984cdfa83943ba2, type: 3} - propertyPath: m_Controller - value: - objectReference: {fileID: 9100000, guid: 2fdeb833902f3f74ea50bed9c52e3399, type: 2} - - target: {fileID: 100004, guid: 75dc5464563dbed41984cdfa83943ba2, type: 3} - propertyPath: m_IsActive - value: 1 - objectReference: {fileID: 0} - m_RemovedComponents: [] - m_ParentPrefab: {fileID: 100100000, guid: 75dc5464563dbed41984cdfa83943ba2, type: 3} - m_IsPrefabParent: 0 ---- !u!1 &1503302982 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 5 - m_Component: - - component: {fileID: 1503302984} - - component: {fileID: 1503302983} - m_Layer: 0 - m_Name: StructuredBuffer - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &1503302983 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1503302982} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: afa75a2a1fe8aff4ab1d6418df9d62dd, type: 3} - m_Name: - m_EditorClassIdentifier: - bufferName: ssbo ---- !u!4 &1503302984 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1503302982} - 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: [] - m_Father: {fileID: 1635776204} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &1515258533 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 5 - m_Component: - - component: {fileID: 1515258534} - - component: {fileID: 1515258535} - - component: {fileID: 1515258536} - m_Layer: 0 - m_Name: Uniforms - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1515258534 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1515258533} - 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: [] - m_Father: {fileID: 1635776204} - m_RootOrder: 5 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &1515258535 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1515258533} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: de2687c4b3b02dc4ebc0495697f1cfb0, type: 3} - m_Name: - m_EditorClassIdentifier: - bufferName: uniform_buffer - uniform: {fileID: 11400000, guid: c7e1ee53cbe14844380318198723f1e8, type: 2} ---- !u!114 &1515258536 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1515258533} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 799fd07762a67b348818cbe8e6502e21, type: 3} - m_Name: - m_EditorClassIdentifier: - impule: {fileID: 670902532} ---- !u!1 &1571173705 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 5 - m_Component: - - component: {fileID: 1571173706} - - component: {fileID: 1571173707} - m_Layer: 0 - m_Name: ParticleViewerProcedural - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 0 ---- !u!4 &1571173706 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1571173705} - 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: [] - m_Father: {fileID: 1635776204} - m_RootOrder: 2 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &1571173707 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1571173705} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: e2f970277ae55db488ae9e5e4d484912, type: 3} - m_Name: - m_EditorClassIdentifier: - buffer: {fileID: 1503302983} - material: {fileID: 2100000, guid: 2c82eba6891c0044f9854bb70b0da2ef, type: 2} ---- !u!1 &1610402961 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 5 - m_Component: - - component: {fileID: 1610402962} - m_Layer: 0 - m_Name: Ground - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1610402962 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1610402961} - 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: 1183085977} - - {fileID: 670902532} - m_Father: {fileID: 0} - m_RootOrder: 3 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &1635776202 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 5 - m_Component: - - component: {fileID: 1635776204} - m_Layer: 0 - m_Name: ParticleWorks - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1635776204 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1635776202} - 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: 1503302984} - - {fileID: 1297859256} - - {fileID: 1571173706} - - {fileID: 590004641} - - {fileID: 505289392} - - {fileID: 1515258534} - m_Father: {fileID: 0} - m_RootOrder: 2 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &1705255767 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 5 - m_Component: - - component: {fileID: 1705255768} - - component: {fileID: 1705255769} - m_Layer: 0 - m_Name: HomeVelocityBuffer - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1705255768 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1705255767} - 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: [] - m_Father: {fileID: 1404171735} - m_RootOrder: 1 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &1705255769 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1705255767} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: afa75a2a1fe8aff4ab1d6418df9d62dd, type: 3} - m_Name: - m_EditorClassIdentifier: - bufferName: home_velocity_buffer ---- !u!1 &1766716367 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 5 - m_Component: - - component: {fileID: 1766716368} - - component: {fileID: 1766716369} - m_Layer: 0 - m_Name: HomePositionBuffer - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1766716368 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1766716367} - 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: [] - m_Father: {fileID: 1404171735} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &1766716369 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1766716367} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: afa75a2a1fe8aff4ab1d6418df9d62dd, type: 3} - m_Name: - m_EditorClassIdentifier: - bufferName: home_buffer diff --git a/Unity-19050-05-BallPool/Assets/ParticleWorks/ParticleDance.unity.meta b/Unity-19050-05-BallPool/Assets/ParticleWorks/ParticleDance.unity.meta deleted file mode 100644 index 3dfc27e..0000000 --- a/Unity-19050-05-BallPool/Assets/ParticleWorks/ParticleDance.unity.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: de3d241ea26743343865c5090195c069 -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/ParticleWorks/ParticleUniforms.asset b/Unity-19050-05-BallPool/Assets/ParticleWorks/ParticleUniforms.asset deleted file mode 100644 index 0e99221..0000000 --- a/Unity-19050-05-BallPool/Assets/ParticleWorks/ParticleUniforms.asset +++ /dev/null @@ -1,30 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!114 &11400000 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 852ced439e5120c44bd352e9c29a164f, type: 3} - m_Name: ParticleUniforms - m_EditorClassIdentifier: - numRate: 1 - movement: 1 - geomSize: 0.069 - velocityDamping: 1 - lifeDuration: 0 - lifeVariation: 0 - convergence: 0.097 - homeStrength: 0.165 - noiseStrength: 0.208 - noiseSeed: 0.5 - noiseTimeScale: 1 - noiseFrequency: 0.217 - forceDirection: {x: 0, y: 0, z: 0} - forceStrength: 0 - impulsePosition: {x: 0, y: 0, z: 0} - impulseRadius: 3 - impulseStrength: -1 diff --git a/Unity-19050-05-BallPool/Assets/ParticleWorks/ParticleUniforms.asset.meta b/Unity-19050-05-BallPool/Assets/ParticleWorks/ParticleUniforms.asset.meta deleted file mode 100644 index 1bc24af..0000000 --- a/Unity-19050-05-BallPool/Assets/ParticleWorks/ParticleUniforms.asset.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 01c39e7b96a04b24f87d437d0c5474e2 -timeCreated: 1513320663 -licenseType: Free -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 11400000 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/ParticleWorks/ParticleUniformsForMeshVertex.asset b/Unity-19050-05-BallPool/Assets/ParticleWorks/ParticleUniformsForMeshVertex.asset deleted file mode 100644 index 17feda8..0000000 --- a/Unity-19050-05-BallPool/Assets/ParticleWorks/ParticleUniformsForMeshVertex.asset +++ /dev/null @@ -1,30 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!114 &11400000 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 852ced439e5120c44bd352e9c29a164f, type: 3} - m_Name: ParticleUniformsForMeshVertex - m_EditorClassIdentifier: - numRate: 1 - movement: 1 - geomSize: 0.063 - velocityDamping: 1 - lifeDuration: 1 - lifeVariation: 0.571 - convergence: 0 - homeStrength: 0 - noiseStrength: 0.02 - noiseSeed: 0.5 - noiseTimeScale: 1 - noiseFrequency: 0.831 - forceDirection: {x: 0, y: 0, z: 0} - forceStrength: 0.026 - impulsePosition: {x: 0, y: 0, z: 0} - impulseRadius: 3 - impulseStrength: 0 diff --git a/Unity-19050-05-BallPool/Assets/ParticleWorks/ParticleUniformsForMeshVertex.asset.meta b/Unity-19050-05-BallPool/Assets/ParticleWorks/ParticleUniformsForMeshVertex.asset.meta deleted file mode 100644 index ef1dfa5..0000000 --- a/Unity-19050-05-BallPool/Assets/ParticleWorks/ParticleUniformsForMeshVertex.asset.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: c7e1ee53cbe14844380318198723f1e8 -timeCreated: 1513320663 -licenseType: Free -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 11400000 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/ParticleWorks/ParticleWorks.unity b/Unity-19050-05-BallPool/Assets/ParticleWorks/ParticleWorks.unity deleted file mode 100644 index b4ce2bd..0000000 --- a/Unity-19050-05-BallPool/Assets/ParticleWorks/ParticleWorks.unity +++ /dev/null @@ -1,1017 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!29 &1 -OcclusionCullingSettings: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_OcclusionBakeSettings: - smallestOccluder: 5 - smallestHole: 0.25 - backfaceThreshold: 100 - m_SceneGUID: 00000000000000000000000000000000 - m_OcclusionCullingData: {fileID: 0} ---- !u!104 &2 -RenderSettings: - m_ObjectHideFlags: 0 - serializedVersion: 8 - m_Fog: 0 - m_FogColor: {r: 0.5921569, g: 0.47450984, b: 0.2901961, a: 1} - m_FogMode: 3 - m_FogDensity: 0.01 - m_LinearFogStart: 0 - m_LinearFogEnd: 300 - m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} - m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} - m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} - m_AmbientIntensity: 1 - m_AmbientMode: 0 - m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} - m_SkyboxMaterial: {fileID: 2100000, guid: d8da8ee0c05959f40b595cff10460db1, type: 2} - m_HaloStrength: 0.5 - m_FlareStrength: 1 - m_FlareFadeSpeed: 3 - m_HaloTexture: {fileID: 0} - m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} - m_DefaultReflectionMode: 0 - m_DefaultReflectionResolution: 128 - m_ReflectionBounces: 1 - m_ReflectionIntensity: 1 - m_CustomReflection: {fileID: 0} - m_Sun: {fileID: 195910678} - m_IndirectSpecularColor: {r: 0.04364972, g: 0.07841372, b: 0.104287446, a: 1} ---- !u!157 &3 -LightmapSettings: - m_ObjectHideFlags: 0 - serializedVersion: 11 - m_GIWorkflowMode: 0 - m_GISettings: - serializedVersion: 2 - m_BounceScale: 1 - m_IndirectOutputScale: 1 - m_AlbedoBoost: 1 - m_TemporalCoherenceThreshold: 1 - m_EnvironmentLightingMode: 0 - m_EnableBakedLightmaps: 1 - m_EnableRealtimeLightmaps: 1 - m_LightmapEditorSettings: - serializedVersion: 9 - m_Resolution: 2 - m_BakeResolution: 40 - m_TextureWidth: 1024 - m_TextureHeight: 1024 - m_AO: 0 - m_AOMaxDistance: 1 - m_CompAOExponent: 1 - m_CompAOExponentDirect: 0 - m_Padding: 2 - m_LightmapParameters: {fileID: 0} - m_LightmapsBakeMode: 1 - m_TextureCompression: 1 - m_FinalGather: 0 - m_FinalGatherFiltering: 1 - m_FinalGatherRayCount: 256 - m_ReflectionCompression: 2 - m_MixedBakeMode: 2 - m_BakeBackend: 0 - m_PVRSampling: 1 - m_PVRDirectSampleCount: 32 - m_PVRSampleCount: 500 - m_PVRBounces: 2 - m_PVRFilterTypeDirect: 0 - m_PVRFilterTypeIndirect: 0 - m_PVRFilterTypeAO: 0 - m_PVRFilteringMode: 1 - m_PVRCulling: 1 - m_PVRFilteringGaussRadiusDirect: 1 - m_PVRFilteringGaussRadiusIndirect: 5 - m_PVRFilteringGaussRadiusAO: 2 - m_PVRFilteringAtrousPositionSigmaDirect: 0.5 - m_PVRFilteringAtrousPositionSigmaIndirect: 2 - m_PVRFilteringAtrousPositionSigmaAO: 1 - m_ShowResolutionOverlay: 1 - m_LightingDataAsset: {fileID: 0} - m_UseShadowmask: 1 ---- !u!196 &4 -NavMeshSettings: - serializedVersion: 2 - m_ObjectHideFlags: 0 - m_BuildSettings: - serializedVersion: 2 - agentTypeID: 0 - agentRadius: 0.5 - agentHeight: 2 - agentSlope: 45 - agentClimb: 0.4 - ledgeDropHeight: 0 - maxJumpAcrossDistance: 0 - minRegionArea: 2 - manualCellSize: 0 - cellSize: 0.16666667 - manualTileSize: 0 - tileSize: 256 - accuratePlacement: 0 - debug: - m_Flags: 0 - m_NavMeshData: {fileID: 0} ---- !u!1 &88184734 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 5 - m_Component: - - component: {fileID: 88184735} - - component: {fileID: 88184736} - m_Layer: 0 - m_Name: HomeBuffer - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &88184735 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 88184734} - 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: [] - m_Father: {fileID: 1635776204} - m_RootOrder: 6 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &88184736 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 88184734} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: afa75a2a1fe8aff4ab1d6418df9d62dd, type: 3} - m_Name: - m_EditorClassIdentifier: - bufferName: home_buffer ---- !u!1 &195910677 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 5 - m_Component: - - component: {fileID: 195910679} - - component: {fileID: 195910678} - m_Layer: 0 - m_Name: Directional Light - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!108 &195910678 -Light: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 195910677} - m_Enabled: 1 - serializedVersion: 8 - m_Type: 1 - m_Color: {r: 1, g: 0.93134546, b: 0.8715508, a: 1} - m_Intensity: 1 - m_Range: 10 - m_SpotAngle: 30 - m_CookieSize: 10 - m_Shadows: - m_Type: 2 - m_Resolution: -1 - m_CustomResolution: -1 - m_Strength: 1 - m_Bias: 0.05 - m_NormalBias: 0.4 - m_NearPlane: 0.2 - m_Cookie: {fileID: 0} - m_DrawHalo: 0 - m_Flare: {fileID: 0} - m_RenderMode: 0 - m_CullingMask: - serializedVersion: 2 - m_Bits: 4294967295 - m_Lightmapping: 4 - m_AreaSize: {x: 1, y: 1} - m_BounceIntensity: 1 - m_ColorTemperature: 6570 - m_UseColorTemperature: 0 - m_ShadowRadius: 0 - m_ShadowAngle: 0 ---- !u!4 &195910679 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 195910677} - m_LocalRotation: {x: 0.052217025, y: 0.9392279, z: -0.29613733, w: 0.16561128} - m_LocalPosition: {x: 0, y: 3, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 1 - m_LocalEulerAnglesHint: {x: 35, y: 160, z: 0} ---- !u!1 &300019303 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 5 - m_Component: - - component: {fileID: 300019305} - - component: {fileID: 300019304} - m_Layer: 0 - m_Name: Reflection Probe - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!215 &300019304 -ReflectionProbe: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 300019303} - m_Enabled: 1 - serializedVersion: 2 - m_Type: 0 - m_Mode: 1 - m_RefreshMode: 1 - m_TimeSlicingMode: 0 - m_Resolution: 128 - m_UpdateFrequency: 0 - m_BoxSize: {x: 100, y: 100, z: 100} - m_BoxOffset: {x: 0, y: 0, z: 0} - m_NearClip: 0.3 - m_FarClip: 1000 - m_ShadowDistance: 100 - m_ClearFlags: 1 - m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} - m_CullingMask: - serializedVersion: 2 - m_Bits: 4294967295 - m_IntensityMultiplier: 1 - m_BlendDistance: 1 - m_HDR: 1 - m_BoxProjection: 0 - m_RenderDynamicObjects: 0 - m_UseOcclusionCulling: 1 - m_Importance: 1 - m_CustomBakedTexture: {fileID: 0} ---- !u!4 &300019305 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 300019303} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0.5, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 4 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &505289391 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 5 - m_Component: - - component: {fileID: 505289392} - - component: {fileID: 505289393} - m_Layer: 0 - m_Name: ParticleViewerInstanced - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 0 ---- !u!4 &505289392 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 505289391} - 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: [] - m_Father: {fileID: 1635776204} - m_RootOrder: 4 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &505289393 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 505289391} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 6d8d9920ebddf6247accd7655895ed34, type: 3} - m_Name: - m_EditorClassIdentifier: - buffer: {fileID: 1503302983} - material: {fileID: 2100000, guid: cc1041196be864c4cbe1b6a6118fe495, type: 2} - reference: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!1 &590004640 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 5 - m_Component: - - component: {fileID: 590004641} - - component: {fileID: 590004642} - - component: {fileID: 590004644} - - component: {fileID: 590004643} - m_Layer: 0 - m_Name: ParticleViewerMesh - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &590004641 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 590004640} - 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: [] - m_Father: {fileID: 1635776204} - m_RootOrder: 3 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &590004642 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 590004640} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d54292eb10cbcf43a98b855de6807e7, type: 3} - m_Name: - m_EditorClassIdentifier: - buffer: {fileID: 1503302983} - material: {fileID: 2100000, guid: 6c404ebf6ff877a46a9ac3132b7c648d, type: 2} - shader: {fileID: 7200000, guid: 226ca53b2a6b1f34cb8e462337683d07, type: 3} - references: [] ---- !u!23 &590004643 -MeshRenderer: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 590004640} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_Materials: - - {fileID: 2100000, guid: 305605d3346fb2f4fbad85f4e832bed2, type: 2} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 0 - 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 &590004644 -MeshFilter: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 590004640} - m_Mesh: {fileID: 0} ---- !u!1 &670902531 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 5 - m_Component: - - component: {fileID: 670902532} - - component: {fileID: 670902535} - - component: {fileID: 670902534} - - component: {fileID: 670902533} - m_Layer: 0 - m_Name: Sphere - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &670902532 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 670902531} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 5, y: 5, z: 5} - m_Children: [] - m_Father: {fileID: 1610402962} - m_RootOrder: 1 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!23 &670902533 -MeshRenderer: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 670902531} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_Materials: - - {fileID: 2100000, guid: 305605d3346fb2f4fbad85f4e832bed2, type: 2} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_PreserveUVs: 1 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 0 - 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!135 &670902534 -SphereCollider: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 670902531} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - serializedVersion: 2 - m_Radius: 0.5 - m_Center: {x: 0, y: 0, z: 0} ---- !u!33 &670902535 -MeshFilter: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 670902531} - m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} ---- !u!1 &799393429 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 5 - m_Component: - - component: {fileID: 799393430} - - component: {fileID: 799393431} - m_Layer: 0 - m_Name: HomeVelocityBuffer - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &799393430 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 799393429} - 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: [] - m_Father: {fileID: 1635776204} - m_RootOrder: 7 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &799393431 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 799393429} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: afa75a2a1fe8aff4ab1d6418df9d62dd, type: 3} - m_Name: - m_EditorClassIdentifier: - bufferName: home_buffer ---- !u!1 &894860818 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 5 - m_Component: - - component: {fileID: 894860822} - - component: {fileID: 894860821} - - component: {fileID: 894860820} - - component: {fileID: 894860819} - - component: {fileID: 894860824} - - component: {fileID: 894860823} - m_Layer: 1 - m_Name: Main Camera - m_TagString: MainCamera - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!81 &894860819 -AudioListener: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 894860818} - m_Enabled: 1 ---- !u!124 &894860820 -Behaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 894860818} - m_Enabled: 1 ---- !u!20 &894860821 -Camera: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 894860818} - m_Enabled: 1 - serializedVersion: 2 - m_ClearFlags: 1 - m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} - m_NormalizedViewPortRect: - serializedVersion: 2 - x: 0 - y: 0 - width: 1 - height: 1 - near clip plane: 0.3 - far clip plane: 1000 - field of view: 60 - orthographic: 0 - orthographic size: 5 - m_Depth: -1 - m_CullingMask: - serializedVersion: 2 - m_Bits: 4294967295 - m_RenderingPath: 3 - m_TargetTexture: {fileID: 0} - m_TargetDisplay: 0 - m_TargetEye: 3 - m_HDR: 1 - m_AllowMSAA: 0 - m_AllowDynamicResolution: 0 - m_ForceIntoRT: 1 - m_OcclusionCulling: 1 - m_StereoConvergence: 10 - m_StereoSeparation: 0.022 ---- !u!4 &894860822 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 894860818} - m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071068} - m_LocalPosition: {x: -3, y: 10, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0} ---- !u!114 &894860823 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 894860818} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 8b9a305e18de0c04dbd257a21cd47087, type: 3} - m_Name: - m_EditorClassIdentifier: - sharedProfile: {fileID: 11400000, guid: 13848f592641d12488d9f26f621f4aea, type: 2} - isGlobal: 1 - blendDistance: 0 - weight: 1 - priority: 0 ---- !u!114 &894860824 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 894860818} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 948f4100a11a5c24981795d21301da5c, type: 3} - m_Name: - m_EditorClassIdentifier: - volumeTrigger: {fileID: 894860822} - volumeLayer: - serializedVersion: 2 - m_Bits: 2 - stopNaNPropagation: 1 - antialiasingMode: 2 - temporalAntialiasing: - jitterSpread: 0.75 - sharpness: 0.25 - stationaryBlending: 0.95 - motionBlending: 0.85 - subpixelMorphologicalAntialiasing: - quality: 2 - fastApproximateAntialiasing: - fastMode: 0 - keepAlpha: 0 - fog: - enabled: 1 - excludeSkybox: 1 - debugLayer: - lightMeter: - width: 512 - height: 256 - showCurves: 1 - histogram: - width: 512 - height: 256 - channel: 3 - waveform: - exposure: 0.12 - height: 256 - vectorscope: - size: 256 - exposure: 0.12 - overlaySettings: - motionColorIntensity: 4 - motionGridSize: 64 - colorBlindnessType: 0 - colorBlindnessStrength: 1 - m_Resources: {fileID: 11400000, guid: d82512f9c8e5d4a4d938b575d47f88d4, type: 2} - m_ShowToolkit: 0 - m_ShowCustomSorter: 0 - breakBeforeColorGrading: 0 - m_BeforeTransparentBundles: [] - m_BeforeStackBundles: [] - m_AfterStackBundles: [] ---- !u!1 &1183085976 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 5 - m_Component: - - component: {fileID: 1183085977} - - component: {fileID: 1183085980} - - component: {fileID: 1183085978} - m_Layer: 0 - m_Name: Cylinder - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1183085977 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1183085976} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: -6.58, z: 0} - m_LocalScale: {x: 100, y: 1, z: 100} - m_Children: [] - m_Father: {fileID: 1610402962} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!23 &1183085978 -MeshRenderer: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1183085976} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_Materials: - - {fileID: 2100000, guid: 54c13d9de6d77834994872fbf5c7082b, type: 2} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_PreserveUVs: 1 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 0 - 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 &1183085980 -MeshFilter: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1183085976} - m_Mesh: {fileID: 10206, guid: 0000000000000000e000000000000000, type: 0} ---- !u!1 &1297859255 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 5 - m_Component: - - component: {fileID: 1297859256} - - component: {fileID: 1297859257} - m_Layer: 0 - m_Name: ParticleUpdater - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1297859256 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1297859255} - 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: [] - m_Father: {fileID: 1635776204} - m_RootOrder: 1 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &1297859257 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1297859255} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 364a6df5fc849f7448e97efcaa6cefdc, type: 3} - m_Name: - m_EditorClassIdentifier: - reset: 0 - maxParticles: 100000 - particleBuffer: {fileID: 1503302983} - homeBuffer: {fileID: 88184736} - homeVelocityBuffer: {fileID: 799393431} - shader: {fileID: 7200000, guid: e08afbf5a516b754a8eb9de35a9f5e6a, type: 3} - uniformBuffer: {fileID: 1515258535} - cosineGradient: {fileID: 11400000, guid: 0b6d4f25fdc8b8448a67827d394f8c07, type: 2} - debug: ---- !u!1 &1503302982 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 5 - m_Component: - - component: {fileID: 1503302984} - - component: {fileID: 1503302983} - m_Layer: 0 - m_Name: StructuredBuffer - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &1503302983 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1503302982} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: afa75a2a1fe8aff4ab1d6418df9d62dd, type: 3} - m_Name: - m_EditorClassIdentifier: - bufferName: ssbo ---- !u!4 &1503302984 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1503302982} - 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: [] - m_Father: {fileID: 1635776204} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &1515258533 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 5 - m_Component: - - component: {fileID: 1515258534} - - component: {fileID: 1515258535} - - component: {fileID: 1515258536} - m_Layer: 0 - m_Name: Uniforms - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1515258534 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1515258533} - 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: [] - m_Father: {fileID: 1635776204} - m_RootOrder: 5 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &1515258535 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1515258533} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: de2687c4b3b02dc4ebc0495697f1cfb0, type: 3} - m_Name: - m_EditorClassIdentifier: - bufferName: uniform_buffer - uniform: {fileID: 11400000, guid: 01c39e7b96a04b24f87d437d0c5474e2, type: 2} ---- !u!114 &1515258536 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1515258533} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 799fd07762a67b348818cbe8e6502e21, type: 3} - m_Name: - m_EditorClassIdentifier: - impule: {fileID: 670902532} ---- !u!1 &1571173705 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 5 - m_Component: - - component: {fileID: 1571173706} - - component: {fileID: 1571173707} - m_Layer: 0 - m_Name: ParticleViewerProcedural - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 0 ---- !u!4 &1571173706 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1571173705} - 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: [] - m_Father: {fileID: 1635776204} - m_RootOrder: 2 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &1571173707 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1571173705} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: e2f970277ae55db488ae9e5e4d484912, type: 3} - m_Name: - m_EditorClassIdentifier: - buffer: {fileID: 1503302983} - material: {fileID: 2100000, guid: 2c82eba6891c0044f9854bb70b0da2ef, type: 2} ---- !u!1 &1610402961 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 5 - m_Component: - - component: {fileID: 1610402962} - m_Layer: 0 - m_Name: Ground - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1610402962 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1610402961} - 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: 1183085977} - - {fileID: 670902532} - m_Father: {fileID: 0} - m_RootOrder: 3 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &1635776202 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 5 - m_Component: - - component: {fileID: 1635776204} - m_Layer: 0 - m_Name: ParticleWorks - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1635776204 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1635776202} - 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: 1503302984} - - {fileID: 1297859256} - - {fileID: 1571173706} - - {fileID: 590004641} - - {fileID: 505289392} - - {fileID: 1515258534} - - {fileID: 88184735} - - {fileID: 799393430} - m_Father: {fileID: 0} - m_RootOrder: 2 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} diff --git a/Unity-19050-05-BallPool/Assets/ParticleWorks/ParticleWorks.unity.meta b/Unity-19050-05-BallPool/Assets/ParticleWorks/ParticleWorks.unity.meta deleted file mode 100644 index 0ea041c..0000000 --- a/Unity-19050-05-BallPool/Assets/ParticleWorks/ParticleWorks.unity.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 111e8696392ec08489338cded28613a2 -timeCreated: 1513312462 -licenseType: Free -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/ParticleWorks/Script.meta b/Unity-19050-05-BallPool/Assets/ParticleWorks/Script.meta deleted file mode 100644 index 550eedf..0000000 --- a/Unity-19050-05-BallPool/Assets/ParticleWorks/Script.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: fb695c06cfd78384791aea3307ffdafe -folderAsset: yes -timeCreated: 1513318441 -licenseType: Free -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/ParticleWorks/Script/BlendedCosineGradient.cs b/Unity-19050-05-BallPool/Assets/ParticleWorks/Script/BlendedCosineGradient.cs deleted file mode 100644 index 8acb4ef..0000000 --- a/Unity-19050-05-BallPool/Assets/ParticleWorks/Script/BlendedCosineGradient.cs +++ /dev/null @@ -1,25 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -namespace UltraCombos -{ - public class BlendedCosineGradient : MonoBehaviour - { - [SerializeField] - Klak.Chromatics.CosineGradient fromGradient = null; - - [SerializeField] - Klak.Chromatics.CosineGradient toGradient = null; - - [Range(0, 1)] - public float rate = 0.0f; - - public Vector3 coeffsA { get { return Vector3.Lerp(fromGradient.coeffsA, toGradient.coeffsA, rate); } } - public Vector3 coeffsB { get { return Vector3.Lerp(fromGradient.coeffsB, toGradient.coeffsB, rate); } } - public Vector3 coeffsC2 { get { return Vector3.Lerp(fromGradient.coeffsC2, toGradient.coeffsC2, rate); } } - public Vector3 coeffsD2 { get { return Vector3.Lerp(fromGradient.coeffsD2, toGradient.coeffsD2, rate); } } - - } -} - diff --git a/Unity-19050-05-BallPool/Assets/ParticleWorks/Script/BlendedCosineGradient.cs.meta b/Unity-19050-05-BallPool/Assets/ParticleWorks/Script/BlendedCosineGradient.cs.meta deleted file mode 100644 index 7455201..0000000 --- a/Unity-19050-05-BallPool/Assets/ParticleWorks/Script/BlendedCosineGradient.cs.meta +++ /dev/null @@ -1,13 +0,0 @@ -fileFormatVersion: 2 -guid: 47a33aaf81d9cd84190b40b44c73516c -timeCreated: 1525079670 -licenseType: Free -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/ParticleWorks/Script/Defines.cs b/Unity-19050-05-BallPool/Assets/ParticleWorks/Script/Defines.cs deleted file mode 100644 index 509a02b..0000000 --- a/Unity-19050-05-BallPool/Assets/ParticleWorks/Script/Defines.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -namespace UltraCombos -{ - public struct Particle - { - public Vector3 position; - public float seed; - public Color color; - public Vector3 velocity; - public float life; - public Vector4 quat; - public Matrix4x4 model_matrix; - }; -} \ No newline at end of file diff --git a/Unity-19050-05-BallPool/Assets/ParticleWorks/Script/Defines.cs.meta b/Unity-19050-05-BallPool/Assets/ParticleWorks/Script/Defines.cs.meta deleted file mode 100644 index a97693a..0000000 --- a/Unity-19050-05-BallPool/Assets/ParticleWorks/Script/Defines.cs.meta +++ /dev/null @@ -1,13 +0,0 @@ -fileFormatVersion: 2 -guid: dc08faa58ae0bd74684f723a22959463 -timeCreated: 1513318457 -licenseType: Free -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/ParticleWorks/Script/ExtensionMethods.cs b/Unity-19050-05-BallPool/Assets/ParticleWorks/Script/ExtensionMethods.cs deleted file mode 100644 index 7c85655..0000000 --- a/Unity-19050-05-BallPool/Assets/ParticleWorks/Script/ExtensionMethods.cs +++ /dev/null @@ -1,24 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -namespace UltraCombos -{ - public static class ExtensionMethods - { - public static ComputeBuffer CreateIndirectComputeArgsBuffer(this ComputeShader shader, int num_thread_x, int num_thread_y, int num_thread_z) - { - uint x, y, z; - shader.GetKernelThreadGroupSizes(0, out x, out y, out z); - uint[] args = new uint[3] - { - (uint)Mathf.CeilToInt((float)num_thread_x / x), - (uint)Mathf.CeilToInt((float)num_thread_y / y), - (uint)Mathf.CeilToInt((float)num_thread_z / z) - }; - var buf = new ComputeBuffer(1, args.Length * sizeof(uint), ComputeBufferType.IndirectArguments); - buf.SetData(args); - return buf; - } - } -} diff --git a/Unity-19050-05-BallPool/Assets/ParticleWorks/Script/ExtensionMethods.cs.meta b/Unity-19050-05-BallPool/Assets/ParticleWorks/Script/ExtensionMethods.cs.meta deleted file mode 100644 index 166d8e3..0000000 --- a/Unity-19050-05-BallPool/Assets/ParticleWorks/Script/ExtensionMethods.cs.meta +++ /dev/null @@ -1,13 +0,0 @@ -fileFormatVersion: 2 -guid: 71a803c8174401a42a8aab03320f61ab -timeCreated: 1513949514 -licenseType: Free -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/ParticleWorks/Script/MeshVertexCollect.cs b/Unity-19050-05-BallPool/Assets/ParticleWorks/Script/MeshVertexCollect.cs deleted file mode 100644 index 9ba4356..0000000 --- a/Unity-19050-05-BallPool/Assets/ParticleWorks/Script/MeshVertexCollect.cs +++ /dev/null @@ -1,91 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -namespace UltraCombos -{ - public class MeshVertexCollect : MonoBehaviour - { - public ComputeShader shader; - ComputeBuffer args_buffer = null; - [SerializeField] StructuredBuffer positionBuffer; - [SerializeField] StructuredBuffer velocityBuffer; - - List renderers; - List vertex_buffers; - - Mesh bake_mesh; - - private void Start() - { - renderers = new List(); - renderers.AddRange(GetComponentsInChildren()); - vertex_buffers = new List(); - - int sum = 0; - foreach (var rdr in renderers) - { - var m = rdr.sharedMesh; - var ptr = m.GetNativeVertexBufferPtr(0); - int size = Utility.Buffer.GetSize(ptr); - int count = m.vertexCount; - int stride = size / m.vertexCount; - sum += count; - - ComputeBuffer buf = new ComputeBuffer(count, stride); - Utility.Buffer.Copy(buf.GetNativeBufferPtr(), m.GetNativeVertexBufferPtr(0)); - vertex_buffers.Add(buf); - } - - positionBuffer.Allocate(sum, sizeof(float) * 4); - velocityBuffer.Allocate(sum, sizeof(float) * 4); - - args_buffer = shader.CreateIndirectComputeArgsBuffer(positionBuffer.count, 1, 1); - - bake_mesh = new Mesh(); - - } - - private void FixedUpdate() - { - for (int i = 0; i < renderers.Count; i++) - { - renderers[i].BakeMesh(bake_mesh); - Utility.Buffer.Copy(vertex_buffers[i].GetNativeBufferPtr(), bake_mesh.GetNativeVertexBufferPtr(0)); - } - - - int index = 0; - shader.SetBuffer(0, positionBuffer.bufferName, positionBuffer.obj); - shader.SetBuffer(0, velocityBuffer.bufferName, velocityBuffer.obj); - for (int i = 0; i < renderers.Count; i++) - //foreach (var buf in vertex_buffers) - { - var buf = vertex_buffers[i]; - shader.SetInt("index", index); - shader.SetInt("count", buf.count); - shader.SetMatrix("model_matrix", renderers[i].transform.localToWorldMatrix); - shader.SetBuffer(0, "vertex_buffer", buf); - shader.DispatchIndirect(0, args_buffer); - index += buf.count; - } - - - } - - private void OnDestroy() - { - if (args_buffer != null) - { - args_buffer.Release(); - args_buffer = null; - } - - foreach (var buf in vertex_buffers) - { - buf.Release(); - } - } - } - -} diff --git a/Unity-19050-05-BallPool/Assets/ParticleWorks/Script/MeshVertexCollect.cs.meta b/Unity-19050-05-BallPool/Assets/ParticleWorks/Script/MeshVertexCollect.cs.meta deleted file mode 100644 index f388567..0000000 --- a/Unity-19050-05-BallPool/Assets/ParticleWorks/Script/MeshVertexCollect.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 8eb9b37b2e6fe504c948b6b2ad22a38c -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/ParticleWorks/Script/ParticleUniformBridge.cs b/Unity-19050-05-BallPool/Assets/ParticleWorks/Script/ParticleUniformBridge.cs deleted file mode 100644 index f438c6a..0000000 --- a/Unity-19050-05-BallPool/Assets/ParticleWorks/Script/ParticleUniformBridge.cs +++ /dev/null @@ -1,29 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -namespace UltraCombos -{ - public class ParticleUniformBridge : MonoBehaviour - { - public Transform impule; - - UniformStructuredBuffer uniform_buffer; - - private void Start() - { - uniform_buffer = GetComponent(); - } - - private void FixedUpdate() - { - var uniforms = uniform_buffer.uniform as ParticleUniforms; - - if (impule != null) - { - uniforms.impulsePosition = impule.position; - } - } - } -} - diff --git a/Unity-19050-05-BallPool/Assets/ParticleWorks/Script/ParticleUniformBridge.cs.meta b/Unity-19050-05-BallPool/Assets/ParticleWorks/Script/ParticleUniformBridge.cs.meta deleted file mode 100644 index 1c61f66..0000000 --- a/Unity-19050-05-BallPool/Assets/ParticleWorks/Script/ParticleUniformBridge.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 799fd07762a67b348818cbe8e6502e21 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/ParticleWorks/Script/ParticleUniforms.cs b/Unity-19050-05-BallPool/Assets/ParticleWorks/Script/ParticleUniforms.cs deleted file mode 100644 index ab080fe..0000000 --- a/Unity-19050-05-BallPool/Assets/ParticleWorks/Script/ParticleUniforms.cs +++ /dev/null @@ -1,63 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -namespace UltraCombos -{ - [CreateAssetMenu(menuName = "UltraCombos/ParticleUniforms", fileName = "ParticleUniforms", order = 1000)] - public class ParticleUniforms : ScriptableObject - { - [Header("General")] - //[Range(1, 1 << 21)] - //public int maxParticles = 1 << 20; - //[Range(0, 1)] - //public int isEmit = 1; - [Range(0, 1)] - public float numRate = 1.0f; - [Range(0, 10)] - public float movement = 1.0f; - [Range(0, 1)] - public float geomSize = 0.01f; - //[Range(0, 1)] - //public float colorize = 1.0f; - [Range(0, 1)] - public float velocityDamping = 1.0f; - - [Header("Life")] - [Range(0, 60)] - public float lifeDuration = 0.0f; - [Range(0, 1)] - public float lifeVariation = 0.0f; - - [Header("Convergence")] - [Range(0, 1)] - public float convergence = 0.0f; - - [Header("Home")] - [Range(0, 1)] - public float homeStrength = 0.0f; - - [Header("Noise")] - [Range(0, 1)] - public float noiseStrength = 0.0f; - [Range(0, 1)] - public float noiseSeed = 0.5f; - [Range(0, 1)] - public float noiseTimeScale = 1.0f; - [Range(0, 1)] - public float noiseFrequency = 0.5f; - - [Header("Directional Force")] - public Vector3 forceDirection; - [Range(0, 1)] - public float forceStrength = 0.0f; - - [Header("Impulse Force")] - public Vector3 impulsePosition; - [Range(0, 10)] - public float impulseRadius = 1.0f; - [Range(-1, 1)] - public float impulseStrength = 0.0f; - - } -} diff --git a/Unity-19050-05-BallPool/Assets/ParticleWorks/Script/ParticleUniforms.cs.meta b/Unity-19050-05-BallPool/Assets/ParticleWorks/Script/ParticleUniforms.cs.meta deleted file mode 100644 index 1a16794..0000000 --- a/Unity-19050-05-BallPool/Assets/ParticleWorks/Script/ParticleUniforms.cs.meta +++ /dev/null @@ -1,13 +0,0 @@ -fileFormatVersion: 2 -guid: 852ced439e5120c44bd352e9c29a164f -timeCreated: 1513320246 -licenseType: Free -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/ParticleWorks/Script/ParticleUpdater.cs b/Unity-19050-05-BallPool/Assets/ParticleWorks/Script/ParticleUpdater.cs deleted file mode 100644 index 48b8843..0000000 --- a/Unity-19050-05-BallPool/Assets/ParticleWorks/Script/ParticleUpdater.cs +++ /dev/null @@ -1,105 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -namespace UltraCombos -{ - public class ParticleUpdater : MonoBehaviour - { - public bool reset = false; - [Range(1, 1 << 20)] - public int maxParticles = 1 << 15; - public StructuredBuffer particleBuffer = null; - List buffer_data = null; - public StructuredBuffer homeBuffer = null; - public StructuredBuffer homeVelocityBuffer = null; - - public ComputeShader shader = null; - ComputeBuffer args_buffer = null; - - public UniformStructuredBuffer uniformBuffer; - - public Klak.Chromatics.CosineGradient cosineGradient = null; - - bool is_initialized = false; - - [SerializeField] - string debug; - - private void Start() - { - StartCoroutine(Initialize()); - } - - private void FixedUpdate() - { - if (is_initialized == false) - return; - - if (reset) - { - reset = false; - OnReset(); - } - - UpdateParticle(Time.fixedDeltaTime); - } - - private void OnDestroy() - { - Utilities.Release(ref args_buffer); - } - - private void OnReset() - { - particleBuffer.SetData(buffer_data); - } - - private IEnumerator Initialize() - { -#if false - { - uint[] args = new uint[3] { (uint)Mathf.CeilToInt((float)maxHomes / WORK_GROUP_SIZE), 1, 1 }; - home_args_buffer = new ComputeBuffer(1, args.Length * sizeof(uint), ComputeBufferType.IndirectArguments); - home_args_buffer.SetData(args); - } -#endif - { - args_buffer = shader.CreateIndirectComputeArgsBuffer(maxParticles, 1, 1); - } - - { - buffer_data = new List(); - yield return Utilities.GetRandomParticleData(maxParticles, buffer_data); - } - - is_initialized = true; - OnReset(); - } - - private void UpdateParticle(float time_step) - { - { - shader.SetFloat("timeStep", time_step); - shader.SetFloat("timeValue", Utilities.GetTimeValue()); - shader.SetInt("home_count", homeBuffer.IsValid ? homeBuffer.count : 0); - shader.SetFloat("bufferCount", particleBuffer.count); - - if (cosineGradient != null) - { - shader.SetVector("coeffsA", cosineGradient.coeffsA); - shader.SetVector("coeffsB", cosineGradient.coeffsB); - shader.SetVector("coeffsC", cosineGradient.coeffsC2); - shader.SetVector("coeffsD", cosineGradient.coeffsD2); - } - - shader.SetBuffer(0, particleBuffer.bufferName, particleBuffer.obj); - shader.SetBuffer(0, uniformBuffer.bufferName, uniformBuffer.obj); - if (homeBuffer.IsValid) shader.SetBuffer(0, homeBuffer.bufferName, homeBuffer.obj); - if (homeVelocityBuffer.IsValid) shader.SetBuffer(0, homeVelocityBuffer.bufferName, homeVelocityBuffer.obj); - - shader.DispatchIndirect(0, args_buffer); - } - } - } -} \ No newline at end of file diff --git a/Unity-19050-05-BallPool/Assets/ParticleWorks/Script/ParticleUpdater.cs.meta b/Unity-19050-05-BallPool/Assets/ParticleWorks/Script/ParticleUpdater.cs.meta deleted file mode 100644 index 9d93793..0000000 --- a/Unity-19050-05-BallPool/Assets/ParticleWorks/Script/ParticleUpdater.cs.meta +++ /dev/null @@ -1,13 +0,0 @@ -fileFormatVersion: 2 -guid: 364a6df5fc849f7448e97efcaa6cefdc -timeCreated: 1513317911 -licenseType: Free -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/ParticleWorks/Script/ParticleViewer.cs b/Unity-19050-05-BallPool/Assets/ParticleWorks/Script/ParticleViewer.cs deleted file mode 100644 index d1ed119..0000000 --- a/Unity-19050-05-BallPool/Assets/ParticleWorks/Script/ParticleViewer.cs +++ /dev/null @@ -1,72 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -namespace UltraCombos -{ - public class ParticleViewer : MonoBehaviour - { - public StructuredBuffer buffer; - public Material material; - - public bool Initialized { get { return is_initialized; } } - bool is_initialized = false; - - private IEnumerator Start() - { - while (buffer.count == 0) - yield return null; - - OnStart(); - yield return Initialize(); - - is_initialized = true; - } - - private void Update() - { - if (is_initialized == false) - return; - OnUpdate(); - } - - private void FixedUpdate() - { - if (is_initialized == false) - return; - OnFixedUpdate(); - } - - private void OnDestroy() - { - Release(); - } - - protected virtual void OnStart() - { - - } - - protected virtual void OnUpdate() - { - - } - - protected virtual void OnFixedUpdate() - { - - } - - protected virtual IEnumerator Initialize() - { - is_initialized = true; - yield return null; - } - - protected virtual void Release() - { - - } - } -} - diff --git a/Unity-19050-05-BallPool/Assets/ParticleWorks/Script/ParticleViewer.cs.meta b/Unity-19050-05-BallPool/Assets/ParticleWorks/Script/ParticleViewer.cs.meta deleted file mode 100644 index b002802..0000000 --- a/Unity-19050-05-BallPool/Assets/ParticleWorks/Script/ParticleViewer.cs.meta +++ /dev/null @@ -1,13 +0,0 @@ -fileFormatVersion: 2 -guid: f9b1db6ec9855f941a3be0a6979d3bda -timeCreated: 1513320747 -licenseType: Free -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/ParticleWorks/Script/ParticleViewerInstanced.cs b/Unity-19050-05-BallPool/Assets/ParticleWorks/Script/ParticleViewerInstanced.cs deleted file mode 100644 index 22a96db..0000000 --- a/Unity-19050-05-BallPool/Assets/ParticleWorks/Script/ParticleViewerInstanced.cs +++ /dev/null @@ -1,41 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -namespace UltraCombos -{ - public class ParticleViewerInstanced : ParticleViewer - { - public Mesh reference; - Bounds bounds; - ComputeBuffer args_buffer = null; - MaterialPropertyBlock props = null; - - protected override void OnUpdate() - { - props.SetMatrix("model_matrix", transform.localToWorldMatrix); - Graphics.DrawMeshInstancedIndirect(reference, 0, material, bounds, args_buffer, 0, props); - } - - protected override IEnumerator Initialize() - { - bounds = new Bounds(Vector3.zero, Vector3.one * 100); - - // index count per instance, instance count, start index location, base vertex location, start instance location - var args = new uint[5] { reference.GetIndexCount(0), (uint)buffer.count, 0, 0, 0 }; - args_buffer = new ComputeBuffer(1, args.Length * sizeof(uint), ComputeBufferType.IndirectArguments); - args_buffer.SetData(args); - - props = new MaterialPropertyBlock(); - props.SetBuffer(buffer.bufferName, buffer.obj); - - yield return null; - } - - protected override void Release() - { - Utilities.Release(ref args_buffer); - } - } -} - diff --git a/Unity-19050-05-BallPool/Assets/ParticleWorks/Script/ParticleViewerInstanced.cs.meta b/Unity-19050-05-BallPool/Assets/ParticleWorks/Script/ParticleViewerInstanced.cs.meta deleted file mode 100644 index 80ad788..0000000 --- a/Unity-19050-05-BallPool/Assets/ParticleWorks/Script/ParticleViewerInstanced.cs.meta +++ /dev/null @@ -1,13 +0,0 @@ -fileFormatVersion: 2 -guid: 6d8d9920ebddf6247accd7655895ed34 -timeCreated: 1513320747 -licenseType: Free -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/ParticleWorks/Script/ParticleViewerMesh.cs b/Unity-19050-05-BallPool/Assets/ParticleWorks/Script/ParticleViewerMesh.cs deleted file mode 100644 index 054576c..0000000 --- a/Unity-19050-05-BallPool/Assets/ParticleWorks/Script/ParticleViewerMesh.cs +++ /dev/null @@ -1,125 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -namespace UltraCombos -{ - [RequireComponent(typeof(MeshFilter))] - [RequireComponent(typeof(MeshRenderer))] - public class ParticleViewerMesh : ParticleViewer - { - public ComputeShader shader; - ComputeBuffer args_buffer = null; - ComputeBuffer origin_buffer = null; - ComputeBuffer vertex_buffer = null; - public List references; - Mesh mesh = null; - System.IntPtr mesh_buffer_handle; - - public ComputeBuffer vertexBuffer { get { return vertex_buffer; } } - - int buffer_count = 0; - public int BufferCount { set { buffer_count = value; } } - - protected override void OnFixedUpdate() - { - shader.SetBuffer(0, buffer.bufferName, buffer.obj); - shader.SetBuffer(0, "origin_buffer", origin_buffer); - shader.SetBuffer(0, "vertex_buffer", vertex_buffer); - shader.DispatchIndirect(0, args_buffer); - - Utility.Buffer.Copy(mesh_buffer_handle, vertex_buffer.GetNativeBufferPtr()); - } - - protected override void OnUpdate() - { - material.SetBuffer(buffer.bufferName, buffer.obj); - - } - - protected override void Release() - { - if (origin_buffer != null) - { - origin_buffer.Release(); - origin_buffer = null; - } - - if (vertex_buffer != null) - { - vertex_buffer.Release(); - vertex_buffer = null; - } - - if (args_buffer != null) - { - args_buffer.Release(); - args_buffer = null; - } - } - - protected override IEnumerator Initialize() - { - if (references.Count == 0) - { - var vertices = new List(); - var normals = new List(); - var colors = new List(); - var uvs = new List(); - var indices = new List(); - int side = 3; - float delta = Mathf.PI * 2.0f / side; - for (int i = 0; i < side; i++) - { - float a = -delta * i; - float x = Mathf.Cos(a); - float y = Mathf.Sin(a); - vertices.Add(new Vector3(x, 0, y)); - normals.Add(new Vector3(0, 1, 0)); - colors.Add(Color.white); - uvs.Add(new Vector2(x * 0.5f + 0.5f, y * 0.5f + 0.5f)); - indices.Add(i); - } - var m = new Mesh(); - m.SetVertices(vertices); - m.SetNormals(normals); - m.SetColors(colors); - m.SetUVs(0, uvs); - m.SetIndices(indices.ToArray(), MeshTopology.Triangles, 0); - m.UploadMeshData(false); - m.name = string.Format("{0} sides mesh", side); - references.Add(m); - } - - mesh = new Mesh(); - int max_particles = buffer_count > 0 ? buffer_count : buffer.count; - yield return Utilities.GetReferencesParticleMesh(references, max_particles, mesh); - - { - mesh.name = string.Format("v: {0}", mesh.vertexCount); - var mesh_filter = GetComponent(); - mesh_filter.sharedMesh = mesh; - //var mesh_renderer = GetComponent(); - //mesh_renderer.material = material; - //mesh_renderer.allowOcclusionWhenDynamic = false; - } - - { - mesh_buffer_handle = mesh.GetNativeVertexBufferPtr(0); - int size = Utility.Buffer.GetSize(mesh_buffer_handle); - int count = mesh.vertexCount; - int stride = size / count; - //print("size: " + size); - //print("count: " + count); - //print("stride: " + stride); - origin_buffer = new ComputeBuffer(count, stride); - Utility.Buffer.Copy(origin_buffer.GetNativeBufferPtr(), mesh_buffer_handle); - vertex_buffer = new ComputeBuffer(count, stride); - Utility.Buffer.Copy(vertex_buffer.GetNativeBufferPtr(), mesh_buffer_handle); - - args_buffer = shader.CreateIndirectComputeArgsBuffer(count, 1, 1); - } - } - } -} - diff --git a/Unity-19050-05-BallPool/Assets/ParticleWorks/Script/ParticleViewerMesh.cs.meta b/Unity-19050-05-BallPool/Assets/ParticleWorks/Script/ParticleViewerMesh.cs.meta deleted file mode 100644 index 936560e..0000000 --- a/Unity-19050-05-BallPool/Assets/ParticleWorks/Script/ParticleViewerMesh.cs.meta +++ /dev/null @@ -1,14 +0,0 @@ -fileFormatVersion: 2 -guid: 4d54292eb10cbcf43a98b855de6807e7 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: - - buffer: {instanceID: 0} - - material: {instanceID: 0} - - shader: {fileID: 7200000, guid: 226ca53b2a6b1f34cb8e462337683d07, type: 3} - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/ParticleWorks/Script/ParticleViewerProcedural.cs b/Unity-19050-05-BallPool/Assets/ParticleWorks/Script/ParticleViewerProcedural.cs deleted file mode 100644 index aadf360..0000000 --- a/Unity-19050-05-BallPool/Assets/ParticleWorks/Script/ParticleViewerProcedural.cs +++ /dev/null @@ -1,48 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -namespace UltraCombos -{ - public class ParticleViewerProcedural : ParticleViewer - { - ComputeBuffer args_buffer = null; - public int VertexCount { set { vertex_count = value; } } - int vertex_count = -1; - public bool cullingMask = false; - - private void OnRenderObject() - { - if (Initialized == false) - return; - if (Utilities.SkipCamera(Camera.current.name)) - return; - int mask = Camera.current.cullingMask; - if (cullingMask && mask > -1 && mask != 1 << gameObject.layer) - return; - - material.SetPass(0); - material.SetMatrix("model_matrix", transform.localToWorldMatrix); - material.SetBuffer(buffer.bufferName, buffer.obj); - if (vertex_count < 0) - Graphics.DrawProceduralIndirect(MeshTopology.Points, args_buffer); - else - Graphics.DrawProcedural(MeshTopology.Points, vertex_count, 1); - } - - protected override IEnumerator Initialize() - { - var args = new uint[4] { (uint)buffer.count, 1, 0, 0 }; - args_buffer = new ComputeBuffer(1, args.Length * sizeof(uint), ComputeBufferType.IndirectArguments); - args_buffer.SetData(args); - - yield return null; - } - - protected override void Release() - { - Utilities.Release(ref args_buffer); - } - } -} - diff --git a/Unity-19050-05-BallPool/Assets/ParticleWorks/Script/ParticleViewerProcedural.cs.meta b/Unity-19050-05-BallPool/Assets/ParticleWorks/Script/ParticleViewerProcedural.cs.meta deleted file mode 100644 index 58e0e06..0000000 --- a/Unity-19050-05-BallPool/Assets/ParticleWorks/Script/ParticleViewerProcedural.cs.meta +++ /dev/null @@ -1,13 +0,0 @@ -fileFormatVersion: 2 -guid: e2f970277ae55db488ae9e5e4d484912 -timeCreated: 1513320747 -licenseType: Free -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/ParticleWorks/Script/ParticleWorks.cs b/Unity-19050-05-BallPool/Assets/ParticleWorks/Script/ParticleWorks.cs deleted file mode 100644 index b31f081..0000000 --- a/Unity-19050-05-BallPool/Assets/ParticleWorks/Script/ParticleWorks.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -public class ParticleWorks : MonoBehaviour -{ - - void Start() - { - - } - - void Update() - { - - } -} diff --git a/Unity-19050-05-BallPool/Assets/ParticleWorks/Script/ParticleWorks.cs.meta b/Unity-19050-05-BallPool/Assets/ParticleWorks/Script/ParticleWorks.cs.meta deleted file mode 100644 index b2fbfac..0000000 --- a/Unity-19050-05-BallPool/Assets/ParticleWorks/Script/ParticleWorks.cs.meta +++ /dev/null @@ -1,13 +0,0 @@ -fileFormatVersion: 2 -guid: 516d0ee655a0aa54bb9a8f6205b6fb4e -timeCreated: 1513308272 -licenseType: Free -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/ParticleWorks/Script/StructuredBuffer.cs b/Unity-19050-05-BallPool/Assets/ParticleWorks/Script/StructuredBuffer.cs deleted file mode 100644 index b458d3b..0000000 --- a/Unity-19050-05-BallPool/Assets/ParticleWorks/Script/StructuredBuffer.cs +++ /dev/null @@ -1,72 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -namespace UltraCombos -{ - public class StructuredBuffer : MonoBehaviour - { - public string bufferName = "ssbo"; - public int count { get { return (buffer != null) ? buffer.count : 0; } } - public int stride { get { return (buffer != null) ? buffer.stride : 0; } } - public ComputeBuffer obj { get { return buffer; } } - ComputeBuffer buffer = null; - public bool IsValid { get { return (buffer != null); } } - - System.IntPtr pointer; - public System.IntPtr handle - { - get - { - if (pointer == System.IntPtr.Zero) - pointer = obj.GetNativeBufferPtr(); - return pointer; - } - } - -#if false - [SerializeField] string debug; - private void FixedUpdate() - { - debug = string.Format("count: {0}, stride: {1}", count, stride); - } -#endif - - private void OnDestroy() - { - Release(); - } - - public void Allocate(int count, int stride) - { - Release(); - buffer = new ComputeBuffer(count, stride, ComputeBufferType.Default); - //Debug.LogFormat("ALLOCATE: count({0}), stride({1})", count, stride); - } - - public void SetData(List data) - { - int data_count = data.Count; - int data_stride = System.Runtime.InteropServices.Marshal.SizeOf(typeof(T)); - - if (buffer == null) - { - Allocate(data_count, data_stride); - } - else if (buffer.count * buffer.stride != data_count * data_stride) - { - Allocate(data_count, data_stride); - } - - buffer.SetData(data); - } - - public void Release() - { - if (buffer != null) - { - buffer.Release(); - } - } - } -} \ No newline at end of file diff --git a/Unity-19050-05-BallPool/Assets/ParticleWorks/Script/StructuredBuffer.cs.meta b/Unity-19050-05-BallPool/Assets/ParticleWorks/Script/StructuredBuffer.cs.meta deleted file mode 100644 index cfaf074..0000000 --- a/Unity-19050-05-BallPool/Assets/ParticleWorks/Script/StructuredBuffer.cs.meta +++ /dev/null @@ -1,13 +0,0 @@ -fileFormatVersion: 2 -guid: afa75a2a1fe8aff4ab1d6418df9d62dd -timeCreated: 1513311430 -licenseType: Free -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/ParticleWorks/Script/UniformBlendedStructuredBuffer.cs b/Unity-19050-05-BallPool/Assets/ParticleWorks/Script/UniformBlendedStructuredBuffer.cs deleted file mode 100644 index bae8e44..0000000 --- a/Unity-19050-05-BallPool/Assets/ParticleWorks/Script/UniformBlendedStructuredBuffer.cs +++ /dev/null @@ -1,28 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -namespace UltraCombos -{ - public class UniformBlendedStructuredBuffer : UniformStructuredBuffer - { - public ScriptableObject subUniform; - [Range(0, 1)] - public float rate; - - protected override void FixedUpdate() - { - var data = GetData(uniform); - var sub_data = GetData(subUniform); - - float v = Mathf.Clamp01(rate); - var res = new List(); - for (int i = 0; i < data.Count; i++) - { - res.Add(Mathf.Lerp(data[i], sub_data[i], v)); - } - SetData(res); - } - } -} - diff --git a/Unity-19050-05-BallPool/Assets/ParticleWorks/Script/UniformBlendedStructuredBuffer.cs.meta b/Unity-19050-05-BallPool/Assets/ParticleWorks/Script/UniformBlendedStructuredBuffer.cs.meta deleted file mode 100644 index 9c80cc7..0000000 --- a/Unity-19050-05-BallPool/Assets/ParticleWorks/Script/UniformBlendedStructuredBuffer.cs.meta +++ /dev/null @@ -1,13 +0,0 @@ -fileFormatVersion: 2 -guid: 3b2b572af25338e4594570cf0c8a1806 -timeCreated: 1525076508 -licenseType: Free -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/ParticleWorks/Script/UniformStructuredBuffer.cs b/Unity-19050-05-BallPool/Assets/ParticleWorks/Script/UniformStructuredBuffer.cs deleted file mode 100644 index f476a94..0000000 --- a/Unity-19050-05-BallPool/Assets/ParticleWorks/Script/UniformStructuredBuffer.cs +++ /dev/null @@ -1,81 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -namespace UltraCombos -{ - public class UniformStructuredBuffer : StructuredBuffer - { - public ScriptableObject uniform; - - void Start() - { - int stride = GetStride(uniform.GetType()); - Allocate(stride / sizeof(float), sizeof(float)); - //Debug.LogFormat("stride: {0}", stride); - } - - protected virtual void FixedUpdate() - { - var data = GetData(uniform); - SetData(data); - } - - protected int GetStride(System.Type type) - { - int res = 0; - foreach (var field in type.GetFields()) - { - int s = System.Runtime.InteropServices.Marshal.SizeOf(field.FieldType); - res += s; - //Debug.LogFormat("{0}: {1}", field.Name, s); - } - return res; - } - - protected List GetData(object obj) - { - List values = new List(); - foreach (var field in obj.GetType().GetFields()) - { - var value = field.GetValue(obj); - - if (field.FieldType.Equals(typeof(int))) - { - values.Add((int)value); - } - else if (field.FieldType.Equals(typeof(float))) - { - values.Add((float)value); - } - else if (field.FieldType.Equals(typeof(Vector2))) - { - var v = (Vector2)value; - values.Add(v.x); - values.Add(v.y); - } - else if (field.FieldType.Equals(typeof(Vector3))) - { - var v = (Vector3)value; - values.Add(v.x); - values.Add(v.y); - values.Add(v.z); - } - else if (field.FieldType.Equals(typeof(Vector4))) - { - var v = (Vector4)value; - values.Add(v.x); - values.Add(v.y); - values.Add(v.z); - values.Add(v.w); - } - else - { - Debug.LogFormat("Field is invalid: {0} - {1}", field.Name, field.FieldType); - } - } - return values; - } - } -} - diff --git a/Unity-19050-05-BallPool/Assets/ParticleWorks/Script/UniformStructuredBuffer.cs.meta b/Unity-19050-05-BallPool/Assets/ParticleWorks/Script/UniformStructuredBuffer.cs.meta deleted file mode 100644 index 1f245a9..0000000 --- a/Unity-19050-05-BallPool/Assets/ParticleWorks/Script/UniformStructuredBuffer.cs.meta +++ /dev/null @@ -1,13 +0,0 @@ -fileFormatVersion: 2 -guid: de2687c4b3b02dc4ebc0495697f1cfb0 -timeCreated: 1513427579 -licenseType: Free -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/ParticleWorks/Script/Utilities.cs b/Unity-19050-05-BallPool/Assets/ParticleWorks/Script/Utilities.cs deleted file mode 100644 index 4b5cd5e..0000000 --- a/Unity-19050-05-BallPool/Assets/ParticleWorks/Script/Utilities.cs +++ /dev/null @@ -1,214 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using System.Linq; -using UnityEngine; - -namespace UltraCombos -{ - public class Utilities - { - const float TWO_PI = Mathf.PI * 2.0f; - - public static float[] GetShuffleSeeds(int num) - { - List sources = new List(); - for (uint i = 0; i < num; i++) - sources.Add((float)i / num); - var rnd = new System.Random(); - return sources.OrderBy(item => rnd.Next()).ToArray(); - } - - public static Mesh[] GetUVIndexPolygons(int maxParticles, int side, float radius, float randomRadius = 0.0f, float startAngle = 0) - { -#if UNITY_2017_3_OR_NEWER - int num_meshes = 1; -#else - int limit = 65000; - int num_vertices = maxParticles * side; - int num_meshes = (num_vertices + limit - 1) / limit; -#endif - int ptc_per_mesh = maxParticles / num_meshes; - - Mesh[] meshes = new Mesh[num_meshes]; - - float r_mul = Mathf.Clamp01(randomRadius); - float r_max = radius * (1.0f + r_mul); - float r_min = radius * (1.0f - r_mul); - - for (int i = 0; i < num_meshes; i++) - { - var vertices = new List(); - var uvs = new List(); - var normals = new List(); - var indices = new List(); - - for (int j = 0; j < ptc_per_mesh; j++) - { - int index = i * ptc_per_mesh + j; - float delta_a = TWO_PI / side; - - for (uint k = 0; k < side; k++) - { - float a = delta_a * k + Mathf.PI / 4; - float x = Mathf.Cos(a); - float y = Mathf.Sin(a); - float r = Random.Range(r_min, r_max); - vertices.Add(new Vector3(x * r, y * r, 0)); - uvs.Add(new Vector4(x * 0.5f + 0.5f, y * 0.5f + 0.5f, index, k)); - normals.Add(new Vector3(0, 0, 1)); - } - - for (int k = 0; k < side - 2; k++) - { - indices.Add(j * side + 0); - indices.Add(j * side + k + 1); - indices.Add(j * side + k + 2); - } - } - - meshes[i] = new Mesh(); -#if UNITY_2017_3_OR_NEWER - meshes[i].indexFormat = UnityEngine.Rendering.IndexFormat.UInt32; -#endif - meshes[i].SetVertices(vertices); - meshes[i].SetUVs(0, uvs); - meshes[i].SetNormals(normals); - meshes[i].SetIndices(indices.ToArray(), MeshTopology.Triangles, 0); - meshes[i].bounds = new Bounds(Vector3.zero, Vector3.one * 100.0f); - } - - return meshes; - } - - public static float GetTimeValue() - { - uint interval = 100000; - uint milli_time = (uint)(Time.time * 1000); - float value = milli_time % interval / (float)interval; - return Mathf.Sin(value * TWO_PI) * 0.5f + 0.5f; // continuous sin value - } - - public static void Release(ref ComputeBuffer buffer) - { - if (buffer != null) - buffer.Release(); - buffer = null; - } - - static List skip_camera_names = null; - public static bool SkipCamera(string name) - { - if (skip_camera_names == null) - skip_camera_names = new List() { "Preview Camera", "Preview Scene Camera" }; - return skip_camera_names.Contains(name); - } - - public static IEnumerator GetRandomParticleData(int amount, List result) - { - List seeds = new List(); - seeds.AddRange(GetShuffleSeeds(amount)); - List factors = new List(); - factors.AddRange(GetShuffleSeeds(amount)); - - float radius = 2.0f; - const int mod = 1 << 13; - for (int i = 0; i < amount; i++) - { - float x = Random.Range(-1.0f, 1.0f); - float y = Random.Range(-1.0f, 1.0f); - float z = Random.Range(-1.0f, 1.0f); - float r = Mathf.Pow(Random.Range(0.0f, 1.0f), 1.0f / 2.2f) * radius; - Vector3 pos = (new Vector3(x, y, z)).normalized * r; - - Particle p = new Particle(); - p.position = pos; - p.seed = seeds[i]; - p.color = new Vector4(1, 1, 1, factors[i]); - p.velocity = Vector3.zero; - p.life = Random.Range(1.0f, 0.0f); - var q = Random.rotation; - p.quat = new Vector4(q.x, q.y, q.z, q.w); - p.model_matrix = Matrix4x4.identity; - result.Add(p); - - if (i % mod == 0) - { - yield return null; - } - } - } - - public static IEnumerator GetReferencesParticleMesh(List referenceMeshes, int maxParticles, Mesh result) - { - int totalVertexCount = 0; - foreach (var m in referenceMeshes) - totalVertexCount += m.vertexCount; - int max_particles = maxParticles / referenceMeshes.Count; - int num_meshes = 1; - int ptc_per_mesh = max_particles / num_meshes; - - //for (int i = 0; i < num_meshes; i++) - { - int i = 0; - var vertices = new List(); - var normals = new List(); - var colors = new List(); - var uvs = new List(); - var indices = new List(); - var custom_uvs = new List(); - int begin_index = 0; - for (int j = 0; j < ptc_per_mesh; j++) - { - for (int k = 0; k < referenceMeshes.Count; k++) - { - int index = (i * ptc_per_mesh + j) * referenceMeshes.Count + k; - var mesh = referenceMeshes[k]; - vertices.AddRange(mesh.vertices); - normals.AddRange(mesh.normals); - uvs.AddRange(mesh.uv); - if (mesh.colors.Length == mesh.vertices.Length) - { - colors.AddRange(mesh.colors); - } - else - { - for (int ci = 0; ci < mesh.vertices.Length; ci++) - colors.Add(Color.white); - } - foreach (var idx in mesh.GetIndices(0)) - indices.Add(begin_index + idx); - for (int l = 0; l < mesh.vertexCount; l++) - custom_uvs.Add(new Vector4(mesh.uv[l].x, mesh.uv[l].y, index, k)); - begin_index += mesh.vertexCount; - } - - if (j % 1024 == 0) - { - yield return null; - } - - } - - //Mesh m = new Mesh(); - if (vertices.Count > 65000) - result.indexFormat = UnityEngine.Rendering.IndexFormat.UInt32; - result.SetVertices(vertices); - result.SetNormals(normals); - if (colors.Count == vertices.Count) - { - result.SetColors(colors); - } - //result.SetUVs(0, uvs); - result.SetUVs(0, custom_uvs); - result.SetIndices(indices.ToArray(), referenceMeshes[0].GetTopology(0), 0); - result.bounds = new Bounds(Vector3.zero, Vector3.one * 100); - result.UploadMeshData(false); - //meshes.Add(m); - } - - yield return null; - } - } -} - - diff --git a/Unity-19050-05-BallPool/Assets/ParticleWorks/Script/Utilities.cs.meta b/Unity-19050-05-BallPool/Assets/ParticleWorks/Script/Utilities.cs.meta deleted file mode 100644 index bd6b883..0000000 --- a/Unity-19050-05-BallPool/Assets/ParticleWorks/Script/Utilities.cs.meta +++ /dev/null @@ -1,13 +0,0 @@ -fileFormatVersion: 2 -guid: 5ff350006f0c04048b030f5f5ac6bfac -timeCreated: 1513318561 -licenseType: Free -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader.meta b/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader.meta deleted file mode 100644 index bee7340..0000000 --- a/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 970a2e35ee37f9b4480cfac047390d99 -folderAsset: yes -timeCreated: 1513318177 -licenseType: Free -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Inc.meta b/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Inc.meta deleted file mode 100644 index 935c8e8..0000000 --- a/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Inc.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 6ad29c6507346be46b99b7c01f9bc02a -folderAsset: yes -timeCreated: 1513318177 -licenseType: Free -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Inc/ColorConvert.cginc b/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Inc/ColorConvert.cginc deleted file mode 100644 index 68efb34..0000000 --- a/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Inc/ColorConvert.cginc +++ /dev/null @@ -1,44 +0,0 @@ -#ifndef __COLOR_CONVERT__ -#define __COLOR_CONVERT__ - -float3 rgb2hsv(float3 c) -{ - float4 K = float4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0); - float4 p = lerp(float4(c.bg, K.wz), float4(c.gb, K.xy), step(c.b, c.g)); - float4 q = lerp(float4(p.xyw, c.r), float4(c.r, p.yzx), step(p.x, c.r)); - - float d = q.x - min(q.w, q.y); - float e = 1.0e-10; - return float3(abs(q.z + (q.w - q.y) / (6.0 * d + e)), d / (q.x + e), q.x); -} - -float3 rgb2hsv(float r, float g, float b) { return rgb2hsv(float3(r, g, b)); } - -float3 hsv2rgb(float3 c) -{ - float4 K = float4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0); - float3 p = abs(frac(c.xxx + K.xyz) * 6.0 - K.www); - return c.z * lerp(K.xxx, saturate(p - K.xxx), c.y); -} - -float3 hsv2rgb(float h, float s, float v) { return hsv2rgb(float3(h, s, v)); } - -float3 rgb2yuv(float3 c) -{ - float Y = 0.2989 * c.r + 0.5866 * c.g + 0.1145 * c.b; - float Cr = -0.169 * c.r - 0.331 * c.g + 0.5 * c.b + 0.5; - float Cb = 0.5 * c.r - 0.419 * c.g - 0.081 * c.b + 0.5; - return float3(Y, Cr, Cb); -} - -float3 yuv2rgb(float3 c) -{ - float R = c.x + 1.13983 * (c.z - 0.5); - float G = c.x - 0.39465 * (c.y - 0.5) - 0.5806 * (c.z - 0.5); - float B = c.x + 2.03211 * (c.y - 0.5); - return float3(R, G, B); -} - - - -#endif // __COLOR_CONVERT__ diff --git a/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Inc/ColorConvert.cginc.meta b/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Inc/ColorConvert.cginc.meta deleted file mode 100644 index 230dd1d..0000000 --- a/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Inc/ColorConvert.cginc.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: e118d759cc2956348825500066cc4c47 -timeCreated: 1513318177 -licenseType: Free -ShaderImporter: - externalObjects: {} - defaultTextures: [] - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Inc/Defines.cginc b/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Inc/Defines.cginc deleted file mode 100644 index d33a15a..0000000 --- a/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Inc/Defines.cginc +++ /dev/null @@ -1,17 +0,0 @@ -#ifndef __ULTRACOMBOS_DEFINES__ -#define __ULTRACOMBOS_DEFINES__ - -#define WORK_GROUP_SIZE 512 - -struct Particle -{ - float3 position; - float seed; - float4 color; - float3 velocity; - float life; - float4 quat; - float4x4 model_matrix; -}; - -#endif // __ULTRACOMBOS_DEFINES__ diff --git a/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Inc/Defines.cginc.meta b/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Inc/Defines.cginc.meta deleted file mode 100644 index 566ece5..0000000 --- a/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Inc/Defines.cginc.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 8aa45de43ecc31d4e9499b18d3d3d589 -timeCreated: 1513318177 -licenseType: Free -ShaderImporter: - externalObjects: {} - defaultTextures: [] - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Inc/Math.cginc b/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Inc/Math.cginc deleted file mode 100644 index 61cf5c3..0000000 --- a/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Inc/Math.cginc +++ /dev/null @@ -1,231 +0,0 @@ -#ifndef __MATH__ -#define __MATH__ - -#define FLT_EPSILON 1.192092896e-07 - -float ofMap(float value, float inputMin, float inputMax, float outputMin, float outputMax, int bClamp) -{ - if (abs(inputMin - inputMax) < FLT_EPSILON) { - return outputMin; - } - else { - float outVal = ((value - inputMin) / (inputMax - inputMin) * (outputMax - outputMin) + outputMin); - if (bClamp > 0) { - if (outputMax < outputMin) { - if (outVal < outputMax) outVal = outputMax; - else if (outVal > outputMin) outVal = outputMin; - } - else { - if (outVal > outputMax) outVal = outputMax; - else if (outVal < outputMin) outVal = outputMin; - } - } - return outVal; - } -} - -float2 ofMap(float2 value, float2 inputMin, float2 inputMax, float2 outputMin, float2 outputMax, int bClamp) -{ - float x = ofMap(value.x, inputMin.x, inputMax.x, outputMin.x, outputMax.x, bClamp); - float y = ofMap(value.y, inputMin.y, inputMax.y, outputMin.y, outputMax.y, bClamp); - return float2(x, y); -} - -float3 ofMap(float3 value, float3 inputMin, float3 inputMax, float3 outputMin, float3 outputMax, int bClamp) -{ - float x = ofMap(value.x, inputMin.x, inputMax.x, outputMin.x, outputMax.x, bClamp); - float y = ofMap(value.y, inputMin.y, inputMax.y, outputMin.y, outputMax.y, bClamp); - float z = ofMap(value.z, inputMin.z, inputMax.z, outputMin.z, outputMax.z, bClamp); - return float3(x, y, z); -} - -float2x2 RotationMatrix(float a) -{ - float2x2 rot = { cos(a), -sin(a), sin(a), cos(a) }; - return rot; -} - -// implement from Rodrigues rotation formula -float3x3 RotationMatrix(float3 from, float3 to) -{ - float3 a = normalize(from); - float3 b = normalize(to); - float3 v = cross(a, b); - float s = length(v); - float c = dot(a, b); - float3x3 W = { 0, -v.z, v.y, v.z, 0, -v.x, -v.y, v.x, 0 }; - float3x3 I = { 1, 0, 0, 0, 1, 0, 0, 0, 1 }; - float3x3 R = I + W * s + W * W * (1.0f - c); - //float theta = acos( dot(a, b) ); - //float3x3 R = I + W * sin(theta) + W * W * (1.0f - cos(theta)); - return R; -} - -float Rand(float2 co) -{ - return frac(sin(dot(co.xy, float2(12.9898, 78.233))) * 43758.5453); -} - -float4 MakeQuaternion(float pitch, float roll, float yaw) -{ - float4 q; - float t0 = cos(yaw * 0.5f); - float t1 = sin(yaw * 0.5f); - float t2 = cos(roll * 0.5f); - float t3 = sin(roll * 0.5f); - float t4 = cos(pitch * 0.5f); - float t5 = sin(pitch * 0.5f); - - q.w = t0 * t2 * t4 + t1 * t3 * t5; - q.x = t0 * t3 * t4 - t1 * t2 * t5; - q.y = t0 * t2 * t5 + t1 * t3 * t4; - q.z = t1 * t2 * t4 - t0 * t3 * t5; - return q; -} - -// Quaternion - -float4 quat_from_axis_angle(float3 axis, float angle) -{ - float4 qr; - float half_angle = (angle * 0.5);// *3.14159 / 180.0; - qr.x = axis.x * sin(half_angle); - qr.y = axis.y * sin(half_angle); - qr.z = axis.z * sin(half_angle); - qr.w = cos(half_angle); - return qr; -} - -float4 quat_conj(float4 q) -{ - return float4(-q.x, -q.y, -q.z, q.w); -} - -float4 quat_mult(float4 q1, float4 q2) -{ - float4 qr; - qr.x = (q1.w * q2.x) + (q1.x * q2.w) + (q1.y * q2.z) - (q1.z * q2.y); - qr.y = (q1.w * q2.y) - (q1.x * q2.z) + (q1.y * q2.w) + (q1.z * q2.x); - qr.z = (q1.w * q2.z) + (q1.x * q2.y) - (q1.y * q2.x) + (q1.z * q2.w); - qr.w = (q1.w * q2.w) - (q1.x * q2.x) - (q1.y * q2.y) - (q1.z * q2.z); - return qr; -} - -float3 rotate_vertex_position(float3 position, float4 quat) -{ - return position + 2.0f * cross(quat.xyz, cross(quat.xyz, position) + quat.w * position); -} - -float3 rotate_vertex_position(float3 position, float3 axis, float angle) -{ - float4 q = quat_from_axis_angle(axis, angle); - return rotate_vertex_position(position, q); - //float4 v = position.xyz; - //return v + 2.0 * cross(q.xyz, cross(q.xyz, v) + q.w * v); -} - -void calc_tangents(float3 vertices[4], float3 normals[4], float2 texcoords[4], out float4 tangents[4]) -{ - //float4 tangents[3]; - float3 tan1[4]; - float3 tan2[4]; - int i; - - for (i = 0; i < 4; i++) - { - tan1[i] = tan2[i] = float3(0, 0, 0); - } - - for (i = 0; i < 4 - 2; i++) - { - int i1 = 0; - int i2 = i + 1; - int i3 = i + 2; - - float3 v1 = vertices[i1]; - float3 v2 = vertices[i2]; - float3 v3 = vertices[i3]; - - float2 w1 = texcoords[i1]; - float2 w2 = texcoords[i2]; - float2 w3 = texcoords[i3]; - - float x1 = v2.x - v1.x; - float x2 = v3.x - v1.x; - float y1 = v2.y - v1.y; - float y2 = v3.y - v1.y; - float z1 = v2.z - v1.z; - float z2 = v3.z - v1.z; - - float s1 = w2.x - w1.x; - float s2 = w3.x - w1.x; - float t1 = w2.y - w1.y; - float t2 = w3.y - w1.y; - - float r = 1.0f / (s1 * t2 - s2 * t1); - float3 sdir = float3((t2 * x1 - t1 * x2) * r, (t2 * y1 - t1 * y2) * r, (t2 * z1 - t1 * z2) * r); - float3 tdir = float3((s1 * x2 - s2 * x1) * r, (s1 * y2 - s2 * y1) * r, (s1 * z2 - s2 * z1) * r); - - tan1[i1] += sdir; - tan1[i2] += sdir; - tan1[i3] += sdir; - - tan2[i1] += tdir; - tan2[i2] += tdir; - tan2[i3] += tdir; - } - - for (i = 0; i < 4; i++) - { - float3 n = normals[i]; - float3 t = tan1[i]; - - tangents[i].xyz = tan1[i]; - tangents[i].w = (dot(cross(n, t), tan2[i]) < 0.0f) ? -1.0f : 1.0f; - } -} - -float4x4 quat_to_rotation_matrix(float4 q) -{ - return float4x4( - 1.0 - 2.0*q.y*q.y - 2.0*q.z*q.z, 2.0*q.x*q.y - 2.0*q.z*q.w, 2.0*q.x*q.z + 2.0*q.y*q.w, 0.0, - 2.0*q.x*q.y + 2.0*q.z*q.w, 1.0 - 2.0*q.x*q.x - 2.0*q.z*q.z, 2.0*q.y*q.z - 2.0*q.x*q.w, 0.0, - 2.0*q.x*q.z - 2.0*q.y*q.w, 2.0*q.y*q.z + 2.0*q.x*q.w, 1.0 - 2.0*q.x*q.x - 2.0*q.y*q.y, 0.0, - 0.0, 0.0, 0.0, 1.0); -} - -float4x4 make_translation_matrix(float3 trans) -{ - return float4x4( - 1, 0, 0, trans.x, - 0, 1, 0, trans.y, - 0, 0, 1, trans.z, - 0, 0, 0, 1 - ); -} - -float4x4 make_scaling_matrix(float s) -{ - return float4x4( - s, 0, 0, 0, - 0, s, 0, 0, - 0, 0, s, 0, - 0, 0, 0, 1 - ); -} - -const float4x4 identity_matrix = { - 1, 0, 0, 0, - 0, 1, 0, 0, - 0, 0, 1, 0, - 0, 0, 0, 1 -}; - -half3 cosine_gradient(half3 A, half3 B, half3 C, half3 D, float t) -{ - return saturate(A + B * cos(C * t + D)); -} - - - -#endif // __MATH__ diff --git a/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Inc/Math.cginc.meta b/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Inc/Math.cginc.meta deleted file mode 100644 index 4ce64fc..0000000 --- a/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Inc/Math.cginc.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: b75108e9e753c044eae1762becba5b2f -timeCreated: 1513318177 -licenseType: Free -ShaderImporter: - externalObjects: {} - defaultTextures: [] - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/MeshVertexCollect.compute b/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/MeshVertexCollect.compute deleted file mode 100644 index 1832b32..0000000 --- a/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/MeshVertexCollect.compute +++ /dev/null @@ -1,42 +0,0 @@ -#pragma kernel CSMain - -#include "UnityCG.cginc" - -#define WORK_GROUP_SIZE 1024 - -struct Vertex -{ - float3 position; - float3 normal; - //float4 color; - //float2 uv; - //float2 uv2; - float4 tangent; -}; - -CBUFFER_START(Variables) - int index; - int count; - float4x4 model_matrix; -CBUFFER_END - -RWStructuredBuffer home_buffer; -RWStructuredBuffer home_velocity_buffer; -RWStructuredBuffer vertex_buffer; - -[numthreads(WORK_GROUP_SIZE, 1, 1)] -void CSMain(uint3 id : SV_DispatchThreadID) -{ - uint offset = (uint)index; - if (id.x < offset || id.x >= offset + count) - return; - - float4 pos = float4(vertex_buffer[id.x - offset].position, 1); - pos = mul(model_matrix, pos); - - float3 last_pos = home_buffer[id.x].xyz; - float3 vel = length(last_pos) == 0.0f ? float3(0, 0, 0) : pos.xyz - last_pos; - home_velocity_buffer[id.x] = float4(vel, 1.0f); - - home_buffer[id.x] = pos; -} diff --git a/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/MeshVertexCollect.compute.meta b/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/MeshVertexCollect.compute.meta deleted file mode 100644 index cfd724a..0000000 --- a/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/MeshVertexCollect.compute.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: fa89158a0f676c9479248d6a1b0cee36 -ComputeShaderImporter: - externalObjects: {} - currentAPIMask: 4 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Noise.meta b/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Noise.meta deleted file mode 100644 index df961af..0000000 --- a/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Noise.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: c968022c15bd5254385140a51e15c802 -folderAsset: yes -timeCreated: 1513318177 -licenseType: Free -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Noise/cellular2D.cginc b/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Noise/cellular2D.cginc deleted file mode 100644 index 55cc165..0000000 --- a/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Noise/cellular2D.cginc +++ /dev/null @@ -1,55 +0,0 @@ -#ifndef __CELLULAE_2D__ -#define __CELLULAE_2D__ - -#include "noiseMath.cginc" - -// Cellular noise ("Worley noise") in 2D in GLSL. -// Copyright (c) Stefan Gustavson 2011-04-19. All rights reserved. -// This code is released under the conditions of the MIT license. -// See LICENSE file for details. -// https://github.com/stegu/webgl-noise - -// Cellular noise, returning F1 and F2 in a vec2. -// Standard 3x3 search window for good F1 and F2 values -float2 cellular(float2 P) { - const float K = 0.142857142857; // 1/7 - const float Ko = 0.428571428571; // 3/7 - const float jitter = 1.0; // Less gives more regular pattern - float2 Pi = mod289(floor(P)); - float2 Pf = frac(P); - float3 oi = float3(-1.0, 0.0, 1.0); - float3 of = float3(-0.5, 0.5, 1.5); - float3 px = permute(Pi.x + oi); - float3 p = permute(px.x + Pi.y + oi); // p11, p12, p13 - float3 ox = fract(p*K) - Ko; - float3 oy = mod7(floor(p*K))*K - Ko; - float3 dx = Pf.x + 0.5 + jitter*ox; - float3 dy = Pf.y - of + jitter*oy; - float3 d1 = dx * dx + dy * dy; // d11, d12 and d13, squared - p = permute(px.y + Pi.y + oi); // p21, p22, p23 - ox = fract(p*K) - Ko; - oy = mod7(floor(p*K))*K - Ko; - dx = Pf.x - 0.5 + jitter*ox; - dy = Pf.y - of + jitter*oy; - float3 d2 = dx * dx + dy * dy; // d21, d22 and d23, squared - p = permute(px.z + Pi.y + oi); // p31, p32, p33 - ox = frac(p*K) - Ko; - oy = mod7(floor(p*K))*K - Ko; - dx = Pf.x - 1.5 + jitter*ox; - dy = Pf.y - of + jitter*oy; - float3 d3 = dx * dx + dy * dy; // d31, d32 and d33, squared - // Sort out the two smallest distances (F1, F2) - float3 d1a = min(d1, d2); - d2 = max(d1, d2); // Swap to keep candidates for F2 - d2 = min(d2, d3); // neither F1 nor F2 are now in d3 - d1 = min(d1a, d2); // F1 is now in d1 - d2 = max(d1a, d2); // Swap to keep candidates for F2 - d1.xy = (d1.x < d1.y) ? d1.xy : d1.yx; // Swap if smaller - d1.xz = (d1.x < d1.z) ? d1.xz : d1.zx; // F1 is in d1.x - d1.yz = min(d1.yz, d2.yz); // F2 is now not in d2.yz - d1.y = min(d1.y, d1.z); // nor in d1.z - d1.y = min(d1.y, d2.x); // F2 is in d1.y, we're done. - return sqrt(d1.xy); -} - -#endif \ No newline at end of file diff --git a/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Noise/cellular2D.cginc.meta b/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Noise/cellular2D.cginc.meta deleted file mode 100644 index f521cca..0000000 --- a/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Noise/cellular2D.cginc.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: dabc3d39937cf8b44b436eb48779d989 -timeCreated: 1511764501 -licenseType: Free -ShaderImporter: - externalObjects: {} - defaultTextures: [] - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Noise/cellular2x2.cginc b/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Noise/cellular2x2.cginc deleted file mode 100644 index 41d11d5..0000000 --- a/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Noise/cellular2x2.cginc +++ /dev/null @@ -1,50 +0,0 @@ -#ifndef __CELLULAE_2X2__ -#define __CELLULAE_2X2__ - -#include "noiseMath.cginc" - -// Cellular noise ("Worley noise") in 2D in GLSL. -// Copyright (c) Stefan Gustavson 2011-04-19. All rights reserved. -// This code is released under the conditions of the MIT license. -// See LICENSE file for details. -// https://github.com/stegu/webgl-noise - -// Cellular noise, returning F1 and F2 in a vec2. -// Speeded up by using 2x2 search window instead of 3x3, -// at the expense of some strong pattern artifacts. -// F2 is often wrong and has sharp discontinuities. -// If you need a smooth F2, use the slower 3x3 version. -// F1 is sometimes wrong, too, but OK for most purposes. -float2 cellular2x2(float2 P) { - const float K = 0.142857142857; // 1/7 - const float K2 = 0.0714285714285; // K/2 - const float jitter = 0.8; // jitter 1.0 makes F1 wrong more often - float2 Pi = mod289(floor(P)); - float2 Pf = fract(P); - float4 Pfx = Pf.x + vec4(-0.5, -1.5, -0.5, -1.5); - float4 Pfy = Pf.y + vec4(-0.5, -0.5, -1.5, -1.5); - float4 p = permute(Pi.x + vec4(0.0, 1.0, 0.0, 1.0)); - p = permute(p + Pi.y + vec4(0.0, 0.0, 1.0, 1.0)); - float4 ox = mod7(p)*K+K2; - float4 oy = mod7(floor(p*K))*K+K2; - float4 dx = Pfx + jitter*ox; - float4 dy = Pfy + jitter*oy; - float4 d = dx * dx + dy * dy; // d11, d12, d21 and d22, squared - // Sort out the two smallest distances -#if false - // Cheat and pick only F1 - d.xy = min(d.xy, d.zw); - d.x = min(d.x, d.y); - return vec2(sqrt(d.x)); // F1 duplicated, F2 not computed -#else - // Do it right and find both F1 and F2 - d.xy = (d.x < d.y) ? d.xy : d.yx; // Swap if smaller - d.xz = (d.x < d.z) ? d.xz : d.zx; - d.xw = (d.x < d.w) ? d.xw : d.wx; - d.y = min(d.y, d.z); - d.y = min(d.y, d.w); - return sqrt(d.xy); -#endif -} - -#endif \ No newline at end of file diff --git a/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Noise/cellular2x2.cginc.meta b/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Noise/cellular2x2.cginc.meta deleted file mode 100644 index 3950a2d..0000000 --- a/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Noise/cellular2x2.cginc.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 286f253b43aa8bc4cbe7c7d3bc1e6500 -timeCreated: 1511764501 -licenseType: Free -ShaderImporter: - externalObjects: {} - defaultTextures: [] - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Noise/cellular2x2x2.cginc b/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Noise/cellular2x2x2.cginc deleted file mode 100644 index 43ba330..0000000 --- a/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Noise/cellular2x2x2.cginc +++ /dev/null @@ -1,67 +0,0 @@ -#ifndef __CELLULAE_2X2X2__ -#define __CELLULAE_2X2X2__ - -#include "noiseMath.cginc" - -// Cellular noise ("Worley noise") in 3D in GLSL. -// Copyright (c) Stefan Gustavson 2011-04-19. All rights reserved. -// This code is released under the conditions of the MIT license. -// See LICENSE file for details. -// https://github.com/stegu/webgl-noise - -// Cellular noise, returning F1 and F2 in a vec2. -// Speeded up by using 2x2x2 search window instead of 3x3x3, -// at the expense of some pattern artifacts. -// F2 is often wrong and has sharp discontinuities. -// If you need a good F2, use the slower 3x3x3 version. -float2 cellular2x2x2(float3 P) { - const float K = 0.142857142857; // 1/7 - const float Ko = 0.428571428571; // 1/2-K/2 - const float K2 = 0.020408163265306; // 1/(7*7) - const float Kz = 0.166666666667; // 1/6 - const float Kzo = 0.416666666667; // 1/2-1/6*2 - const float jitter = 0.8; // smaller jitter gives less errors in F2 - float3 Pi = mod289(floor(P)); - float3 Pf = fract(P); - float4 Pfx = Pf.x + vec4(0.0, -1.0, 0.0, -1.0); - float4 Pfy = Pf.y + vec4(0.0, 0.0, -1.0, -1.0); - float4 p = permute(Pi.x + vec4(0.0, 1.0, 0.0, 1.0)); - p = permute(p + Pi.y + vec4(0.0, 0.0, 1.0, 1.0)); - float4 p1 = permute(p + Pi.z); // z+0 - float4 p2 = permute(p + Pi.z + vec4(1.0)); // z+1 - float4 ox1 = frac(p1*K) - Ko; - float4 oy1 = mod7(floor(p1*K))*K - Ko; - float4 oz1 = floor(p1*K2)*Kz - Kzo; // p1 < 289 guaranteed - float4 ox2 = fract(p2*K) - Ko; - float4 oy2 = mod7(floor(p2*K))*K - Ko; - float4 oz2 = floor(p2*K2)*Kz - Kzo; - float4 dx1 = Pfx + jitter*ox1; - float4 dy1 = Pfy + jitter*oy1; - float4 dz1 = Pf.z + jitter*oz1; - float4 dx2 = Pfx + jitter*ox2; - float4 dy2 = Pfy + jitter*oy2; - float4 dz2 = Pf.z - 1.0 + jitter*oz2; - float4 d1 = dx1 * dx1 + dy1 * dy1 + dz1 * dz1; // z+0 - float4 d2 = dx2 * dx2 + dy2 * dy2 + dz2 * dz2; // z+1 - - // Sort out the two smallest distances (F1, F2) -#if false - // Cheat and sort out only F1 - d1 = min(d1, d2); - d1.xy = min(d1.xy, d1.wz); - d1.x = min(d1.x, d1.y); - return vec2(sqrt(d1.x)); -#else - // Do it right and sort out both F1 and F2 - vec4 d = min(d1,d2); // F1 is now in d - d2 = max(d1,d2); // Make sure we keep all candidates for F2 - d.xy = (d.x < d.y) ? d.xy : d.yx; // Swap smallest to d.x - d.xz = (d.x < d.z) ? d.xz : d.zx; - d.xw = (d.x < d.w) ? d.xw : d.wx; // F1 is now in d.x - d.yzw = min(d.yzw, d2.yzw); // F2 now not in d2.yzw - d.y = min(d.y, d.z); // nor in d.z - d.y = min(d.y, d.w); // nor in d.w - d.y = min(d.y, d2.x); // F2 is now in d.y - return sqrt(d.xy); // F1 and F2 -#endif -} diff --git a/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Noise/cellular2x2x2.cginc.meta b/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Noise/cellular2x2x2.cginc.meta deleted file mode 100644 index e55b4c8..0000000 --- a/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Noise/cellular2x2x2.cginc.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 4990a2164abda5d4b99a145d3253bf9f -timeCreated: 1511764501 -licenseType: Free -ShaderImporter: - externalObjects: {} - defaultTextures: [] - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Noise/cellular3D.cginc b/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Noise/cellular3D.cginc deleted file mode 100644 index 88bfd08..0000000 --- a/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Noise/cellular3D.cginc +++ /dev/null @@ -1,177 +0,0 @@ -#ifndef __CELLULAE_3D__ -#define __CELLULAE_3D__ - -#include "noiseMath.cginc" - -// Cellular noise ("Worley noise") in 3D in GLSL. -// Copyright (c) Stefan Gustavson 2011-04-19. All rights reserved. -// This code is released under the conditions of the MIT license. -// See LICENSE file for details. -// https://github.com/stegu/webgl-noise - -// Cellular noise, returning F1 and F2 in a vec2. -// 3x3x3 search region for good F2 everywhere, but a lot -// slower than the 2x2x2 version. -// The code below is a bit scary even to its author, -// but it has at least half decent performance on a -// modern GPU. In any case, it beats any software -// implementation of Worley noise hands down. - -float2 cellular(float3 P) { - const float K = 0.142857142857; // 1/7 - const float Ko = 0.428571428571; // 1/2-K/2 - const float K2 = 0.020408163265306; // 1/(7*7) - const float Kz = 0.166666666667; // 1/6 - const float Kzo = 0.416666666667; // 1/2-1/6*2 - const float jitter = 1.0; // smaller jitter gives more regular pattern - - float3 Pi = mod289(floor(P)); - float3 Pf = frac(P) - 0.5; - - float3 Pfx = Pf.x + float3(1.0, 0.0, -1.0); - float3 Pfy = Pf.y + float3(1.0, 0.0, -1.0); - float3 Pfz = Pf.z + float3(1.0, 0.0, -1.0); - - float3 p = permute(Pi.x + float3(-1.0, 0.0, 1.0)); - float3 p1 = permute(p + Pi.y - 1.0); - float3 p2 = permute(p + Pi.y); - float3 p3 = permute(p + Pi.y + 1.0); - - float3 p11 = permute(p1 + Pi.z - 1.0); - float3 p12 = permute(p1 + Pi.z); - float3 p13 = permute(p1 + Pi.z + 1.0); - - float3 p21 = permute(p2 + Pi.z - 1.0); - float3 p22 = permute(p2 + Pi.z); - float3 p23 = permute(p2 + Pi.z + 1.0); - - float3 p31 = permute(p3 + Pi.z - 1.0); - float3 p32 = permute(p3 + Pi.z); - float3 p33 = permute(p3 + Pi.z + 1.0); - - float3 ox11 = frac(p11*K) - Ko; - float3 oy11 = mod7(floor(p11*K))*K - Ko; - float3 oz11 = floor(p11*K2)*Kz - Kzo; // p11 < 289 guaranteed - - float3 ox12 = frac(p12*K) - Ko; - float3 oy12 = mod7(floor(p12*K))*K - Ko; - float3 oz12 = floor(p12*K2)*Kz - Kzo; - - float3 ox13 = frac(p13*K) - Ko; - float3 oy13 = mod7(floor(p13*K))*K - Ko; - float3 oz13 = floor(p13*K2)*Kz - Kzo; - - float3 ox21 = frac(p21*K) - Ko; - float3 oy21 = mod7(floor(p21*K))*K - Ko; - float3 oz21 = floor(p21*K2)*Kz - Kzo; - - float3 ox22 = frac(p22*K) - Ko; - float3 oy22 = mod7(floor(p22*K))*K - Ko; - float3 oz22 = floor(p22*K2)*Kz - Kzo; - - float3 ox23 = frac(p23*K) - Ko; - float3 oy23 = mod7(floor(p23*K))*K - Ko; - float3 oz23 = floor(p23*K2)*Kz - Kzo; - - float3 ox31 = frac(p31*K) - Ko; - float3 oy31 = mod7(floor(p31*K))*K - Ko; - float3 oz31 = floor(p31*K2)*Kz - Kzo; - - float3 ox32 = frac(p32*K) - Ko; - float3 oy32 = mod7(floor(p32*K))*K - Ko; - float3 oz32 = floor(p32*K2)*Kz - Kzo; - - float3 ox33 = frac(p33*K) - Ko; - float3 oy33 = mod7(floor(p33*K))*K - Ko; - float3 oz33 = floor(p33*K2)*Kz - Kzo; - - float3 dx11 = Pfx + jitter*ox11; - float3 dy11 = Pfy.x + jitter*oy11; - float3 dz11 = Pfz.x + jitter*oz11; - - float3 dx12 = Pfx + jitter*ox12; - float3 dy12 = Pfy.x + jitter*oy12; - float3 dz12 = Pfz.y + jitter*oz12; - - float3 dx13 = Pfx + jitter*ox13; - float3 dy13 = Pfy.x + jitter*oy13; - float3 dz13 = Pfz.z + jitter*oz13; - - float3 dx21 = Pfx + jitter*ox21; - float3 dy21 = Pfy.y + jitter*oy21; - float3 dz21 = Pfz.x + jitter*oz21; - - float3 dx22 = Pfx + jitter*ox22; - float3 dy22 = Pfy.y + jitter*oy22; - float3 dz22 = Pfz.y + jitter*oz22; - - float3 dx23 = Pfx + jitter*ox23; - float3 dy23 = Pfy.y + jitter*oy23; - float3 dz23 = Pfz.z + jitter*oz23; - - float3 dx31 = Pfx + jitter*ox31; - float3 dy31 = Pfy.z + jitter*oy31; - float3 dz31 = Pfz.x + jitter*oz31; - - float3 dx32 = Pfx + jitter*ox32; - float3 dy32 = Pfy.z + jitter*oy32; - float3 dz32 = Pfz.y + jitter*oz32; - - float3 dx33 = Pfx + jitter*ox33; - float3 dy33 = Pfy.z + jitter*oy33; - float3 dz33 = Pfz.z + jitter*oz33; - - float3 d11 = dx11 * dx11 + dy11 * dy11 + dz11 * dz11; - float3 d12 = dx12 * dx12 + dy12 * dy12 + dz12 * dz12; - float3 d13 = dx13 * dx13 + dy13 * dy13 + dz13 * dz13; - float3 d21 = dx21 * dx21 + dy21 * dy21 + dz21 * dz21; - float3 d22 = dx22 * dx22 + dy22 * dy22 + dz22 * dz22; - float3 d23 = dx23 * dx23 + dy23 * dy23 + dz23 * dz23; - float3 d31 = dx31 * dx31 + dy31 * dy31 + dz31 * dz31; - float3 d32 = dx32 * dx32 + dy32 * dy32 + dz32 * dz32; - float3 d33 = dx33 * dx33 + dy33 * dy33 + dz33 * dz33; - - // Sort out the two smallest distances (F1, F2) -#if false - // Cheat and sort out only F1 - float3 d1 = min(min(d11,d12), d13); - float3 d2 = min(min(d21,d22), d23); - float3 d3 = min(min(d31,d32), d33); - float3 d = min(min(d1,d2), d3); - d.x = min(min(d.x,d.y),d.z); - return float2(sqrt(d.x)); // F1 duplicated, no F2 computed -#else - // Do it right and sort out both F1 and F2 - float3 d1a = min(d11, d12); - d12 = max(d11, d12); - d11 = min(d1a, d13); // Smallest now not in d12 or d13 - d13 = max(d1a, d13); - d12 = min(d12, d13); // 2nd smallest now not in d13 - float3 d2a = min(d21, d22); - d22 = max(d21, d22); - d21 = min(d2a, d23); // Smallest now not in d22 or d23 - d23 = max(d2a, d23); - d22 = min(d22, d23); // 2nd smallest now not in d23 - float3 d3a = min(d31, d32); - d32 = max(d31, d32); - d31 = min(d3a, d33); // Smallest now not in d32 or d33 - d33 = max(d3a, d33); - d32 = min(d32, d33); // 2nd smallest now not in d33 - float3 da = min(d11, d21); - d21 = max(d11, d21); - d11 = min(da, d31); // Smallest now in d11 - d31 = max(da, d31); // 2nd smallest now not in d31 - d11.xy = (d11.x < d11.y) ? d11.xy : d11.yx; - d11.xz = (d11.x < d11.z) ? d11.xz : d11.zx; // d11.x now smallest - d12 = min(d12, d21); // 2nd smallest now not in d21 - d12 = min(d12, d22); // nor in d22 - d12 = min(d12, d31); // nor in d31 - d12 = min(d12, d32); // nor in d32 - d11.yz = min(d11.yz,d12.xy); // nor in d12.yz - d11.y = min(d11.y,d12.z); // Only two more to go - d11.y = min(d11.y,d11.z); // Done! (Phew!) - return sqrt(d11.xy); // F1, F2 -#endif -} - -#endif \ No newline at end of file diff --git a/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Noise/cellular3D.cginc.meta b/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Noise/cellular3D.cginc.meta deleted file mode 100644 index 008bfee..0000000 --- a/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Noise/cellular3D.cginc.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 35eda6f8be41bec4e86fe00e2ced1c0e -timeCreated: 1511764501 -licenseType: Free -ShaderImporter: - externalObjects: {} - defaultTextures: [] - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Noise/classicnoise2D.cginc b/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Noise/classicnoise2D.cginc deleted file mode 100644 index a1e4557..0000000 --- a/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Noise/classicnoise2D.cginc +++ /dev/null @@ -1,101 +0,0 @@ -#ifndef __CLASSIC_NOISE_2D__ -#define __CLASSIC_NOISE_2D__ - -#include "noiseMath.cginc" - -// -// GLSL textureless classic 2D noise "cnoise", -// with an RSL-style periodic variant "pnoise". -// Author: Stefan Gustavson (stefan.gustavson@liu.se) -// Version: 2011-08-22 -// -// Many thanks to Ian McEwan of Ashima Arts for the -// ideas for permutation and gradient selection. -// -// Copyright (c) 2011 Stefan Gustavson. All rights reserved. -// Distributed under the MIT license. See LICENSE file. -// https://github.com/stegu/webgl-noise -// - -// Classic Perlin noise -float cnoise(float2 P) -{ - float4 Pi = floor(P.xyxy) + float4(0.0, 0.0, 1.0, 1.0); - float4 Pf = frac(P.xyxy) - float4(0.0, 0.0, 1.0, 1.0); - Pi = mod289(Pi); // To avoid truncation effects in permutation - float4 ix = Pi.xzxz; - float4 iy = Pi.yyww; - float4 fx = Pf.xzxz; - float4 fy = Pf.yyww; - - float4 i = permute(permute(ix) + iy); - - float4 gx = frac(i * (1.0 / 41.0)) * 2.0 - 1.0 ; - float4 gy = abs(gx) - 0.5 ; - float4 tx = floor(gx + 0.5); - gx = gx - tx; - - float2 g00 = float2(gx.x,gy.x); - float2 g10 = float2(gx.y,gy.y); - float2 g01 = float2(gx.z,gy.z); - float2 g11 = float2(gx.w,gy.w); - - float4 norm = taylorInvSqrt(float4(dot(g00, g00), dot(g01, g01), dot(g10, g10), dot(g11, g11))); - g00 *= norm.x; - g01 *= norm.y; - g10 *= norm.z; - g11 *= norm.w; - - float n00 = dot(g00, vec2(fx.x, fy.x)); - float n10 = dot(g10, vec2(fx.y, fy.y)); - float n01 = dot(g01, vec2(fx.z, fy.z)); - float n11 = dot(g11, vec2(fx.w, fy.w)); - - float2 fade_xy = fade(Pf.xy); - float2 n_x = lerp(float2(n00, n01), float2(n10, n11), fade_xy.x); - float n_xy = lerp(n_x.x, n_x.y, fade_xy.y); - return 2.3 * n_xy; -} - -// Classic Perlin noise, periodic variant -float pnoise(float2 P, float2 rep) -{ - float4 Pi = floor(P.xyxy) + float4(0.0, 0.0, 1.0, 1.0); - float4 Pf = frac(P.xyxy) - float4(0.0, 0.0, 1.0, 1.0); - Pi = mod(Pi, rep.xyxy); // To create noise with explicit period - Pi = mod289(Pi); // To avoid truncation effects in permutation - float4 ix = Pi.xzxz; - float4 iy = Pi.yyww; - float4 fx = Pf.xzxz; - float4 fy = Pf.yyww; - - float4 i = permute(permute(ix) + iy); - - float4 gx = frac(i * (1.0 / 41.0)) * 2.0 - 1.0 ; - float4 gy = abs(gx) - 0.5 ; - float4 tx = floor(gx + 0.5); - gx = gx - tx; - - float2 g00 = float2(gx.x,gy.x); - float2 g10 = float2(gx.y,gy.y); - float2 g01 = float2(gx.z,gy.z); - float2 g11 = float2(gx.w,gy.w); - - float4 norm = taylorInvSqrt(float4(dot(g00, g00), dot(g01, g01), dot(g10, g10), dot(g11, g11))); - g00 *= norm.x; - g01 *= norm.y; - g10 *= norm.z; - g11 *= norm.w; - - float n00 = dot(g00, float2(fx.x, fy.x)); - float n10 = dot(g10, float2(fx.y, fy.y)); - float n01 = dot(g01, float2(fx.z, fy.z)); - float n11 = dot(g11, float2(fx.w, fy.w)); - - float2 fade_xy = fade(Pf.xy); - float2 n_x = lerp(vec2(n00, n01), float2(n10, n11), fade_xy.x); - float n_xy = lerp(n_x.x, n_x.y, fade_xy.y); - return 2.3 * n_xy; -} - -#endif \ No newline at end of file diff --git a/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Noise/classicnoise2D.cginc.meta b/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Noise/classicnoise2D.cginc.meta deleted file mode 100644 index a1d87ea..0000000 --- a/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Noise/classicnoise2D.cginc.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 686e838ffd1bb9f4e8f2470120cfcdd1 -timeCreated: 1511764501 -licenseType: Free -ShaderImporter: - externalObjects: {} - defaultTextures: [] - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Noise/classicnoise3D.cginc b/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Noise/classicnoise3D.cginc deleted file mode 100644 index 8942523..0000000 --- a/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Noise/classicnoise3D.cginc +++ /dev/null @@ -1,160 +0,0 @@ -#ifndef __CLASSIC_NOISE_3D__ -#define __CLASSIC_NOISE_3D__ - -#include "noiseMath.cginc" - -// -// GLSL textureless classic 3D noise "cnoise", -// with an RSL-style periodic variant "pnoise". -// Author: Stefan Gustavson (stefan.gustavson@liu.se) -// Version: 2011-10-11 -// -// Many thanks to Ian McEwan of Ashima Arts for the -// ideas for permutation and gradient selection. -// -// Copyright (c) 2011 Stefan Gustavson. All rights reserved. -// Distributed under the MIT license. See LICENSE file. -// https://github.com/stegu/webgl-noise -// - -// Classic Perlin noise -float cnoise(float3 P) -{ - float3 Pi0 = floor(P); // Integer part for indexing - float3 Pi1 = Pi0 + float3(1.0); // Integer part + 1 - Pi0 = mod289(Pi0); - Pi1 = mod289(Pi1); - float3 Pf0 = frac(P); // Fractional part for interpolation - float3 Pf1 = Pf0 - float3(1.0); // Fractional part - 1.0 - float4 ix = float4(Pi0.x, Pi1.x, Pi0.x, Pi1.x); - float4 iy = float4(Pi0.yy, Pi1.yy); - float4 iz0 = Pi0.zzzz; - float4 iz1 = Pi1.zzzz; - - float4 ixy = permute(permute(ix) + iy); - float4 ixy0 = permute(ixy + iz0); - float4 ixy1 = permute(ixy + iz1); - - float4 gx0 = ixy0 * (1.0 / 7.0); - float4 gy0 = frac(floor(gx0) * (1.0 / 7.0)) - 0.5; - gx0 = frac(gx0); - float4 gz0 = float4(0.5) - abs(gx0) - abs(gy0); - float4 sz0 = step(gz0, float4(0.0)); - gx0 -= sz0 * (step(0.0, gx0) - 0.5); - gy0 -= sz0 * (step(0.0, gy0) - 0.5); - - float4 gx1 = ixy1 * (1.0 / 7.0); - float4 gy1 = frac(floor(gx1) * (1.0 / 7.0)) - 0.5; - gx1 = frac(gx1); - float4 gz1 = float4(0.5) - abs(gx1) - abs(gy1); - float4 sz1 = step(gz1, float4(0.0)); - gx1 -= sz1 * (step(0.0, gx1) - 0.5); - gy1 -= sz1 * (step(0.0, gy1) - 0.5); - - float3 g000 = float3(gx0.x,gy0.x,gz0.x); - float3 g100 = float3(gx0.y,gy0.y,gz0.y); - float3 g010 = float3(gx0.z,gy0.z,gz0.z); - float3 g110 = float3(gx0.w,gy0.w,gz0.w); - float3 g001 = float3(gx1.x,gy1.x,gz1.x); - float3 g101 = float3(gx1.y,gy1.y,gz1.y); - float3 g011 = float3(gx1.z,gy1.z,gz1.z); - float3 g111 = float3(gx1.w,gy1.w,gz1.w); - - float4 norm0 = taylorInvSqrt(float4(dot(g000, g000), dot(g010, g010), dot(g100, g100), dot(g110, g110))); - g000 *= norm0.x; - g010 *= norm0.y; - g100 *= norm0.z; - g110 *= norm0.w; - float4 norm1 = taylorInvSqrt(float4(dot(g001, g001), dot(g011, g011), dot(g101, g101), dot(g111, g111))); - g001 *= norm1.x; - g011 *= norm1.y; - g101 *= norm1.z; - g111 *= norm1.w; - - float n000 = dot(g000, Pf0); - float n100 = dot(g100, float3(Pf1.x, Pf0.yz)); - float n010 = dot(g010, float3(Pf0.x, Pf1.y, Pf0.z)); - float n110 = dot(g110, float3(Pf1.xy, Pf0.z)); - float n001 = dot(g001, float3(Pf0.xy, Pf1.z)); - float n101 = dot(g101, float3(Pf1.x, Pf0.y, Pf1.z)); - float n011 = dot(g011, float3(Pf0.x, Pf1.yz)); - float n111 = dot(g111, Pf1); - - float3 fade_xyz = fade(Pf0); - float4 n_z = mix(float4(n000, n100, n010, n110), float4(n001, n101, n011, n111), fade_xyz.z); - float2 n_yz = mix(n_z.xy, n_z.zw, fade_xyz.y); - float n_xyz = mix(n_yz.x, n_yz.y, fade_xyz.x); - return 2.2 * n_xyz; -} - -// Classic Perlin noise, periodic variant -float pnoise(float3 P, float3 rep) -{ - float3 Pi0 = mod(floor(P), rep); // Integer part, modulo period - float3 Pi1 = mod(Pi0 + float3(1.0), rep); // Integer part + 1, mod period - Pi0 = mod289(Pi0); - Pi1 = mod289(Pi1); - float3 Pf0 = frac(P); // Fractional part for interpolation - float3 Pf1 = Pf0 - float3(1.0); // Fractional part - 1.0 - float4 ix = float4(Pi0.x, Pi1.x, Pi0.x, Pi1.x); - float4 iy = float4(Pi0.yy, Pi1.yy); - float4 iz0 = Pi0.zzzz; - float4 iz1 = Pi1.zzzz; - - float4 ixy = permute(permute(ix) + iy); - float4 ixy0 = permute(ixy + iz0); - float4 ixy1 = permute(ixy + iz1); - - float4 gx0 = ixy0 * (1.0 / 7.0); - float4 gy0 = frac(floor(gx0) * (1.0 / 7.0)) - 0.5; - gx0 = frac(gx0); - float4 gz0 = float4(0.5) - abs(gx0) - abs(gy0); - float4 sz0 = step(gz0, float4(0.0)); - gx0 -= sz0 * (step(0.0, gx0) - 0.5); - gy0 -= sz0 * (step(0.0, gy0) - 0.5); - - float4 gx1 = ixy1 * (1.0 / 7.0); - float4 gy1 = frac(floor(gx1) * (1.0 / 7.0)) - 0.5; - gx1 = frac(gx1); - float4 gz1 = float4(0.5) - abs(gx1) - abs(gy1); - float4 sz1 = step(gz1, float4(0.0)); - gx1 -= sz1 * (step(0.0, gx1) - 0.5); - gy1 -= sz1 * (step(0.0, gy1) - 0.5); - - float3 g000 = float3(gx0.x,gy0.x,gz0.x); - float3 g100 = float3(gx0.y,gy0.y,gz0.y); - float3 g010 = float3(gx0.z,gy0.z,gz0.z); - float3 g110 = float3(gx0.w,gy0.w,gz0.w); - float3 g001 = float3(gx1.x,gy1.x,gz1.x); - float3 g101 = float3(gx1.y,gy1.y,gz1.y); - float3 g011 = float3(gx1.z,gy1.z,gz1.z); - float3 g111 = float3(gx1.w,gy1.w,gz1.w); - - float4 norm0 = taylorInvSqrt(float4(dot(g000, g000), dot(g010, g010), dot(g100, g100), dot(g110, g110))); - g000 *= norm0.x; - g010 *= norm0.y; - g100 *= norm0.z; - g110 *= norm0.w; - float4 norm1 = taylorInvSqrt(float4(dot(g001, g001), dot(g011, g011), dot(g101, g101), dot(g111, g111))); - g001 *= norm1.x; - g011 *= norm1.y; - g101 *= norm1.z; - g111 *= norm1.w; - - float n000 = dot(g000, Pf0); - float n100 = dot(g100, float3(Pf1.x, Pf0.yz)); - float n010 = dot(g010, float3(Pf0.x, Pf1.y, Pf0.z)); - float n110 = dot(g110, float3(Pf1.xy, Pf0.z)); - float n001 = dot(g001, float3(Pf0.xy, Pf1.z)); - float n101 = dot(g101, float3(Pf1.x, Pf0.y, Pf1.z)); - float n011 = dot(g011, float3(Pf0.x, Pf1.yz)); - float n111 = dot(g111, Pf1); - - float3 fade_xyz = fade(Pf0); - float4 n_z = mix(float4(n000, n100, n010, n110), float4(n001, n101, n011, n111), fade_xyz.z); - float2 n_yz = mix(n_z.xy, n_z.zw, fade_xyz.y); - float n_xyz = mix(n_yz.x, n_yz.y, fade_xyz.x); - return 2.2 * n_xyz; -} - -#endif \ No newline at end of file diff --git a/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Noise/classicnoise3D.cginc.meta b/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Noise/classicnoise3D.cginc.meta deleted file mode 100644 index 99968e5..0000000 --- a/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Noise/classicnoise3D.cginc.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: d455bc260cbec6a47b350e56e5af7cf0 -timeCreated: 1511764501 -licenseType: Free -ShaderImporter: - externalObjects: {} - defaultTextures: [] - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Noise/classicnoise4D.cginc b/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Noise/classicnoise4D.cginc deleted file mode 100644 index 38c27fa..0000000 --- a/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Noise/classicnoise4D.cginc +++ /dev/null @@ -1,290 +0,0 @@ -#ifndef __CLASSIC_NOISE_4D__ -#define __CLASSIC_NOISE_4D__ - -#include "noiseMath.cginc" - -// -// GLSL textureless classic 4D noise "cnoise", -// with an RSL-style periodic variant "pnoise". -// Author: Stefan Gustavson (stefan.gustavson@liu.se) -// Version: 2011-08-22 -// -// Many thanks to Ian McEwan of Ashima Arts for the -// ideas for permutation and gradient selection. -// -// Copyright (c) 2011 Stefan Gustavson. All rights reserved. -// Distributed under the MIT license. See LICENSE file. -// https://github.com/stegu/webgl-noise -// - -// Classic Perlin noise -float cnoise(float4 P) -{ - float4 Pi0 = floor(P); // Integer part for indexing - float4 Pi1 = Pi0 + 1.0; // Integer part + 1 - Pi0 = mod289(Pi0); - Pi1 = mod289(Pi1); - float4 Pf0 = frac(P); // Fractional part for interpolation - float4 Pf1 = Pf0 - 1.0; // Fractional part - 1.0 - float4 ix = float4(Pi0.x, Pi1.x, Pi0.x, Pi1.x); - float4 iy = float4(Pi0.yy, Pi1.yy); - float4 iz0 = float4(Pi0.zzzz); - float4 iz1 = float4(Pi1.zzzz); - float4 iw0 = float4(Pi0.wwww); - float4 iw1 = float4(Pi1.wwww); - - float4 ixy = permute(permute(ix) + iy); - float4 ixy0 = permute(ixy + iz0); - float4 ixy1 = permute(ixy + iz1); - float4 ixy00 = permute(ixy0 + iw0); - float4 ixy01 = permute(ixy0 + iw1); - float4 ixy10 = permute(ixy1 + iw0); - float4 ixy11 = permute(ixy1 + iw1); - - float4 gx00 = ixy00 * (1.0 / 7.0); - float4 gy00 = floor(gx00) * (1.0 / 7.0); - float4 gz00 = floor(gy00) * (1.0 / 6.0); - gx00 = frac(gx00) - 0.5; - gy00 = frac(gy00) - 0.5; - gz00 = frac(gz00) - 0.5; - float4 gw00 = float4(0.75) - abs(gx00) - abs(gy00) - abs(gz00); - float4 sw00 = step(gw00, float4(0.0)); - gx00 -= sw00 * (step(0.0, gx00) - 0.5); - gy00 -= sw00 * (step(0.0, gy00) - 0.5); - - float4 gx01 = ixy01 * (1.0 / 7.0); - float4 gy01 = floor(gx01) * (1.0 / 7.0); - float4 gz01 = floor(gy01) * (1.0 / 6.0); - gx01 = frac(gx01) - 0.5; - gy01 = frac(gy01) - 0.5; - gz01 = frac(gz01) - 0.5; - float4 gw01 = float4(0.75) - abs(gx01) - abs(gy01) - abs(gz01); - float4 sw01 = step(gw01, float4(0.0)); - gx01 -= sw01 * (step(0.0, gx01) - 0.5); - gy01 -= sw01 * (step(0.0, gy01) - 0.5); - - float4 gx10 = ixy10 * (1.0 / 7.0); - float4 gy10 = floor(gx10) * (1.0 / 7.0); - float4 gz10 = floor(gy10) * (1.0 / 6.0); - gx10 = frac(gx10) - 0.5; - gy10 = frac(gy10) - 0.5; - gz10 = frac(gz10) - 0.5; - float4 gw10 = float4(0.75) - abs(gx10) - abs(gy10) - abs(gz10); - float4 sw10 = step(gw10, float4(0.0)); - gx10 -= sw10 * (step(0.0, gx10) - 0.5); - gy10 -= sw10 * (step(0.0, gy10) - 0.5); - - float4 gx11 = ixy11 * (1.0 / 7.0); - float4 gy11 = floor(gx11) * (1.0 / 7.0); - float4 gz11 = floor(gy11) * (1.0 / 6.0); - gx11 = frac(gx11) - 0.5; - gy11 = frac(gy11) - 0.5; - gz11 = frac(gz11) - 0.5; - float4 gw11 = float4(0.75) - abs(gx11) - abs(gy11) - abs(gz11); - float4 sw11 = step(gw11, float4(0.0)); - gx11 -= sw11 * (step(0.0, gx11) - 0.5); - gy11 -= sw11 * (step(0.0, gy11) - 0.5); - - float4 g0000 = float4(gx00.x,gy00.x,gz00.x,gw00.x); - float4 g1000 = float4(gx00.y,gy00.y,gz00.y,gw00.y); - float4 g0100 = float4(gx00.z,gy00.z,gz00.z,gw00.z); - float4 g1100 = float4(gx00.w,gy00.w,gz00.w,gw00.w); - float4 g0010 = float4(gx10.x,gy10.x,gz10.x,gw10.x); - float4 g1010 = float4(gx10.y,gy10.y,gz10.y,gw10.y); - float4 g0110 = float4(gx10.z,gy10.z,gz10.z,gw10.z); - float4 g1110 = float4(gx10.w,gy10.w,gz10.w,gw10.w); - float4 g0001 = float4(gx01.x,gy01.x,gz01.x,gw01.x); - float4 g1001 = float4(gx01.y,gy01.y,gz01.y,gw01.y); - float4 g0101 = float4(gx01.z,gy01.z,gz01.z,gw01.z); - float4 g1101 = float4(gx01.w,gy01.w,gz01.w,gw01.w); - float4 g0011 = float4(gx11.x,gy11.x,gz11.x,gw11.x); - float4 g1011 = float4(gx11.y,gy11.y,gz11.y,gw11.y); - float4 g0111 = float4(gx11.z,gy11.z,gz11.z,gw11.z); - float4 g1111 = float4(gx11.w,gy11.w,gz11.w,gw11.w); - - float4 norm00 = taylorInvSqrt(float4(dot(g0000, g0000), dot(g0100, g0100), dot(g1000, g1000), dot(g1100, g1100))); - g0000 *= norm00.x; - g0100 *= norm00.y; - g1000 *= norm00.z; - g1100 *= norm00.w; - - float4 norm01 = taylorInvSqrt(float4(dot(g0001, g0001), dot(g0101, g0101), dot(g1001, g1001), dot(g1101, g1101))); - g0001 *= norm01.x; - g0101 *= norm01.y; - g1001 *= norm01.z; - g1101 *= norm01.w; - - float4 norm10 = taylorInvSqrt(float4(dot(g0010, g0010), dot(g0110, g0110), dot(g1010, g1010), dot(g1110, g1110))); - g0010 *= norm10.x; - g0110 *= norm10.y; - g1010 *= norm10.z; - g1110 *= norm10.w; - - float4 norm11 = taylorInvSqrt(float4(dot(g0011, g0011), dot(g0111, g0111), dot(g1011, g1011), dot(g1111, g1111))); - g0011 *= norm11.x; - g0111 *= norm11.y; - g1011 *= norm11.z; - g1111 *= norm11.w; - - float n0000 = dot(g0000, Pf0); - float n1000 = dot(g1000, float4(Pf1.x, Pf0.yzw)); - float n0100 = dot(g0100, float4(Pf0.x, Pf1.y, Pf0.zw)); - float n1100 = dot(g1100, float4(Pf1.xy, Pf0.zw)); - float n0010 = dot(g0010, float4(Pf0.xy, Pf1.z, Pf0.w)); - float n1010 = dot(g1010, float4(Pf1.x, Pf0.y, Pf1.z, Pf0.w)); - float n0110 = dot(g0110, float4(Pf0.x, Pf1.yz, Pf0.w)); - float n1110 = dot(g1110, float4(Pf1.xyz, Pf0.w)); - float n0001 = dot(g0001, float4(Pf0.xyz, Pf1.w)); - float n1001 = dot(g1001, float4(Pf1.x, Pf0.yz, Pf1.w)); - float n0101 = dot(g0101, float4(Pf0.x, Pf1.y, Pf0.z, Pf1.w)); - float n1101 = dot(g1101, float4(Pf1.xy, Pf0.z, Pf1.w)); - float n0011 = dot(g0011, float4(Pf0.xy, Pf1.zw)); - float n1011 = dot(g1011, float4(Pf1.x, Pf0.y, Pf1.zw)); - float n0111 = dot(g0111, float4(Pf0.x, Pf1.yzw)); - float n1111 = dot(g1111, Pf1); - - float4 fade_xyzw = fade(Pf0); - float4 n_0w = lerp(float4(n0000, n1000, n0100, n1100), float4(n0001, n1001, n0101, n1101), fade_xyzw.w); - float4 n_1w = lerp(float4(n0010, n1010, n0110, n1110), float4(n0011, n1011, n0111, n1111), fade_xyzw.w); - float4 n_zw = lerp(n_0w, n_1w, fade_xyzw.z); - float2 n_yzw = lerp(n_zw.xy, n_zw.zw, fade_xyzw.y); - float n_xyzw = lerp(n_yzw.x, n_yzw.y, fade_xyzw.x); - return 2.2 * n_xyzw; -} - -// Classic Perlin noise, periodic version -float pnoise(float4 P, float4 rep) -{ - float4 Pi0 = mod(floor(P), rep); // Integer part modulo rep - float4 Pi1 = mod(Pi0 + 1.0, rep); // Integer part + 1 mod rep - Pi0 = mod289(Pi0); - Pi1 = mod289(Pi1); - float4 Pf0 = frac(P); // Fractional part for interpolation - float4 Pf1 = Pf0 - 1.0; // Fractional part - 1.0 - float4 ix = float4(Pi0.x, Pi1.x, Pi0.x, Pi1.x); - float4 iy = float4(Pi0.yy, Pi1.yy); - float4 iz0 = float4(Pi0.zzzz); - float4 iz1 = float4(Pi1.zzzz); - float4 iw0 = float4(Pi0.wwww); - float4 iw1 = float4(Pi1.wwww); - - float4 ixy = permute(permute(ix) + iy); - float4 ixy0 = permute(ixy + iz0); - float4 ixy1 = permute(ixy + iz1); - float4 ixy00 = permute(ixy0 + iw0); - float4 ixy01 = permute(ixy0 + iw1); - float4 ixy10 = permute(ixy1 + iw0); - float4 ixy11 = permute(ixy1 + iw1); - - float4 gx00 = ixy00 * (1.0 / 7.0); - float4 gy00 = floor(gx00) * (1.0 / 7.0); - float4 gz00 = floor(gy00) * (1.0 / 6.0); - gx00 = frac(gx00) - 0.5; - gy00 = frac(gy00) - 0.5; - gz00 = frac(gz00) - 0.5; - float4 gw00 = float4(0.75) - abs(gx00) - abs(gy00) - abs(gz00); - float4 sw00 = step(gw00, float4(0.0)); - gx00 -= sw00 * (step(0.0, gx00) - 0.5); - gy00 -= sw00 * (step(0.0, gy00) - 0.5); - - float4 gx01 = ixy01 * (1.0 / 7.0); - float4 gy01 = floor(gx01) * (1.0 / 7.0); - float4 gz01 = floor(gy01) * (1.0 / 6.0); - gx01 = frac(gx01) - 0.5; - gy01 = frac(gy01) - 0.5; - gz01 = frac(gz01) - 0.5; - float4 gw01 = float4(0.75) - abs(gx01) - abs(gy01) - abs(gz01); - float4 sw01 = step(gw01, float4(0.0)); - gx01 -= sw01 * (step(0.0, gx01) - 0.5); - gy01 -= sw01 * (step(0.0, gy01) - 0.5); - - float4 gx10 = ixy10 * (1.0 / 7.0); - float4 gy10 = floor(gx10) * (1.0 / 7.0); - float4 gz10 = floor(gy10) * (1.0 / 6.0); - gx10 = frac(gx10) - 0.5; - gy10 = frac(gy10) - 0.5; - gz10 = frac(gz10) - 0.5; - float4 gw10 = float4(0.75) - abs(gx10) - abs(gy10) - abs(gz10); - float4 sw10 = step(gw10, float4(0.0)); - gx10 -= sw10 * (step(0.0, gx10) - 0.5); - gy10 -= sw10 * (step(0.0, gy10) - 0.5); - - float4 gx11 = ixy11 * (1.0 / 7.0); - float4 gy11 = floor(gx11) * (1.0 / 7.0); - float4 gz11 = floor(gy11) * (1.0 / 6.0); - gx11 = frac(gx11) - 0.5; - gy11 = frac(gy11) - 0.5; - gz11 = frac(gz11) - 0.5; - float4 gw11 = float4(0.75) - abs(gx11) - abs(gy11) - abs(gz11); - float4 sw11 = step(gw11, float4(0.0)); - gx11 -= sw11 * (step(0.0, gx11) - 0.5); - gy11 -= sw11 * (step(0.0, gy11) - 0.5); - - float4 g0000 = float4(gx00.x,gy00.x,gz00.x,gw00.x); - float4 g1000 = float4(gx00.y,gy00.y,gz00.y,gw00.y); - float4 g0100 = float4(gx00.z,gy00.z,gz00.z,gw00.z); - float4 g1100 = float4(gx00.w,gy00.w,gz00.w,gw00.w); - float4 g0010 = float4(gx10.x,gy10.x,gz10.x,gw10.x); - float4 g1010 = float4(gx10.y,gy10.y,gz10.y,gw10.y); - float4 g0110 = float4(gx10.z,gy10.z,gz10.z,gw10.z); - float4 g1110 = float4(gx10.w,gy10.w,gz10.w,gw10.w); - float4 g0001 = float4(gx01.x,gy01.x,gz01.x,gw01.x); - float4 g1001 = float4(gx01.y,gy01.y,gz01.y,gw01.y); - float4 g0101 = float4(gx01.z,gy01.z,gz01.z,gw01.z); - float4 g1101 = float4(gx01.w,gy01.w,gz01.w,gw01.w); - float4 g0011 = float4(gx11.x,gy11.x,gz11.x,gw11.x); - float4 g1011 = float4(gx11.y,gy11.y,gz11.y,gw11.y); - float4 g0111 = float4(gx11.z,gy11.z,gz11.z,gw11.z); - float4 g1111 = float4(gx11.w,gy11.w,gz11.w,gw11.w); - - float4 norm00 = taylorInvSqrt(float4(dot(g0000, g0000), dot(g0100, g0100), dot(g1000, g1000), dot(g1100, g1100))); - g0000 *= norm00.x; - g0100 *= norm00.y; - g1000 *= norm00.z; - g1100 *= norm00.w; - - float4 norm01 = taylorInvSqrt(float4(dot(g0001, g0001), dot(g0101, g0101), dot(g1001, g1001), dot(g1101, g1101))); - g0001 *= norm01.x; - g0101 *= norm01.y; - g1001 *= norm01.z; - g1101 *= norm01.w; - - float4 norm10 = taylorInvSqrt(float4(dot(g0010, g0010), dot(g0110, g0110), dot(g1010, g1010), dot(g1110, g1110))); - g0010 *= norm10.x; - g0110 *= norm10.y; - g1010 *= norm10.z; - g1110 *= norm10.w; - - float4 norm11 = taylorInvSqrt(float4(dot(g0011, g0011), dot(g0111, g0111), dot(g1011, g1011), dot(g1111, g1111))); - g0011 *= norm11.x; - g0111 *= norm11.y; - g1011 *= norm11.z; - g1111 *= norm11.w; - - float n0000 = dot(g0000, Pf0); - float n1000 = dot(g1000, float4(Pf1.x, Pf0.yzw)); - float n0100 = dot(g0100, float4(Pf0.x, Pf1.y, Pf0.zw)); - float n1100 = dot(g1100, float4(Pf1.xy, Pf0.zw)); - float n0010 = dot(g0010, float4(Pf0.xy, Pf1.z, Pf0.w)); - float n1010 = dot(g1010, float4(Pf1.x, Pf0.y, Pf1.z, Pf0.w)); - float n0110 = dot(g0110, float4(Pf0.x, Pf1.yz, Pf0.w)); - float n1110 = dot(g1110, float4(Pf1.xyz, Pf0.w)); - float n0001 = dot(g0001, float4(Pf0.xyz, Pf1.w)); - float n1001 = dot(g1001, float4(Pf1.x, Pf0.yz, Pf1.w)); - float n0101 = dot(g0101, float4(Pf0.x, Pf1.y, Pf0.z, Pf1.w)); - float n1101 = dot(g1101, float4(Pf1.xy, Pf0.z, Pf1.w)); - float n0011 = dot(g0011, float4(Pf0.xy, Pf1.zw)); - float n1011 = dot(g1011, float4(Pf1.x, Pf0.y, Pf1.zw)); - float n0111 = dot(g0111, float4(Pf0.x, Pf1.yzw)); - float n1111 = dot(g1111, Pf1); - - float4 fade_xyzw = fade(Pf0); - float4 n_0w = lerp(float4(n0000, n1000, n0100, n1100), float4(n0001, n1001, n0101, n1101), fade_xyzw.w); - float4 n_1w = lerp(float4(n0010, n1010, n0110, n1110), float4(n0011, n1011, n0111, n1111), fade_xyzw.w); - float4 n_zw = lerp(n_0w, n_1w, fade_xyzw.z); - float2 n_yzw = lerp(n_zw.xy, n_zw.zw, fade_xyzw.y); - float n_xyzw = lerp(n_yzw.x, n_yzw.y, fade_xyzw.x); - return 2.2 * n_xyzw; -} - -#endif \ No newline at end of file diff --git a/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Noise/classicnoise4D.cginc.meta b/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Noise/classicnoise4D.cginc.meta deleted file mode 100644 index 5e9d7f3..0000000 --- a/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Noise/classicnoise4D.cginc.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 1dd8a94fd1cd7714ab6ea45bc0ca4fd6 -timeCreated: 1511764501 -licenseType: Free -ShaderImporter: - externalObjects: {} - defaultTextures: [] - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Noise/noise2D.cginc b/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Noise/noise2D.cginc deleted file mode 100644 index dd0fd06..0000000 --- a/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Noise/noise2D.cginc +++ /dev/null @@ -1,66 +0,0 @@ -#ifndef __NOISE_2D__ -#define __NOISE_2D__ - -#include "noiseMath.cginc" - -// -// Description : Array and textureless GLSL 2D simplex noise function. -// Author : Ian McEwan, Ashima Arts. -// Maintainer : stegu -// Lastmod : 20110822 (ijm) -// License : Copyright (C) 2011 Ashima Arts. All rights reserved. -// Distributed under the MIT License. See LICENSE file. -// https://github.com/ashima/webgl-noise -// https://github.com/stegu/webgl-noise -// - -float snoise(float2 v) -{ - const float4 C = float4(0.211324865405187, // (3.0-sqrt(3.0))/6.0 - 0.366025403784439, // 0.5*(sqrt(3.0)-1.0) - -0.577350269189626, // -1.0 + 2.0 * C.x - 0.024390243902439); // 1.0 / 41.0 - // First corner - float2 i = floor(v + dot(v, C.yy) ); - float2 x0 = v - i + dot(i, C.xx); - - // Other corners - float2 i1; - //i1.x = step( x0.y, x0.x ); // x0.x > x0.y ? 1.0 : 0.0 - //i1.y = 1.0 - i1.x; - i1 = (x0.x > x0.y) ? float2(1.0, 0.0) : float2(0.0, 1.0); - // x0 = x0 - 0.0 + 0.0 * C.xx ; - // x1 = x0 - i1 + 1.0 * C.xx ; - // x2 = x0 - 1.0 + 2.0 * C.xx ; - float4 x12 = x0.xyxy + C.xxzz; - x12.xy -= i1; - - // Permutations - i = mod289(i); // Avoid truncation effects in permutation - float3 p = permute( permute( i.y + float3(0.0, i1.y, 1.0 )) - + i.x + float3(0.0, i1.x, 1.0 )); - - float3 m = max(0.5 - float3(dot(x0,x0), dot(x12.xy,x12.xy), dot(x12.zw,x12.zw)), 0.0); - m = m*m ; - m = m*m ; - - // Gradients: 41 points uniformly over a line, mapped onto a diamond. - // The ring size 17*17 = 289 is close to a multiple of 41 (41*7 = 287) - - float3 x = 2.0 * frac(p * C.www) - 1.0; - float3 h = abs(x) - 0.5; - float3 ox = floor(x + 0.5); - float3 a0 = x - ox; - - // Normalise gradients implicitly by scaling m - // Approximation of: m *= inversesqrt( a0*a0 + h*h ); - m *= 1.79284291400159 - 0.85373472095314 * ( a0*a0 + h*h ); - - // Compute final noise value at P - float3 g; - g.x = a0.x * x0.x + h.x * x0.y; - g.yz = a0.yz * x12.xz + h.yz * x12.yw; - return 130.0 * dot(m, g); -} - -#endif \ No newline at end of file diff --git a/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Noise/noise2D.cginc.meta b/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Noise/noise2D.cginc.meta deleted file mode 100644 index 0d01a06..0000000 --- a/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Noise/noise2D.cginc.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: dc4d13d9bf897e24e811156756e27090 -timeCreated: 1511764501 -licenseType: Free -ShaderImporter: - externalObjects: {} - defaultTextures: [] - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Noise/noise3D.cginc b/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Noise/noise3D.cginc deleted file mode 100644 index d08dae0..0000000 --- a/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Noise/noise3D.cginc +++ /dev/null @@ -1,93 +0,0 @@ -#ifndef __NOISE_3D__ -#define __NOISE_3D__ - -#include "noiseMath.cginc" - -// -// Description : Array and textureless GLSL 2D/3D/4D simplex -// noise functions. -// Author : Ian McEwan, Ashima Arts. -// Maintainer : stegu -// Lastmod : 20110822 (ijm) -// License : Copyright (C) 2011 Ashima Arts. All rights reserved. -// Distributed under the MIT License. See LICENSE file. -// https://github.com/ashima/webgl-noise -// https://github.com/stegu/webgl-noise -// - -float snoise(float3 v) -{ - const float2 C = float2(1.0/6.0, 1.0/3.0) ; - const float4 D = float4(0.0, 0.5, 1.0, 2.0); - - // First corner - float3 i = floor(v + dot(v, C.yyy) ); - float3 x0 = v - i + dot(i, C.xxx) ; - - // Other corners - float3 g = step(x0.yzx, x0.xyz); - float3 l = 1.0 - g; - float3 i1 = min( g.xyz, l.zxy ); - float3 i2 = max( g.xyz, l.zxy ); - - // x0 = x0 - 0.0 + 0.0 * C.xxx; - // x1 = x0 - i1 + 1.0 * C.xxx; - // x2 = x0 - i2 + 2.0 * C.xxx; - // x3 = x0 - 1.0 + 3.0 * C.xxx; - float3 x1 = x0 - i1 + C.xxx; - float3 x2 = x0 - i2 + C.yyy; // 2.0*C.x = 1/3 = C.y - float3 x3 = x0 - D.yyy; // -1.0+3.0*C.x = -0.5 = -D.y - - // Permutations - i = mod289(i); - float4 p = permute( permute( permute( - i.z + float4(0.0, i1.z, i2.z, 1.0 )) - + i.y + float4(0.0, i1.y, i2.y, 1.0 )) - + i.x + float4(0.0, i1.x, i2.x, 1.0 )); - - // Gradients: 7x7 points over a square, mapped onto an octahedron. - // The ring size 17*17 = 289 is close to a multiple of 49 (49*6 = 294) - float n_ = 0.142857142857; // 1.0/7.0 - float3 ns = n_ * D.wyz - D.xzx; - - float4 j = p - 49.0 * floor(p * ns.z * ns.z); // mod(p,7*7) - - float4 x_ = floor(j * ns.z); - float4 y_ = floor(j - 7.0 * x_ ); // mod(j,N) - - float4 x = x_ *ns.x + ns.yyyy; - float4 y = y_ *ns.x + ns.yyyy; - float4 h = 1.0 - abs(x) - abs(y); - - float4 b0 = float4( x.xy, y.xy ); - float4 b1 = float4( x.zw, y.zw ); - - //float4 s0 = float4(lessThan(b0,0.0))*2.0 - 1.0; - //float4 s1 = float4(lessThan(b1,0.0))*2.0 - 1.0; - float4 s0 = floor(b0)*2.0 + 1.0; - float4 s1 = floor(b1)*2.0 + 1.0; - float4 sh = -step(h, float4(0.0)); - - float4 a0 = b0.xzyw + s0.xzyw*sh.xxyy ; - float4 a1 = b1.xzyw + s1.xzyw*sh.zzww ; - - float3 p0 = float3(a0.xy,h.x); - float3 p1 = float3(a0.zw,h.y); - float3 p2 = float3(a1.xy,h.z); - float3 p3 = float3(a1.zw,h.w); - - //Normalise gradients - float4 norm = taylorInvSqrt(float4(dot(p0,p0), dot(p1,p1), dot(p2, p2), dot(p3,p3))); - p0 *= norm.x; - p1 *= norm.y; - p2 *= norm.z; - p3 *= norm.w; - - // Mix final noise value - float4 m = max(0.6 - float4(dot(x0,x0), dot(x1,x1), dot(x2,x2), dot(x3,x3)), 0.0); - m = m * m; - return 42.0 * dot( m*m, float4( dot(p0,x0), dot(p1,x1), - dot(p2,x2), dot(p3,x3) ) ); -} - -#endif \ No newline at end of file diff --git a/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Noise/noise3D.cginc.meta b/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Noise/noise3D.cginc.meta deleted file mode 100644 index d5cec09..0000000 --- a/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Noise/noise3D.cginc.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 57958dda2d526f4468d4d3fe372c1f27 -timeCreated: 1511764501 -licenseType: Free -ShaderImporter: - externalObjects: {} - defaultTextures: [] - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Noise/noise3Dgrad.cginc b/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Noise/noise3Dgrad.cginc deleted file mode 100644 index bb61dea..0000000 --- a/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Noise/noise3Dgrad.cginc +++ /dev/null @@ -1,101 +0,0 @@ -#ifndef __NOISE_3D_GRAD__ -#define __NOISE_3D_GRAD__ - -#include "noiseMath.cginc" - -// -// Description : Array and textureless GLSL 2D/3D/4D simplex -// noise functions. -// Author : Ian McEwan, Ashima Arts. -// Maintainer : stegu -// Lastmod : 20110822 (ijm) -// License : Copyright (C) 2011 Ashima Arts. All rights reserved. -// Distributed under the MIT License. See LICENSE file. -// https://github.com/ashima/webgl-noise -// https://github.com/stegu/webgl-noise -// - -float snoise(float3 v, out float3 gradient) -{ - const float2 C = float2(1.0/6.0, 1.0/3.0) ; - const float4 D = float4(0.0, 0.5, 1.0, 2.0); - - // First corner - float3 i = floor(v + dot(v, C.yyy) ); - float3 x0 = v - i + dot(i, C.xxx) ; - - // Other corners - float3 g = step(x0.yzx, x0.xyz); - float3 l = 1.0 - g; - float3 i1 = min( g.xyz, l.zxy ); - float3 i2 = max( g.xyz, l.zxy ); - - // x0 = x0 - 0.0 + 0.0 * C.xxx; - // x1 = x0 - i1 + 1.0 * C.xxx; - // x2 = x0 - i2 + 2.0 * C.xxx; - // x3 = x0 - 1.0 + 3.0 * C.xxx; - float3 x1 = x0 - i1 + C.xxx; - float3 x2 = x0 - i2 + C.yyy; // 2.0*C.x = 1/3 = C.y - float3 x3 = x0 - D.yyy; // -1.0+3.0*C.x = -0.5 = -D.y - - // Permutations - i = mod289(i); - float4 p = permute( permute( permute( - i.z + float4(0.0, i1.z, i2.z, 1.0 )) - + i.y + float4(0.0, i1.y, i2.y, 1.0 )) - + i.x + float4(0.0, i1.x, i2.x, 1.0 )); - - // Gradients: 7x7 points over a square, mapped onto an octahedron. - // The ring size 17*17 = 289 is close to a multiple of 49 (49*6 = 294) - float n_ = 0.142857142857; // 1.0/7.0 - float3 ns = n_ * D.wyz - D.xzx; - - float4 j = p - 49.0 * floor(p * ns.z * ns.z); // mod(p,7*7) - - float4 x_ = floor(j * ns.z); - float4 y_ = floor(j - 7.0 * x_ ); // mod(j,N) - - float4 x = x_ *ns.x + ns.yyyy; - float4 y = y_ *ns.x + ns.yyyy; - float4 h = 1.0 - abs(x) - abs(y); - - float4 b0 = float4( x.xy, y.xy ); - float4 b1 = float4( x.zw, y.zw ); - - //float4 s0 = float4(lessThan(b0,0.0))*2.0 - 1.0; - //float4 s1 = float4(lessThan(b1,0.0))*2.0 - 1.0; - float4 s0 = floor(b0)*2.0 + 1.0; - float4 s1 = floor(b1)*2.0 + 1.0; - float4 sh = -step(h, float4(0, 0, 0, 0)); - - float4 a0 = b0.xzyw + s0.xzyw*sh.xxyy ; - float4 a1 = b1.xzyw + s1.xzyw*sh.zzww ; - - float3 p0 = float3(a0.xy,h.x); - float3 p1 = float3(a0.zw,h.y); - float3 p2 = float3(a1.xy,h.z); - float3 p3 = float3(a1.zw,h.w); - - //Normalise gradients - float4 norm = taylorInvSqrt(float4(dot(p0,p0), dot(p1,p1), dot(p2, p2), dot(p3,p3))); - p0 *= norm.x; - p1 *= norm.y; - p2 *= norm.z; - p3 *= norm.w; - - // Mix final noise value - float4 m = max(0.6 - float4(dot(x0,x0), dot(x1,x1), dot(x2,x2), dot(x3,x3)), 0.0); - float4 m2 = m * m; - float4 m4 = m2 * m2; - float4 pdotx = float4(dot(p0,x0), dot(p1,x1), dot(p2,x2), dot(p3,x3)); - - // Determine noise gradient - float4 temp = m2 * m * pdotx; - gradient = -8.0 * (temp.x * x0 + temp.y * x1 + temp.z * x2 + temp.w * x3); - gradient += m4.x * p0 + m4.y * p1 + m4.z * p2 + m4.w * p3; - gradient *= 42.0; - - return 42.0 * dot(m4, pdotx); -} - -#endif \ No newline at end of file diff --git a/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Noise/noise3Dgrad.cginc.meta b/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Noise/noise3Dgrad.cginc.meta deleted file mode 100644 index 32abf80..0000000 --- a/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Noise/noise3Dgrad.cginc.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: f71fd4322ebeb1b449257aef7f8856f6 -timeCreated: 1511764501 -licenseType: Free -ShaderImporter: - externalObjects: {} - defaultTextures: [] - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Noise/noise4D.cginc b/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Noise/noise4D.cginc deleted file mode 100644 index 53e589b..0000000 --- a/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Noise/noise4D.cginc +++ /dev/null @@ -1,110 +0,0 @@ -#ifndef __NOISE_4D__ -#define __NOISE_4D__ - -#include "noiseMath.cginc" - -// -// Description : Array and textureless GLSL 2D/3D/4D simplex -// noise functions. -// Author : Ian McEwan, Ashima Arts. -// Maintainer : stegu -// Lastmod : 20110822 (ijm) -// License : Copyright (C) 2011 Ashima Arts. All rights reserved. -// Distributed under the MIT License. See LICENSE file. -// https://github.com/ashima/webgl-noise -// https://github.com/stegu/webgl-noise -// - -float4 grad4(float j, float4 ip) -{ - const float4 ones = float4(1.0, 1.0, 1.0, -1.0); - float4 p, s; - - p.xyz = floor( frac (float3(j) * ip.xyz) * 7.0) * ip.z - 1.0; - p.w = 1.5 - dot(abs(p.xyz), ones.xyz); - s = float4(lessThan(p, float4(0.0))); - p.xyz = p.xyz + (s.xyz*2.0 - 1.0) * s.www; - - return p; -} - -float snoise(float4 v) -{ - // (sqrt(5) - 1)/4 = F4, used once below - const float F4 = 0.309016994374947451; - const float4 C = float4( 0.138196601125011, // (5 - sqrt(5))/20 G4 - 0.276393202250021, // 2 * G4 - 0.414589803375032, // 3 * G4 - -0.447213595499958); // -1 + 4 * G4 - - // First corner - float4 i = floor(v + dot(v, float4(F4)) ); - float4 x0 = v - i + dot(i, C.xxxx); - - // Other corners - - // Rank sorting originally contributed by Bill Licea-Kane, AMD (formerly ATI) - float4 i0; - float3 isX = step( x0.yzw, x0.xxx ); - float3 isYZ = step( x0.zww, x0.yyz ); - // i0.x = dot( isX, float3( 1.0 ) ); - i0.x = isX.x + isX.y + isX.z; - i0.yzw = 1.0 - isX; - // i0.y += dot( isYZ.xy, float2( 1.0 ) ); - i0.y += isYZ.x + isYZ.y; - i0.zw += 1.0 - isYZ.xy; - i0.z += isYZ.z; - i0.w += 1.0 - isYZ.z; - - // i0 now contains the unique values 0,1,2,3 in each channel - float4 i3 = clamp( i0, 0.0, 1.0 ); - float4 i2 = clamp( i0-1.0, 0.0, 1.0 ); - float4 i1 = clamp( i0-2.0, 0.0, 1.0 ); - - // x0 = x0 - 0.0 + 0.0 * C.xxxx - // x1 = x0 - i1 + 1.0 * C.xxxx - // x2 = x0 - i2 + 2.0 * C.xxxx - // x3 = x0 - i3 + 3.0 * C.xxxx - // x4 = x0 - 1.0 + 4.0 * C.xxxx - float4 x1 = x0 - i1 + C.xxxx; - float4 x2 = x0 - i2 + C.yyyy; - float4 x3 = x0 - i3 + C.zzzz; - float4 x4 = x0 + C.wwww; - - // Permutations - i = mod289(i); - float j0 = permute( permute( permute( permute(i.w) + i.z) + i.y) + i.x); - float4 j1 = permute( permute( permute( permute ( - i.w + float4(i1.w, i2.w, i3.w, 1.0 )) - + i.z + float4(i1.z, i2.z, i3.z, 1.0 )) - + i.y + float4(i1.y, i2.y, i3.y, 1.0 )) - + i.x + float4(i1.x, i2.x, i3.x, 1.0 )); - - // Gradients: 7x7x6 points over a cube, mapped onto a 4-cross polytope - // 7*7*6 = 294, which is close to the ring size 17*17 = 289. - float4 ip = float4(1.0/294.0, 1.0/49.0, 1.0/7.0, 0.0) ; - - float4 p0 = grad4(j0, ip); - float4 p1 = grad4(j1.x, ip); - float4 p2 = grad4(j1.y, ip); - float4 p3 = grad4(j1.z, ip); - float4 p4 = grad4(j1.w, ip); - - // Normalise gradients - float4 norm = taylorInvSqrt(float4(dot(p0,p0), dot(p1,p1), dot(p2, p2), dot(p3,p3))); - p0 *= norm.x; - p1 *= norm.y; - p2 *= norm.z; - p3 *= norm.w; - p4 *= taylorInvSqrt(dot(p4,p4)); - - // Mix contributions from the five corners - float3 m0 = max(0.6 - float3(dot(x0,x0), dot(x1,x1), dot(x2,x2)), 0.0); - float2 m1 = max(0.6 - float2(dot(x3,x3), dot(x4,x4) ), 0.0); - m0 = m0 * m0; - m1 = m1 * m1; - return 49.0 * ( dot(m0*m0, float3( dot( p0, x0 ), dot( p1, x1 ), dot( p2, x2 ))) - + dot(m1*m1, float2( dot( p3, x3 ), dot( p4, x4 ) ) ) ) ; -} - -#endif \ No newline at end of file diff --git a/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Noise/noise4D.cginc.meta b/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Noise/noise4D.cginc.meta deleted file mode 100644 index 47e7456..0000000 --- a/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Noise/noise4D.cginc.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 098c1c0087563154b884b2b3de5b3309 -timeCreated: 1511764501 -licenseType: Free -ShaderImporter: - externalObjects: {} - defaultTextures: [] - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Noise/noiseMath.cginc b/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Noise/noiseMath.cginc deleted file mode 100644 index 82d457f..0000000 --- a/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Noise/noiseMath.cginc +++ /dev/null @@ -1,63 +0,0 @@ -#ifndef __NOISE_MATH__ -#define __NOISE_MATH__ - -// Modulo 289 without a division (only multiplications) -float mod289(float x) { - return x - floor(x * (1.0 / 289.0)) * 289.0; -} - -float2 mod289(float2 x) { - return x - floor(x * (1.0 / 289.0)) * 289.0; -} - -float3 mod289(float3 x) { - return x - floor(x * (1.0 / 289.0)) * 289.0; -} - -float4 mod289(float4 x) { - return x - floor(x * (1.0 / 289.0)) * 289.0; -} - -// Modulo 7 without a division -float3 mod7(float3 x) { - return x - floor(x * (1.0 / 7.0)) * 7.0; -} - -float4 mod7(float4 x) { - return x - floor(x * (1.0 / 7.0)) * 7.0; -} - -// Permutation polynomial: (34x^2 + x) mod 289 -float permute(float x) { - return mod289(((x*34.0) + 1.0)*x); -} - -float3 permute(float3 x) { - return mod289((34.0 * x + 1.0) * x); -} - -float4 permute(float4 x) { - return mod289((34.0 * x + 1.0) * x); -} - -float taylorInvSqrt(float r) { - return 1.79284291400159 - 0.85373472095314 * r; -} - -float4 taylorInvSqrt(float4 r) { - return 1.79284291400159 - 0.85373472095314 * r; -} - -float2 fade(float2 t) { - return t*t*t*(t*(t*6.0 - 15.0) + 10.0); -} - -float3 fade(float3 t) { - return t*t*t*(t*(t*6.0 - 15.0) + 10.0); -} - -float4 fade(float4 t) { - return t*t*t*(t*(t*6.0 - 15.0) + 10.0); -} - -#endif \ No newline at end of file diff --git a/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Noise/noiseMath.cginc.meta b/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Noise/noiseMath.cginc.meta deleted file mode 100644 index a88ccfb..0000000 --- a/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Noise/noiseMath.cginc.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: ea9d49db2c199ce41a7f57eaf17cae0f -timeCreated: 1511764552 -licenseType: Free -ShaderImporter: - externalObjects: {} - defaultTextures: [] - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Noise/psrdnoise2D.cginc b/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Noise/psrdnoise2D.cginc deleted file mode 100644 index c84ae7b..0000000 --- a/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Noise/psrdnoise2D.cginc +++ /dev/null @@ -1,459 +0,0 @@ -// -// float3 psrdnoise(float2 pos, float2 per, float rot) -// float3 psdnoise(float2 pos, float2 per) -// float psrnoise(float2 pos, float2 per, float rot) -// float psnoise(float2 pos, float2 per) -// float3 srdnoise(float2 pos, float rot) -// float3 sdnoise(float2 pos) -// float srnoise(float2 pos, float rot) -// float snoise(float2 pos) -#ifndef __PSRD_NOISE_2D__ -#define __PSRD_NOISE_2D__ - -#include "noiseMath.cginc" - -// -// Periodic (tiling) 2-D simplex noise (hexagonal lattice gradient noise) -// with rotating gradients and analytic derivatives. -// Variants also without the derivative (no "d" in the name), without -// the tiling property (no "p" in the name) and without the rotating -// gradients (no "r" in the name). -// -// This is (yet) another variation on simplex noise. It's similar to the -// version presented by Ken Perlin, but the grid is axis-aligned and -// slightly stretched in the y direction to permit rectangular tiling. -// -// The noise can be made to tile seamlessly to any integer period in x and -// any even integer period in y. Odd periods may be specified for y, but -// then the actual tiling period will be twice that number. -// -// The rotating gradients give the appearance of a swirling motion, and can -// serve a similar purpose for animation as motion along z in 3-D noise. -// The rotating gradients in conjunction with the analytic derivatives -// can make "flow noise" effects as presented by Perlin and Neyret. -// -// float3 {p}s{r}dnoise(float2 pos {, float2 per} {, float rot}) -// "pos" is the input (x,y) coordinate -// "per" is the x and y period, where per.x is a positive integer -// and per.y is a positive even integer -// "rot" is the angle to rotate the gradients (any float value, -// where 0.0 is no rotation and 1.0 is one full turn) -// The first component of the 3-element return vector is the noise value. -// The second and third components are the x and y partial derivatives. -// -// float {p}s{r}noise(float2 pos {, float2 per} {, float rot}) -// "pos" is the input (x,y) coordinate -// "per" is the x and y period, where per.x is a positive integer -// and per.y is a positive even integer -// "rot" is the angle to rotate the gradients (any float value, -// where 0.0 is no rotation and 1.0 is one full turn) -// The return value is the noise value. -// Partial derivatives are not computed, making these functions faster. -// -// Author: Stefan Gustavson (stefan.gustavson@gmail.com) -// Version 2016-05-10. -// -// Many thanks to Ian McEwan of Ashima Arts for the -// idea of using a permutation polynomial. -// -// Copyright (c) 2016 Stefan Gustavson. All rights reserved. -// Distributed under the MIT license. See LICENSE file. -// https://github.com/stegu/webgl-noise -// - -// -// TODO: One-pixel wide artefacts used to occur due to precision issues with -// the gradient indexing. This is specific to this variant of noise, because -// one axis of the simplex grid is perfectly aligned with the input x axis. -// The errors were rare, and they are now very unlikely to ever be visible -// after a quick fix was introduced: a small offset is added to the y coordinate. -// A proper fix would involve using round() instead of floor() in selected -// places, but the quick fix works fine. -// (If you run into problems with this, please let me know.) -// - -// Hashed 2-D gradients with an extra rotation. -// (The constant 0.0243902439 is 1/41) -float2 rgrad2(float2 p, float rot) { -#if 0 -// Map from a line to a diamond such that a shift maps to a rotation. - float u = permute(permute(p.x) + p.y) * 0.0243902439 + rot; // Rotate by shift - u = 4.0 * frac(u) - 2.0; - // (This vector could be normalized, exactly or approximately.) - return float2(abs(u)-1.0, abs(abs(u+1.0)-2.0)-1.0); -#else -// For more isotropic gradients, sin/cos can be used instead. - float u = permute(permute(p.x) + p.y) * 0.0243902439 + rot; // Rotate by shift - u = frac(u) * 6.28318530718; // 2*pi - return float2(cos(u), sin(u)); -#endif -} - -// -// 2-D tiling simplex noise with rotating gradients and analytical derivative. -// The first component of the 3-element return vector is the noise value, -// and the second and third components are the x and y partial derivatives. -// -float3 psrdnoise(float2 pos, float2 per, float rot) { - // Hack: offset y slightly to hide some rare artifacts - pos.y += 0.01; - // Skew to hexagonal grid - float2 uv = float2(pos.x + pos.y*0.5, pos.y); - - float2 i0 = floor(uv); - float2 f0 = frac(uv); - // Traversal order - float2 i1 = (f0.x > f0.y) ? float2(1.0, 0.0) : float2(0.0, 1.0); - - // Unskewed grid points in (x,y) space - float2 p0 = float2(i0.x - i0.y * 0.5, i0.y); - float2 p1 = float2(p0.x + i1.x - i1.y * 0.5, p0.y + i1.y); - float2 p2 = float2(p0.x + 0.5, p0.y + 1.0); - - // Integer grid point indices in (u,v) space - i1 = i0 + i1; - float2 i2 = i0 + float2(1.0, 1.0); - - // Vectors in unskewed (x,y) coordinates from - // each of the simplex corners to the evaluation point - float2 d0 = pos - p0; - float2 d1 = pos - p1; - float2 d2 = pos - p2; - - // Wrap i0, i1 and i2 to the desired period before gradient hashing: - // wrap points in (x,y), map to (u,v) - float3 xw = mod(float3(p0.x, p1.x, p2.x), per.x); - float3 yw = mod(float3(p0.y, p1.y, p2.y), per.y); - float3 iuw = xw + 0.5 * yw; - float3 ivw = yw; - - // Create gradients from indices - float2 g0 = rgrad2(float2(iuw.x, ivw.x), rot); - float2 g1 = rgrad2(float2(iuw.y, ivw.y), rot); - float2 g2 = rgrad2(float2(iuw.z, ivw.z), rot); - - // Gradients dot vectors to corresponding corners - // (The derivatives of this are simply the gradients) - float3 w = float3(dot(g0, d0), dot(g1, d1), dot(g2, d2)); - - // Radial weights from corners - // 0.8 is the square of 2/sqrt(5), the distance from - // a grid point to the nearest simplex boundary - float3 t = 0.8 - float3(dot(d0, d0), dot(d1, d1), dot(d2, d2)); - - // Partial derivatives for analytical gradient computation - float3 dtdx = -2.0 * float3(d0.x, d1.x, d2.x); - float3 dtdy = -2.0 * float3(d0.y, d1.y, d2.y); - - // Set influence of each surflet to zero outside radius sqrt(0.8) - if (t.x < 0.0) { - dtdx.x = 0.0; - dtdy.x = 0.0; - t.x = 0.0; - } - if (t.y < 0.0) { - dtdx.y = 0.0; - dtdy.y = 0.0; - t.y = 0.0; - } - if (t.z < 0.0) { - dtdx.z = 0.0; - dtdy.z = 0.0; - t.z = 0.0; - } - - // Fourth power of t (and third power for derivative) - float3 t2 = t * t; - float3 t4 = t2 * t2; - float3 t3 = t2 * t; - - // Final noise value is: - // sum of ((radial weights) times (gradient dot vector from corner)) - float n = dot(t4, w); - - // Final analytical derivative (gradient of a sum of scalar products) - float2 dt0 = float2(dtdx.x, dtdy.x) * 4.0 * t3.x; - float2 dn0 = t4.x * g0 + dt0 * w.x; - float2 dt1 = float2(dtdx.y, dtdy.y) * 4.0 * t3.y; - float2 dn1 = t4.y * g1 + dt1 * w.y; - float2 dt2 = float2(dtdx.z, dtdy.z) * 4.0 * t3.z; - float2 dn2 = t4.z * g2 + dt2 * w.z; - - return 11.0*float3(n, dn0 + dn1 + dn2); -} - -// -// 2-D tiling simplex noise with fixed gradients -// and analytical derivative. -// This function is implemented as a wrapper to "psrdnoise", -// at the minimal cost of three extra additions. -// -float3 psdnoise(float2 pos, float2 per) { - return psrdnoise(pos, per, 0.0); -} - -// -// 2-D tiling simplex noise with rotating gradients, -// but without the analytical derivative. -// -float psrnoise(float2 pos, float2 per, float rot) { - // Offset y slightly to hide some rare artifacts - pos.y += 0.001; - // Skew to hexagonal grid - float2 uv = float2(pos.x + pos.y*0.5, pos.y); - - float2 i0 = floor(uv); - float2 f0 = frac(uv); - // Traversal order - float2 i1 = (f0.x > f0.y) ? float2(1.0, 0.0) : float2(0.0, 1.0); - - // Unskewed grid points in (x,y) space - float2 p0 = float2(i0.x - i0.y * 0.5, i0.y); - float2 p1 = float2(p0.x + i1.x - i1.y * 0.5, p0.y + i1.y); - float2 p2 = float2(p0.x + 0.5, p0.y + 1.0); - - // Integer grid point indices in (u,v) space - i1 = i0 + i1; - float2 i2 = i0 + float2(1.0, 1.0); - - // Vectors in unskewed (x,y) coordinates from - // each of the simplex corners to the evaluation point - float2 d0 = pos - p0; - float2 d1 = pos - p1; - float2 d2 = pos - p2; - - // Wrap i0, i1 and i2 to the desired period before gradient hashing: - // wrap points in (x,y), map to (u,v) - float3 xw = mod(float3(p0.x, p1.x, p2.x), per.x); - float3 yw = mod(float3(p0.y, p1.y, p2.y), per.y); - float3 iuw = xw + 0.5 * yw; - float3 ivw = yw; - - // Create gradients from indices - float2 g0 = rgrad2(float2(iuw.x, ivw.x), rot); - float2 g1 = rgrad2(float2(iuw.y, ivw.y), rot); - float2 g2 = rgrad2(float2(iuw.z, ivw.z), rot); - - // Gradients dot vectors to corresponding corners - // (The derivatives of this are simply the gradients) - float3 w = float3(dot(g0, d0), dot(g1, d1), dot(g2, d2)); - - // Radial weights from corners - // 0.8 is the square of 2/sqrt(5), the distance from - // a grid point to the nearest simplex boundary - float3 t = 0.8 - float3(dot(d0, d0), dot(d1, d1), dot(d2, d2)); - - // Set influence of each surflet to zero outside radius sqrt(0.8) - t = max(t, 0.0); - - // Fourth power of t - float3 t2 = t * t; - float3 t4 = t2 * t2; - - // Final noise value is: - // sum of ((radial weights) times (gradient dot vector from corner)) - float n = dot(t4, w); - - // Rescale to cover the range [-1,1] reasonably well - return 11.0*n; -} - -// -// 2-D tiling simplex noise with fixed gradients, -// without the analytical derivative. -// This function is implemented as a wrapper to "psrnoise", -// at the minimal cost of three extra additions. -// -float psnoise(float2 pos, float2 per) { - return psrnoise(pos, per, 0.0); -} - -// -// 2-D non-tiling simplex noise with rotating gradients and analytical derivative. -// The first component of the 3-element return vector is the noise value, -// and the second and third components are the x and y partial derivatives. -// -float3 srdnoise(float2 pos, float rot) { - // Offset y slightly to hide some rare artifacts - pos.y += 0.001; - // Skew to hexagonal grid - float2 uv = float2(pos.x + pos.y*0.5, pos.y); - - float2 i0 = floor(uv); - float2 f0 = frac(uv); - // Traversal order - float2 i1 = (f0.x > f0.y) ? float2(1.0, 0.0) : float2(0.0, 1.0); - - // Unskewed grid points in (x,y) space - float2 p0 = float2(i0.x - i0.y * 0.5, i0.y); - float2 p1 = float2(p0.x + i1.x - i1.y * 0.5, p0.y + i1.y); - float2 p2 = float2(p0.x + 0.5, p0.y + 1.0); - - // Integer grid point indices in (u,v) space - i1 = i0 + i1; - float2 i2 = i0 + float2(1.0, 1.0); - - // Vectors in unskewed (x,y) coordinates from - // each of the simplex corners to the evaluation point - float2 d0 = pos - p0; - float2 d1 = pos - p1; - float2 d2 = pos - p2; - - float3 x = float3(p0.x, p1.x, p2.x); - float3 y = float3(p0.y, p1.y, p2.y); - float3 iuw = x + 0.5 * y; - float3 ivw = y; - - // Avoid precision issues in permutation - iuw = mod289(iuw); - ivw = mod289(ivw); - - // Create gradients from indices - float2 g0 = rgrad2(float2(iuw.x, ivw.x), rot); - float2 g1 = rgrad2(float2(iuw.y, ivw.y), rot); - float2 g2 = rgrad2(float2(iuw.z, ivw.z), rot); - - // Gradients dot vectors to corresponding corners - // (The derivatives of this are simply the gradients) - float3 w = float3(dot(g0, d0), dot(g1, d1), dot(g2, d2)); - - // Radial weights from corners - // 0.8 is the square of 2/sqrt(5), the distance from - // a grid point to the nearest simplex boundary - float3 t = 0.8 - float3(dot(d0, d0), dot(d1, d1), dot(d2, d2)); - - // Partial derivatives for analytical gradient computation - float3 dtdx = -2.0 * float3(d0.x, d1.x, d2.x); - float3 dtdy = -2.0 * float3(d0.y, d1.y, d2.y); - - // Set influence of each surflet to zero outside radius sqrt(0.8) - if (t.x < 0.0) { - dtdx.x = 0.0; - dtdy.x = 0.0; - t.x = 0.0; - } - if (t.y < 0.0) { - dtdx.y = 0.0; - dtdy.y = 0.0; - t.y = 0.0; - } - if (t.z < 0.0) { - dtdx.z = 0.0; - dtdy.z = 0.0; - t.z = 0.0; - } - - // Fourth power of t (and third power for derivative) - float3 t2 = t * t; - float3 t4 = t2 * t2; - float3 t3 = t2 * t; - - // Final noise value is: - // sum of ((radial weights) times (gradient dot vector from corner)) - float n = dot(t4, w); - - // Final analytical derivative (gradient of a sum of scalar products) - float2 dt0 = float2(dtdx.x, dtdy.x) * 4.0 * t3.x; - float2 dn0 = t4.x * g0 + dt0 * w.x; - float2 dt1 = float2(dtdx.y, dtdy.y) * 4.0 * t3.y; - float2 dn1 = t4.y * g1 + dt1 * w.y; - float2 dt2 = float2(dtdx.z, dtdy.z) * 4.0 * t3.z; - float2 dn2 = t4.z * g2 + dt2 * w.z; - - return 11.0*float3(n, dn0 + dn1 + dn2); -} - -// -// 2-D non-tiling simplex noise with fixed gradients and analytical derivative. -// This function is implemented as a wrapper to "srdnoise", -// at the minimal cost of three extra additions. -// -float3 sdnoise(float2 pos) { - return srdnoise(pos, 0.0); -} - -// -// 2-D non-tiling simplex noise with rotating gradients, -// without the analytical derivative. -// -float srnoise(float2 pos, float rot) { - // Offset y slightly to hide some rare artifacts - pos.y += 0.001; - // Skew to hexagonal grid - float2 uv = float2(pos.x + pos.y*0.5, pos.y); - - float2 i0 = floor(uv); - float2 f0 = frac(uv); - // Traversal order - float2 i1 = (f0.x > f0.y) ? float2(1.0, 0.0) : float2(0.0, 1.0); - - // Unskewed grid points in (x,y) space - float2 p0 = float2(i0.x - i0.y * 0.5, i0.y); - float2 p1 = float2(p0.x + i1.x - i1.y * 0.5, p0.y + i1.y); - float2 p2 = float2(p0.x + 0.5, p0.y + 1.0); - - // Integer grid point indices in (u,v) space - i1 = i0 + i1; - float2 i2 = i0 + float2(1.0, 1.0); - - // Vectors in unskewed (x,y) coordinates from - // each of the simplex corners to the evaluation point - float2 d0 = pos - p0; - float2 d1 = pos - p1; - float2 d2 = pos - p2; - - // Wrap i0, i1 and i2 to the desired period before gradient hashing: - // wrap points in (x,y), map to (u,v) - float3 x = float3(p0.x, p1.x, p2.x); - float3 y = float3(p0.y, p1.y, p2.y); - float3 iuw = x + 0.5 * y; - float3 ivw = y; - - // Avoid precision issues in permutation - iuw = mod289(iuw); - ivw = mod289(ivw); - - // Create gradients from indices - float2 g0 = rgrad2(float2(iuw.x, ivw.x), rot); - float2 g1 = rgrad2(float2(iuw.y, ivw.y), rot); - float2 g2 = rgrad2(float2(iuw.z, ivw.z), rot); - - // Gradients dot vectors to corresponding corners - // (The derivatives of this are simply the gradients) - float3 w = float3(dot(g0, d0), dot(g1, d1), dot(g2, d2)); - - // Radial weights from corners - // 0.8 is the square of 2/sqrt(5), the distance from - // a grid point to the nearest simplex boundary - float3 t = 0.8 - float3(dot(d0, d0), dot(d1, d1), dot(d2, d2)); - - // Set influence of each surflet to zero outside radius sqrt(0.8) - t = max(t, 0.0); - - // Fourth power of t - float3 t2 = t * t; - float3 t4 = t2 * t2; - - // Final noise value is: - // sum of ((radial weights) times (gradient dot vector from corner)) - float n = dot(t4, w); - - // Rescale to cover the range [-1,1] reasonably well - return 11.0*n; -} - -// -// 2-D non-tiling simplex noise with fixed gradients, -// without the analytical derivative. -// This function is implemented as a wrapper to "srnoise", -// at the minimal cost of three extra additions. -// Note: if this kind of noise is all you want, there are faster -// GLSL implementations of non-tiling simplex noise out there. -// This one is included mainly for completeness and compatibility -// with the other functions in the file. -// -float snoise(float2 pos) { - return srnoise(pos, 0.0); -} - -#endif \ No newline at end of file diff --git a/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Noise/psrdnoise2D.cginc.meta b/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Noise/psrdnoise2D.cginc.meta deleted file mode 100644 index 908819d..0000000 --- a/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Noise/psrdnoise2D.cginc.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 7f5763592cf173242a03524f6010c0ae -timeCreated: 1511764501 -licenseType: Free -ShaderImporter: - externalObjects: {} - defaultTextures: [] - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/ParticleUniforms.cginc b/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/ParticleUniforms.cginc deleted file mode 100644 index 280209b..0000000 --- a/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/ParticleUniforms.cginc +++ /dev/null @@ -1,29 +0,0 @@ -#ifndef __PARTICLE_UNIFORMS__ -#define __PARTICLE_UNIFORMS__ - -struct ParticleUniforms -{ - float numRate; - float movement; - float geomSize; - float velocityDamping; - - float lifeDuration; - float lifeVariation; - float convergence; - float homeStrength; - - float noiseStrength; - float noiseSeed; - float noiseTimeScale; - float noiseFrequency; - - float3 forceDirection; - float forceStrength; - - float3 impulsePosition; - float impulseRadius; - float impulseStrength; -}; - -#endif // __PARTICLE_UNIFORMS__ diff --git a/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/ParticleUniforms.cginc.meta b/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/ParticleUniforms.cginc.meta deleted file mode 100644 index dc67a5a..0000000 --- a/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/ParticleUniforms.cginc.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 361a9c8fc4ac1f64cbec0d92daa4f9ca -timeCreated: 1513426238 -licenseType: Free -ShaderImporter: - externalObjects: {} - defaultTextures: [] - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/ParticleUpdate.compute b/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/ParticleUpdate.compute deleted file mode 100644 index be83b42..0000000 --- a/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/ParticleUpdate.compute +++ /dev/null @@ -1,146 +0,0 @@ -#pragma kernel CSMain - -#include "UnityCG.cginc" -#include "Inc/Defines.cginc" -#include "Inc/Math.cginc" -#include "Noise/noise3Dgrad.cginc" -#include "ParticleUniforms.cginc" - -CBUFFER_START(Variables) - float timeStep; - float timeValue; - float bufferCount; - int home_count; - float3 coeffsA; - float3 coeffsB; - float3 coeffsC; - float3 coeffsD; -CBUFFER_END - -RWStructuredBuffer ssbo; -RWStructuredBuffer uniform_buffer; -RWStructuredBuffer home_buffer; -RWStructuredBuffer home_velocity_buffer; - -[numthreads(WORK_GROUP_SIZE, 1, 1)] -void CSMain(uint3 id : SV_DispatchThreadID) -{ - uint idx = id.x; - Particle p = ssbo[idx]; - float4 home = (home_count > 0) ? home_buffer[p.seed * home_count] : float4(0, 0, 0, 1); - float4 home_velcity = (home_count > 0) ? home_velocity_buffer[p.seed * home_count] : float4(0, 0, 0, 1); - ParticleUniforms uni = uniform_buffer[0]; - - float factor = p.color.a; - float3 acc = float3(0, 0, 0); - float3 F = float3(0, 0, 0); - - //if (lifeDuration > 0.1f) - { - float duration = uni.lifeDuration * (1.0f + factor * uni.lifeVariation); - float current_life = p.life * duration + timeStep; - //bool is_reset = false; - //if (current_life > duration) - //{ - // current_life -= duration; - // is_reset = true; - //} - //if (is_reset || p.life < 0.0f) - if (current_life > duration && uni.lifeDuration > 0.1f) - { - current_life -= duration; - //if (isEmit == 0 && current_life > 0.0) current_life -= duration; - p.position = home.xyz; - p.color.rgb = float3(1, 1, 1); - p.velocity = home_velcity.xyz * uni.forceStrength * 100.0f; - //p.velocity = forceDirection * 3.0f; - } - p.life = current_life / duration; - } - - // noise - { - //float n_seed = p.seed * 0.12f; - //float time_seed = timeValue * noiseTimeScale; - float3 np = p.position * uni.noiseFrequency; - float3 n1, n2; - snoise(np, n1); - snoise(np + float3(uni.noiseSeed, p.seed * 0.12f, timeValue * uni.noiseTimeScale), n2); - F = cross(n1, n2); - acc += F * uni.noiseStrength; - } - - // convergence - { - F = -p.position; - acc += F * uni.convergence; - } - - // home as tangential - { - F = cross(p.position, float3(0, 1, 0)); - float d = clamp(abs(p.position.y), 1, 100); - F = normalize(F) * 10.0f / pow(d, 2 * 2); - acc += F * uni.homeStrength; - } - - // force - { - F = float3(0, 0, 0); - if (length(uni.forceDirection) > 0.1f) - F = normalize(uni.forceDirection) * 10.0f; - acc += F * uni.forceStrength; - } - - // impulse - { - F = uni.impulsePosition - p.position; - float mag = F.x*F.x + F.y*F.y + F.z*F.z; - float rad2 = uni.impulseRadius * uni.impulseRadius; - acc += F * exp(-mag / rad2) * uni.impulseStrength; - } - - // cosine gradient - { - float t = (uni.lifeDuration > 0.1f) ? clamp(p.life, 0.0f, 1.0f) : factor; - half3 rgb = cosine_gradient(coeffsA, coeffsB, coeffsC, coeffsD, t); -#if !defined(UNITY_COLORSPACE_GAMMA) - rgb = GammaToLinearSpace(rgb); -#endif - p.color.rgb = rgb; - } - - acc *= uni.movement; - p.velocity += acc * timeStep; - p.position += p.velocity * timeStep; - - //float damping = lerp(0.965f, 0.985f, p.seed) * velocityDamping; - p.velocity *= lerp(0.965f, 0.985f, p.seed) * uni.velocityDamping; - - // calculate rotate quat - { - float vel = length(p.velocity); - float a = (1 + factor) * vel * 0.05f; - float4 q = quat_from_axis_angle(normalize(p.velocity + float3(0, FLT_EPSILON, 0)), a); - q = quat_mult(p.quat, q); - q = normalize(q); - p.quat = lerp(p.quat, q, saturate(vel - 0.01f)); - } - - // calculate model matrix - { - float size = uni.geomSize * lerp(1, pow(1.0f - saturate(p.life), 1.0f / 2.2f), any(uni.lifeDuration)); - size *= lerp(0.5, 1.0, p.seed); - if (idx > (uint)(uni.numRate * bufferCount) || (p.life < 0.0f && uni.lifeDuration > 0.1f)) - { - size = 0.0f; - } - - float4x4 mat = make_translation_matrix(p.position); - mat = mul(mat, quat_to_rotation_matrix(p.quat)); - mat = mul(mat, make_scaling_matrix(size)); - p.model_matrix = mat; - } - - ssbo[id.x] = p; -} diff --git a/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/ParticleUpdate.compute.meta b/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/ParticleUpdate.compute.meta deleted file mode 100644 index dd9769a..0000000 --- a/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/ParticleUpdate.compute.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: e08afbf5a516b754a8eb9de35a9f5e6a -timeCreated: 1513318067 -licenseType: Free -ComputeShaderImporter: - externalObjects: {} - currentAPIMask: 4 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/ParticleViewerInstanced.shader b/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/ParticleViewerInstanced.shader deleted file mode 100644 index 7a1b93f..0000000 --- a/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/ParticleViewerInstanced.shader +++ /dev/null @@ -1,80 +0,0 @@ -Shader "UltraCombos/ParticleWorks/ParticleViewer/Instanced" -{ - Properties - { - _Color("Color", Color) = (1,1,1,1) - _MainTex("Albedo (RGB)", 2D) = "white" {} - _Metallic("Metallic", Range(0, 1)) = 0.0 - _Smoothness("Smoothness", Range(0, 1)) = 0.5 - _Emission("Emission", Range(0, 5)) = 0.0 - } - SubShader - { - Tags{ "RenderType" = "Opaque" } - LOD 200 - Cull Off - - CGPROGRAM - #pragma surface surf Standard fullforwardshadows vertex:vert addshadow - #pragma multi_compile_instancing - #pragma instancing_options assumeuniformscaling procedural:setup - #pragma target 4.5 - - sampler2D _MainTex; - - fixed4 _Color; - half _Smoothness; - half _Metallic; - half _Emission; - - #ifdef UNITY_PROCEDURAL_INSTANCING_ENABLED - #include "Inc/Defines.cginc" - StructuredBuffer ssbo; - #endif - - struct Input { - float3 color; - float2 texcoord; - }; - - float4x4 model_matrix; - - #ifdef UNITY_PROCEDURAL_INSTANCING_ENABLED - void setup() - { - Particle p = ssbo[unity_InstanceID]; - unity_ObjectToWorld = mul(model_matrix, p.model_matrix); - - unity_WorldToObject = unity_ObjectToWorld; - unity_WorldToObject._14_24_34 *= -1; - unity_WorldToObject._11_22_33 = 1.0f / unity_WorldToObject._11_22_33; - } - #endif - - void vert(inout appdata_full v, out Input o) - { - UNITY_INITIALIZE_OUTPUT(Input, o); - - #ifdef UNITY_PROCEDURAL_INSTANCING_ENABLED - Particle p = ssbo[unity_InstanceID]; - - o.color = p.color; - o.texcoord = v.texcoord; - #endif - } - - void surf(Input IN, inout SurfaceOutputStandard o) - { - fixed4 c = tex2D(_MainTex, IN.texcoord) * _Color * float4(IN.color, 1); - o.Albedo = c.rgb; - o.Metallic = _Metallic; - o.Smoothness = _Smoothness; - o.Alpha = c.a; - - //float lumin = pow(Luminance(IN.color), 2.2f); - o.Emission = c.rgb * _Emission;// *lumin; - } - ENDCG - } - FallBack "Diffuse" -} diff --git a/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/ParticleViewerInstanced.shader.meta b/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/ParticleViewerInstanced.shader.meta deleted file mode 100644 index d398db9..0000000 --- a/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/ParticleViewerInstanced.shader.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 0a37c93f4a42ad341ab8b8d2dafab01d -timeCreated: 1513321527 -licenseType: Free -ShaderImporter: - externalObjects: {} - defaultTextures: [] - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/ParticleViewerMesh.shader b/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/ParticleViewerMesh.shader deleted file mode 100644 index 7c2a8ef..0000000 --- a/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/ParticleViewerMesh.shader +++ /dev/null @@ -1,72 +0,0 @@ -Shader "UltraCombos/ParticleWorks/ParticleViewer/Mesh" -{ - Properties - { - _Color("Color", Color) = (1,1,1,1) - _MainTex("Albedo (RGB)", 2D) = "white" {} - _Metallic("Metallic", Range(0, 1)) = 0.0 - _Smoothness("Smoothness", Range(0, 1)) = 0.5 - _Emission("Emission", Range(0, 5)) = 0.0 - } - SubShader - { - Tags{ "RenderType" = "Opaque" } - LOD 200 - Cull Off - - CGPROGRAM - #pragma surface surf Standard fullforwardshadows vertex:vert addshadow - #pragma target 4.5 - - sampler2D _MainTex; - - fixed4 _Color; - half _Smoothness; - half _Metallic; - half _Emission; - - #ifdef SHADER_API_D3D11 - #include "Inc/Defines.cginc" - StructuredBuffer ssbo; - #endif - - struct Input { - float3 color; - float2 texcoord; - }; - - void vert(inout appdata_full v, out Input o) - { - UNITY_INITIALIZE_OUTPUT(Input, o); - - #ifdef SHADER_API_D3D11 - int id = v.texcoord.z; - //int index = v.texcoord.w; - Particle p = ssbo[id]; - - v.vertex = mul(p.model_matrix, v.vertex); - v.normal = mul((float3x3)p.model_matrix, v.normal); - - o.color = p.color; - o.texcoord = v.texcoord.xy; - #endif - } - - void surf(Input IN, inout SurfaceOutputStandard o) - { - //float cc = length(IN.texcoord - float2(0.5f, 0.5f)); - //clip(0.5f / sqrt(2.0f) - cc); - - fixed4 c = tex2D(_MainTex, IN.texcoord) * _Color * float4(IN.color, 1); - o.Albedo = c.rgb; - o.Metallic = _Metallic; - o.Smoothness = _Smoothness; - o.Alpha = c.a; - - //float lumin = pow(Luminance(IN.color), 2.2f); - o.Emission = c.rgb * _Emission;// *lumin; - } - ENDCG - } - FallBack "Diffuse" -} diff --git a/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/ParticleViewerMesh.shader.meta b/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/ParticleViewerMesh.shader.meta deleted file mode 100644 index 4822e03..0000000 --- a/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/ParticleViewerMesh.shader.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: c31611738f4cc1b4ea71988156cc8327 -timeCreated: 1513321527 -licenseType: Free -ShaderImporter: - externalObjects: {} - defaultTextures: [] - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/ParticleViewerUnlitParticle.shader b/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/ParticleViewerUnlitParticle.shader deleted file mode 100644 index c8c11fb..0000000 --- a/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/ParticleViewerUnlitParticle.shader +++ /dev/null @@ -1,79 +0,0 @@ -Shader "UltraCombos/ParticleWorks/ParticleViewer/UnlitParticle" -{ - Properties - { - _Color("Color", Color) = (1,1,1,1) - _Emission("Emission", Range(0, 5)) = 0.0 - } - SubShader - { - Tags { "RenderType"="Opaque" } - LOD 100 - - Pass - { - CGPROGRAM - #pragma vertex vert - #pragma geometry geom - #pragma fragment frag - #pragma multi_compile_fog - - #include "UnityCG.cginc" - - struct v2g - { - float4 vertex : SV_POSITION; - float3 color : COLOR; - }; - - struct g2f - { - float4 vertex : SV_POSITION; - float3 color : COLOR; - UNITY_FOG_COORDS(1) - }; - - fixed4 _Color; - half _Emission; - float4x4 model_matrix; - - #ifdef SHADER_API_D3D11 - #include "Inc/Defines.cginc" - StructuredBuffer ssbo; - #endif - - v2g vert (appdata_base v, uint vid : SV_VertexID) - { - v2g o = (v2g)0; - #ifdef SHADER_API_D3D11 - Particle p = ssbo[vid]; - o.vertex = mul(model_matrix, float4(p.position, 1)); - o.color = p.color.rgb; - #endif - return o; - } - - [maxvertexcount(6)] - void geom(point v2g input[1], inout PointStream OutputStream) - { - g2f o = (g2f)0; - - o.color = input[0].color; - - o.vertex = UnityObjectToClipPos(input[0].vertex.xyz); - UNITY_TRANSFER_FOG(o, o.vertex); - OutputStream.Append(o); - OutputStream.RestartStrip(); - } - - fixed4 frag (g2f i) : SV_Target - { - fixed4 col = fixed4(i.color, 1); - col.rgb *= 1 + _Emission; - UNITY_APPLY_FOG(i.fogCoord, col); - return col; - } - ENDCG - } - } -} diff --git a/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/ParticleViewerUnlitParticle.shader.meta b/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/ParticleViewerUnlitParticle.shader.meta deleted file mode 100644 index 4835b78..0000000 --- a/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/ParticleViewerUnlitParticle.shader.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 6815828e001d01f4699ec8c7f1dde1fe -timeCreated: 1513929851 -licenseType: Free -ShaderImporter: - externalObjects: {} - defaultTextures: [] - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/ParticleViewerUnlitPoint.shader b/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/ParticleViewerUnlitPoint.shader deleted file mode 100644 index af214c2..0000000 --- a/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/ParticleViewerUnlitPoint.shader +++ /dev/null @@ -1,110 +0,0 @@ -Shader "UltraCombos/ParticleWorks/ParticleViewer/UnlitPoint" -{ - Properties - { - _Color("Color", Color) = (1,1,1,1) - _MainTex("Albedo (RGB)", 2D) = "white" {} - _Emission("Emission", Range(0, 5)) = 0.0 - _Size("Size", Range(0, 1)) = 0.1 - } - SubShader - { - Tags { "RenderType"="Opaque" } - LOD 100 - - Pass - { - CGPROGRAM - #pragma vertex vert - #pragma geometry geom - #pragma fragment frag - #pragma multi_compile_fog - - #include "UnityCG.cginc" - - struct v2g - { - float4 vertex : SV_POSITION; - }; - - struct g2f - { - float4 vertex : SV_POSITION; - float2 uv : TEXCOORD; - UNITY_FOG_COORDS(1) - }; - - sampler2D _MainTex; - float4 _MainTex_ST; - - fixed4 _Color; - half _Emission; - half _Size; - float4x4 model_matrix; - - #ifdef SHADER_API_D3D11 - StructuredBuffer ssbo; - #endif - - v2g vert (appdata_base v, uint vid : SV_VertexID) - { - v2g o = (v2g)0; - #ifdef SHADER_API_D3D11 - o.vertex = mul(model_matrix, float4(ssbo[vid].xyz, 1)); - #endif - return o; - } - - [maxvertexcount(6)] - void geom(point v2g input[1], inout TriangleStream OutputStream) - { - float3 position = input[0].vertex.xyz; - position = UnityObjectToViewPos(position); - float size = _Size;// *input[0].vertex.w; - const int side = 4; - float3 vertices[side]; - float2 uvs[side]; - - float delta_a = UNITY_PI * 2.0f / side; - for (int i = 0; i < side; i++) - { - float a = delta_a * i; - float x = cos(-a); - float y = sin(-a); - vertices[i] = position + float3(x * size, y * size, 0); - uvs[i] = float2(x, y) * 0.5f + 0.5f; - } - - g2f o = (g2f)0; - - int index; - for (int k = 0; k < side - 2; k++) - { - for (int j = 0; j < 3; j++) - { - index = (j == 0) ? 0 : (k + j); - - o.vertex = mul(UNITY_MATRIX_P, float4(vertices[index], 1.0f)); - o.uv = TRANSFORM_TEX(uvs[index], _MainTex); - UNITY_TRANSFER_FOG(o, o.vertex); - OutputStream.Append(o); - } - - OutputStream.RestartStrip(); - } - - } - - fixed4 frag (g2f i) : SV_Target - { - clip(0.5f / sqrt(2.0f) - length(i.uv - float2(0.5f, 0.5f))); - - fixed4 col = tex2D(_MainTex, i.uv) * _Color; - col.rgb *= 1 + _Emission; - UNITY_APPLY_FOG(i.fogCoord, col); - return col; - } - ENDCG - } - } -} diff --git a/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/ParticleViewerUnlitPoint.shader.meta b/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/ParticleViewerUnlitPoint.shader.meta deleted file mode 100644 index f37a826..0000000 --- a/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/ParticleViewerUnlitPoint.shader.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 786da5c7ceb729b4db2a00586adaeb24 -timeCreated: 1513929851 -licenseType: Free -ShaderImporter: - externalObjects: {} - defaultTextures: [] - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/VertexBufferUpdate.compute b/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/VertexBufferUpdate.compute deleted file mode 100644 index 7fcbc0a..0000000 --- a/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/VertexBufferUpdate.compute +++ /dev/null @@ -1,36 +0,0 @@ -#pragma kernel CSMain - -#include "UnityCG.cginc" -#include "Inc/Defines.cginc" - -struct Vertex -{ - float3 position; - float3 normal; - float4 color; - float4 uv; - //float2 uv2; - //float4 tangent; -}; - -RWStructuredBuffer ssbo; -RWStructuredBuffer origin_buffer; -RWStructuredBuffer vertex_buffer; - -[numthreads(WORK_GROUP_SIZE, 1, 1)] -void CSMain(uint3 id : SV_DispatchThreadID) -{ - Vertex o = origin_buffer[id.x]; - Vertex v = vertex_buffer[id.x]; - int index = o.uv.z; - Particle p = ssbo[index]; - - //v = o; - - v.position = mul(p.model_matrix, float4(o.position, 1)).xyz; - v.normal = mul((float3x3)p.model_matrix, o.normal); - v.color = float4(p.color.rgb, 1.0f); - v.uv = float4(o.uv.xy, 0, 0); - - vertex_buffer[id.x] = v; -} diff --git a/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/VertexBufferUpdate.compute.meta b/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/VertexBufferUpdate.compute.meta deleted file mode 100644 index 28548ee..0000000 --- a/Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/VertexBufferUpdate.compute.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 226ca53b2a6b1f34cb8e462337683d07 -ComputeShaderImporter: - externalObjects: {} - currentAPIMask: 4 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/KinectView.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/KinectView.meta deleted file mode 100644 index d82c755..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/KinectView.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: a4bdda5143caf964bbffdd9d7289a17c -folderAsset: yes -timeCreated: 1488532632 -licenseType: Free -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/KinectView/MainScene.unity b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/KinectView/MainScene.unity deleted file mode 100644 index 4244fbc..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/KinectView/MainScene.unity +++ /dev/null @@ -1,976 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!29 &1 -OcclusionCullingSettings: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_OcclusionBakeSettings: - smallestOccluder: 5 - smallestHole: 0.25 - backfaceThreshold: 100 - m_SceneGUID: 00000000000000000000000000000000 - m_OcclusionCullingData: {fileID: 0} ---- !u!104 &2 -RenderSettings: - m_ObjectHideFlags: 0 - serializedVersion: 7 - m_Fog: 0 - m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} - m_FogMode: 3 - m_FogDensity: 0.01 - m_LinearFogStart: 0 - m_LinearFogEnd: 300 - m_AmbientSkyColor: {r: 0.2, g: 0.2, b: 0.2, a: 1} - m_AmbientEquatorColor: {r: 0.2, g: 0.2, b: 0.2, a: 1} - m_AmbientGroundColor: {r: 0.2, g: 0.2, b: 0.2, a: 1} - m_AmbientIntensity: 1 - m_AmbientMode: 3 - m_SkyboxMaterial: {fileID: 0} - m_HaloStrength: 0.5 - m_FlareStrength: 1 - m_FlareFadeSpeed: 3 - m_HaloTexture: {fileID: 0} - m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} - m_DefaultReflectionMode: 0 - m_DefaultReflectionResolution: 128 - m_ReflectionBounces: 1 - m_ReflectionIntensity: 1 - m_CustomReflection: {fileID: 0} - m_Sun: {fileID: 0} - m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1} ---- !u!157 &4 -LightmapSettings: - m_ObjectHideFlags: 0 - serializedVersion: 7 - m_GIWorkflowMode: 1 - m_GISettings: - serializedVersion: 2 - m_BounceScale: 1 - m_IndirectOutputScale: 1 - m_AlbedoBoost: 1 - m_TemporalCoherenceThreshold: 1 - m_EnvironmentLightingMode: 0 - m_EnableBakedLightmaps: 1 - m_EnableRealtimeLightmaps: 0 - m_LightmapEditorSettings: - serializedVersion: 4 - m_Resolution: 1 - m_BakeResolution: 50 - m_TextureWidth: 1024 - m_TextureHeight: 1024 - m_AO: 1 - m_AOMaxDistance: 1 - m_CompAOExponent: 1 - m_CompAOExponentDirect: 0 - m_Padding: 2 - m_LightmapParameters: {fileID: 0} - m_LightmapsBakeMode: 1 - m_TextureCompression: 0 - m_DirectLightInLightProbes: 1 - m_FinalGather: 0 - m_FinalGatherFiltering: 1 - m_FinalGatherRayCount: 256 - m_ReflectionCompression: 2 - m_LightingDataAsset: {fileID: 0} - m_RuntimeCPUUsage: 25 ---- !u!196 &5 -NavMeshSettings: - serializedVersion: 2 - m_ObjectHideFlags: 0 - m_BuildSettings: - serializedVersion: 2 - agentTypeID: 0 - agentRadius: 0.5 - agentHeight: 2 - agentSlope: 45 - agentClimb: 0.4 - ledgeDropHeight: 0 - maxJumpAcrossDistance: 0 - minRegionArea: 2 - manualCellSize: 0 - cellSize: 0.16666666 - accuratePlacement: 0 - m_NavMeshData: {fileID: 0} ---- !u!1 &112136118 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 5 - m_Component: - - component: {fileID: 112136119} - - component: {fileID: 112136120} - m_Layer: 0 - m_Name: BodyView - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &112136119 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 112136118} - 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: 716011534} - m_Father: {fileID: 0} - m_RootOrder: 1 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &112136120 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 112136118} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 8821130411451d343a1488e2a9db134e, type: 3} - m_Name: - m_EditorClassIdentifier: - BoneMaterial: {fileID: 2100000, guid: f2ea145c63353784985576f08398a815, type: 2} - BodySourceManager: {fileID: 1698423884} ---- !u!1 &252019523 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 5 - m_Component: - - component: {fileID: 252019524} - - component: {fileID: 252019527} - - component: {fileID: 252019526} - - component: {fileID: 252019525} - - component: {fileID: 252019528} - m_Layer: 0 - m_Name: DesignerOnlyView - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &252019524 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 252019523} - m_LocalRotation: {x: -0.7071069, y: 0, z: 0, w: 0.70710677} - m_LocalPosition: {x: 60, y: -45, z: 50} - m_LocalScale: {x: 13, y: 1, z: 10} - m_Children: [] - m_Father: {fileID: 1988608401} - m_RootOrder: 1 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!23 &252019525 -MeshRenderer: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 252019523} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_MotionVectors: 1 - m_LightProbeUsage: 0 - m_ReflectionProbeUsage: 1 - m_Materials: - - {fileID: 10302, 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_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingOrder: 0 ---- !u!64 &252019526 -MeshCollider: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 252019523} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - serializedVersion: 2 - m_Convex: 0 - m_InflateMesh: 0 - m_SkinWidth: 0.01 - m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} ---- !u!33 &252019527 -MeshFilter: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 252019523} - m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} ---- !u!114 &252019528 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 252019523} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61e5c93f5da1e324aa7fd9671db875bc, type: 3} - m_Name: - m_EditorClassIdentifier: ---- !u!1 &257076396 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 5 - m_Component: - - component: {fileID: 257076398} - - component: {fileID: 257076397} - - component: {fileID: 257076399} - - component: {fileID: 257076400} - m_Layer: 0 - m_Name: DepthView - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &257076397 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 257076396} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 383e102cbe3bfb34d94c98ea3c2479b4, type: 3} - m_Name: - m_EditorClassIdentifier: - ViewMode: 1 - ColorSourceManager: {fileID: 679549941} - DepthSourceManager: {fileID: 1022827879} - MultiSourceManager: {fileID: 1736670513} ---- !u!4 &257076398 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 257076396} - 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: [] - m_Father: {fileID: 1988608401} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!23 &257076399 -MeshRenderer: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 257076396} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_MotionVectors: 1 - m_LightProbeUsage: 0 - m_ReflectionProbeUsage: 1 - m_Materials: - - {fileID: 10302, 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_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingOrder: 0 ---- !u!33 &257076400 -MeshFilter: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 257076396} - m_Mesh: {fileID: 0} ---- !u!1 &660022884 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 5 - m_Component: - - component: {fileID: 660022886} - - component: {fileID: 660022885} - m_Layer: 0 - m_Name: Directional light - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!108 &660022885 -Light: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 660022884} - m_Enabled: 1 - serializedVersion: 7 - m_Type: 1 - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_Intensity: 1 - m_Range: 10 - m_SpotAngle: 30 - m_CookieSize: 10 - m_Shadows: - m_Type: 0 - m_Resolution: -1 - m_CustomResolution: -1 - m_Strength: 1 - m_Bias: 0.05 - m_NormalBias: 0.4 - m_NearPlane: 0.2 - m_Cookie: {fileID: 0} - m_DrawHalo: 0 - m_Flare: {fileID: 0} - m_RenderMode: 0 - m_CullingMask: - serializedVersion: 2 - m_Bits: 4294967295 - m_Lightmapping: 1 - m_AreaSize: {x: 1, y: 1} - m_BounceIntensity: 1 - m_ShadowRadius: 0 - m_ShadowAngle: 0 ---- !u!4 &660022886 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 660022884} - m_LocalRotation: {x: 0.30909714, y: -0.24520965, z: 0.08282233, w: 0.9151348} - m_LocalPosition: {x: -13.278711, y: 5.633033, z: 4.732221} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 6 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &679549941 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 5 - m_Component: - - component: {fileID: 679549942} - - component: {fileID: 679549943} - m_Layer: 0 - m_Name: ColorManager - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &679549942 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 679549941} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: -208.42621, y: 330.08652, z: 342.24237} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 2 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &679549943 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 679549941} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 92ab5bea6110edb4081e490c0982748d, type: 3} - m_Name: - m_EditorClassIdentifier: ---- !u!1 &716011529 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 5 - m_Component: - - component: {fileID: 716011534} - - component: {fileID: 716011533} - - component: {fileID: 716011532} - - component: {fileID: 716011531} - - component: {fileID: 716011530} - m_Layer: 0 - m_Name: Cube - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &716011530 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 716011529} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61e5c93f5da1e324aa7fd9671db875bc, type: 3} - m_Name: - m_EditorClassIdentifier: ---- !u!23 &716011531 -MeshRenderer: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 716011529} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_MotionVectors: 1 - m_LightProbeUsage: 0 - m_ReflectionProbeUsage: 1 - m_Materials: - - {fileID: 10302, 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_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingOrder: 0 ---- !u!65 &716011532 -BoxCollider: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 716011529} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - serializedVersion: 2 - m_Size: {x: 1, y: 1, z: 1} - m_Center: {x: 0, y: 0, z: 0} ---- !u!33 &716011533 -MeshFilter: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 716011529} - m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!4 &716011534 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 716011529} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 3, y: 8, z: 0.01} - m_Children: [] - m_Father: {fileID: 112136119} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &934010673 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 5 - m_Component: - - component: {fileID: 934010678} - - component: {fileID: 934010677} - - component: {fileID: 934010676} - - component: {fileID: 934010675} - - component: {fileID: 934010674} - m_Layer: 0 - m_Name: ColorView - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &934010674 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 934010673} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: ee5302fdf7d10e74fbbbe1a2f7503f46, type: 3} - m_Name: - m_EditorClassIdentifier: - ColorSourceManager: {fileID: 679549941} ---- !u!23 &934010675 -MeshRenderer: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 934010673} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_MotionVectors: 1 - m_LightProbeUsage: 0 - m_ReflectionProbeUsage: 1 - m_Materials: - - {fileID: 10302, 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_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingOrder: 0 ---- !u!65 &934010676 -BoxCollider: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 934010673} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - serializedVersion: 2 - m_Size: {x: 1, y: 1, z: 1} - m_Center: {x: 0, y: 0, z: 0} ---- !u!33 &934010677 -MeshFilter: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 934010673} - m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!4 &934010678 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 934010673} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: -118, y: 64.30853, z: 150.01746} - m_LocalScale: {x: 96, y: 54, z: 1} - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 3 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &1022827879 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 5 - m_Component: - - component: {fileID: 1022827881} - - component: {fileID: 1022827880} - m_Layer: 0 - m_Name: DepthManager - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &1022827880 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1022827879} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 1cd019cdd7a54604b9ae8091d242d8a4, type: 3} - m_Name: - m_EditorClassIdentifier: ---- !u!4 &1022827881 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1022827879} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 5.873085, y: 0, z: 182.0674} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 5 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &1464340100 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 5 - m_Component: - - component: {fileID: 1464340102} - - component: {fileID: 1464340101} - m_Layer: 0 - m_Name: InfraredManager - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &1464340101 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1464340100} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 63eff7f54e54aa049a2331755f3cb99c, type: 3} - m_Name: - m_EditorClassIdentifier: ---- !u!4 &1464340102 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1464340100} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 1, z: -17} - 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 &1608503454 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 5 - m_Component: - - component: {fileID: 1608503459} - - component: {fileID: 1608503458} - - component: {fileID: 1608503457} - - component: {fileID: 1608503456} - - component: {fileID: 1608503455} - m_Layer: 0 - m_Name: InfraredView - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &1608503455 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1608503454} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 98f8736f9d8c8e44592c96e57d57c5d4, type: 3} - m_Name: - m_EditorClassIdentifier: - InfraredSourceManager: {fileID: 1464340100} ---- !u!23 &1608503456 -MeshRenderer: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1608503454} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_MotionVectors: 1 - m_LightProbeUsage: 0 - m_ReflectionProbeUsage: 1 - m_Materials: - - {fileID: 10302, 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_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingOrder: 0 ---- !u!65 &1608503457 -BoxCollider: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1608503454} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - serializedVersion: 2 - m_Size: {x: 1, y: 1, z: 1} - m_Center: {x: 0, y: 0, z: 0} ---- !u!33 &1608503458 -MeshFilter: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1608503454} - m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!4 &1608503459 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1608503454} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: -118, y: -6.0306396, z: 150.01746} - m_LocalScale: {x: 96, y: 79.5, z: 1} - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 8 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &1698423884 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 5 - m_Component: - - component: {fileID: 1698423886} - - component: {fileID: 1698423885} - m_Layer: 0 - m_Name: BodyManager - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &1698423885 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1698423884} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 2e74aed0503c9d24290a1ae5438fddc3, type: 3} - m_Name: - m_EditorClassIdentifier: ---- !u!4 &1698423886 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1698423884} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 5.873085, y: 0, z: 182.0674} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &1736670513 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 5 - m_Component: - - component: {fileID: 1736670515} - - component: {fileID: 1736670514} - m_Layer: 0 - m_Name: MultiFrameManager - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &1736670514 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1736670513} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: f752c4e07617d8d4eb21d4975a2d7c61, type: 3} - m_Name: - m_EditorClassIdentifier: ---- !u!4 &1736670515 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1736670513} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: -208.42621, y: 330.08652, z: 342.24237} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 10 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &1747301860 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 5 - m_Component: - - component: {fileID: 1747301865} - - component: {fileID: 1747301864} - - component: {fileID: 1747301863} - - component: {fileID: 1747301862} - - component: {fileID: 1747301861} - m_Layer: 0 - m_Name: Main Camera - m_TagString: MainCamera - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!81 &1747301861 -AudioListener: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1747301860} - m_Enabled: 1 ---- !u!124 &1747301862 -Behaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1747301860} - m_Enabled: 1 ---- !u!92 &1747301863 -Behaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1747301860} - m_Enabled: 1 ---- !u!20 &1747301864 -Camera: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1747301860} - m_Enabled: 1 - serializedVersion: 2 - m_ClearFlags: 1 - m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0.019607844} - m_NormalizedViewPortRect: - serializedVersion: 2 - x: 0 - y: 0 - width: 1 - height: 1 - near clip plane: 0.3 - far clip plane: 400 - field of view: 60 - orthographic: 0 - orthographic size: 5 - m_Depth: -1 - m_CullingMask: - serializedVersion: 2 - m_Bits: 4294967295 - m_RenderingPath: -1 - m_TargetTexture: {fileID: 0} - m_TargetDisplay: 0 - m_TargetEye: 3 - m_HDR: 0 - m_OcclusionCulling: 1 - m_StereoConvergence: 10 - m_StereoSeparation: 0.022 - m_StereoMirrorMode: 0 ---- !u!4 &1747301865 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1747301860} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 1, z: -17} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 9 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &1988608400 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 5 - m_Component: - - component: {fileID: 1988608401} - m_Layer: 0 - m_Name: DepthBase - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1988608401 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1988608400} - m_LocalRotation: {x: 0.16042967, y: -0.37686968, z: -0.06645215, w: -0.9098438} - m_LocalPosition: {x: 5.873085, y: 0, z: 182.0674} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: - - {fileID: 257076398} - - {fileID: 252019524} - m_Father: {fileID: 0} - m_RootOrder: 4 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/KinectView/MainScene.unity.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/KinectView/MainScene.unity.meta deleted file mode 100644 index 9c36fe1..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/KinectView/MainScene.unity.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: acb109c17b75ff0439fee665f622f4b1 -timeCreated: 1488532632 -licenseType: Free -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/KinectView/Materials.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/KinectView/Materials.meta deleted file mode 100644 index 0f027be..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/KinectView/Materials.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 2a9d46c4f184e354abec98addc1cc79d -folderAsset: yes -timeCreated: 1488532632 -licenseType: Free -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/KinectView/Materials/BoneMaterial.mat b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/KinectView/Materials/BoneMaterial.mat deleted file mode 100644 index 28edc0e..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/KinectView/Materials/BoneMaterial.mat +++ /dev/null @@ -1,34 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!21 &2100000 -Material: - serializedVersion: 6 - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_Name: BoneMaterial - m_Shader: {fileID: 200, guid: 0000000000000000f000000000000000, type: 0} - m_ShaderKeywords: - m_LightmapFlags: 5 - m_CustomRenderQueue: -1 - stringTagMap: {} - m_SavedProperties: - serializedVersion: 2 - m_TexEnvs: - - first: - name: _MainTex - second: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - m_Floats: - - first: - name: _InvFade - second: 1 - m_Colors: - - first: - name: _Color - second: {r: 1, g: 1, b: 1, a: 1} - - first: - name: _TintColor - second: {r: 0.5, g: 0.5, b: 0.5, a: 0.5} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/KinectView/Materials/BoneMaterial.mat.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/KinectView/Materials/BoneMaterial.mat.meta deleted file mode 100644 index d6c130b..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/KinectView/Materials/BoneMaterial.mat.meta +++ /dev/null @@ -1,4 +0,0 @@ -fileFormatVersion: 2 -guid: f2ea145c63353784985576f08398a815 -NativeFormatImporter: - userData: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/KinectView/Scripts.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/KinectView/Scripts.meta deleted file mode 100644 index 2419e61..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/KinectView/Scripts.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 0940689ded321ad4bb45f6140ead5344 -folderAsset: yes -timeCreated: 1488532632 -licenseType: Free -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/KinectView/Scripts/BodySourceManager.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/KinectView/Scripts/BodySourceManager.cs deleted file mode 100644 index 288cf9e..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/KinectView/Scripts/BodySourceManager.cs +++ /dev/null @@ -1,70 +0,0 @@ -using UnityEngine; -using System.Collections; -using Windows.Kinect; - -public class BodySourceManager : MonoBehaviour -{ - private KinectSensor _Sensor; - private BodyFrameReader _Reader; - private Body[] _Data = null; - - public Body[] GetData() - { - return _Data; - } - - - void Start () - { - _Sensor = KinectSensor.GetDefault(); - - if (_Sensor != null) - { - _Reader = _Sensor.BodyFrameSource.OpenReader(); - - if (!_Sensor.IsOpen) - { - _Sensor.Open(); - } - } - } - - void Update () - { - if (_Reader != null) - { - var frame = _Reader.AcquireLatestFrame(); - if (frame != null) - { - if (_Data == null) - { - _Data = new Body[_Sensor.BodyFrameSource.BodyCount]; - } - - frame.GetAndRefreshBodyData(_Data); - - frame.Dispose(); - frame = null; - } - } - } - - void OnApplicationQuit() - { - if (_Reader != null) - { - _Reader.Dispose(); - _Reader = null; - } - - if (_Sensor != null) - { - if (_Sensor.IsOpen) - { - _Sensor.Close(); - } - - _Sensor = null; - } - } -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/KinectView/Scripts/BodySourceManager.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/KinectView/Scripts/BodySourceManager.cs.meta deleted file mode 100644 index 39841de..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/KinectView/Scripts/BodySourceManager.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 2e74aed0503c9d24290a1ae5438fddc3 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/KinectView/Scripts/BodySourceView.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/KinectView/Scripts/BodySourceView.cs deleted file mode 100644 index 698dbdc..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/KinectView/Scripts/BodySourceView.cs +++ /dev/null @@ -1,185 +0,0 @@ -using UnityEngine; -using System.Collections; -using System.Collections.Generic; -using Kinect = Windows.Kinect; - -public class BodySourceView : MonoBehaviour -{ - public Material BoneMaterial; - public GameObject BodySourceManager; - - private Dictionary _Bodies = new Dictionary(); - private BodySourceManager _BodyManager; - - private Dictionary _BoneMap = new Dictionary() - { - { Kinect.JointType.FootLeft, Kinect.JointType.AnkleLeft }, - { Kinect.JointType.AnkleLeft, Kinect.JointType.KneeLeft }, - { Kinect.JointType.KneeLeft, Kinect.JointType.HipLeft }, - { Kinect.JointType.HipLeft, Kinect.JointType.SpineBase }, - - { Kinect.JointType.FootRight, Kinect.JointType.AnkleRight }, - { Kinect.JointType.AnkleRight, Kinect.JointType.KneeRight }, - { Kinect.JointType.KneeRight, Kinect.JointType.HipRight }, - { Kinect.JointType.HipRight, Kinect.JointType.SpineBase }, - - { Kinect.JointType.HandTipLeft, Kinect.JointType.HandLeft }, - { Kinect.JointType.ThumbLeft, Kinect.JointType.HandLeft }, - { Kinect.JointType.HandLeft, Kinect.JointType.WristLeft }, - { Kinect.JointType.WristLeft, Kinect.JointType.ElbowLeft }, - { Kinect.JointType.ElbowLeft, Kinect.JointType.ShoulderLeft }, - { Kinect.JointType.ShoulderLeft, Kinect.JointType.SpineShoulder }, - - { Kinect.JointType.HandTipRight, Kinect.JointType.HandRight }, - { Kinect.JointType.ThumbRight, Kinect.JointType.HandRight }, - { Kinect.JointType.HandRight, Kinect.JointType.WristRight }, - { Kinect.JointType.WristRight, Kinect.JointType.ElbowRight }, - { Kinect.JointType.ElbowRight, Kinect.JointType.ShoulderRight }, - { Kinect.JointType.ShoulderRight, Kinect.JointType.SpineShoulder }, - - { Kinect.JointType.SpineBase, Kinect.JointType.SpineMid }, - { Kinect.JointType.SpineMid, Kinect.JointType.SpineShoulder }, - { Kinect.JointType.SpineShoulder, Kinect.JointType.Neck }, - { Kinect.JointType.Neck, Kinect.JointType.Head }, - }; - - void Update () - { - if (BodySourceManager == null) - { - return; - } - - _BodyManager = BodySourceManager.GetComponent(); - if (_BodyManager == null) - { - return; - } - - Kinect.Body[] data = _BodyManager.GetData(); - if (data == null) - { - return; - } - - List trackedIds = new List(); - foreach(var body in data) - { - if (body == null) - { - continue; - } - - if(body.IsTracked) - { - trackedIds.Add (body.TrackingId); - } - } - - List knownIds = new List(_Bodies.Keys); - - // First delete untracked bodies - foreach(ulong trackingId in knownIds) - { - if(!trackedIds.Contains(trackingId)) - { - Destroy(_Bodies[trackingId]); - _Bodies.Remove(trackingId); - } - } - - foreach(var body in data) - { - if (body == null) - { - continue; - } - - if(body.IsTracked) - { - if(!_Bodies.ContainsKey(body.TrackingId)) - { - _Bodies[body.TrackingId] = CreateBodyObject(body.TrackingId); - } - - RefreshBodyObject(body, _Bodies[body.TrackingId]); - } - } - } - - private GameObject CreateBodyObject(ulong id) - { - GameObject body = new GameObject("Body:" + id); - - for (Kinect.JointType jt = Kinect.JointType.SpineBase; jt <= Kinect.JointType.ThumbRight; jt++) - { - GameObject jointObj = GameObject.CreatePrimitive(PrimitiveType.Cube); - - LineRenderer lr = jointObj.AddComponent(); -#if UNITY_5_6 - lr.positionCount = 2; -#else - lr.positionCount = 2; -#endif - lr.material = BoneMaterial; - lr.startWidth = 0.05f; - lr.endWidth = 0.05f; - - jointObj.transform.localScale = new Vector3(0.3f, 0.3f, 0.3f); - jointObj.name = jt.ToString(); - jointObj.transform.parent = body.transform; - } - - return body; - } - - private void RefreshBodyObject(Kinect.Body body, GameObject bodyObject) - { - for (Kinect.JointType jt = Kinect.JointType.SpineBase; jt <= Kinect.JointType.ThumbRight; jt++) - { - Kinect.Joint sourceJoint = body.Joints[jt]; - Kinect.Joint? targetJoint = null; - - if(_BoneMap.ContainsKey(jt)) - { - targetJoint = body.Joints[_BoneMap[jt]]; - } - - Transform jointObj = bodyObject.transform.Find(jt.ToString()); - jointObj.localPosition = GetVector3FromJoint(sourceJoint); - - LineRenderer lr = jointObj.GetComponent(); - if(targetJoint.HasValue) - { - lr.SetPosition(0, jointObj.localPosition); - lr.SetPosition(1, GetVector3FromJoint(targetJoint.Value)); - lr.startColor = GetColorForState(sourceJoint.TrackingState); - lr.endColor = GetColorForState(targetJoint.Value.TrackingState); - } - else - { - lr.enabled = false; - } - } - } - - private static Color GetColorForState(Kinect.TrackingState state) - { - switch (state) - { - case Kinect.TrackingState.Tracked: - return Color.green; - - case Kinect.TrackingState.Inferred: - return Color.red; - - default: - return Color.black; - } - } - - private static Vector3 GetVector3FromJoint(Kinect.Joint joint) - { - return new Vector3(joint.Position.X * 10, joint.Position.Y * 10, joint.Position.Z * 10); - } -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/KinectView/Scripts/BodySourceView.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/KinectView/Scripts/BodySourceView.cs.meta deleted file mode 100644 index 2855453..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/KinectView/Scripts/BodySourceView.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 8821130411451d343a1488e2a9db134e -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/KinectView/Scripts/ColorSourceManager.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/KinectView/Scripts/ColorSourceManager.cs deleted file mode 100644 index 30d0b75..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/KinectView/Scripts/ColorSourceManager.cs +++ /dev/null @@ -1,78 +0,0 @@ -using UnityEngine; -using System.Collections; -using Windows.Kinect; - -public class ColorSourceManager : MonoBehaviour -{ - public int ColorWidth { get; private set; } - public int ColorHeight { get; private set; } - - private KinectSensor _Sensor; - private ColorFrameReader _Reader; - private Texture2D _Texture; - private byte[] _Data; - - public Texture2D GetColorTexture() - { - return _Texture; - } - - void Start() - { - _Sensor = KinectSensor.GetDefault(); - - if (_Sensor != null) - { - _Reader = _Sensor.ColorFrameSource.OpenReader(); - - var frameDesc = _Sensor.ColorFrameSource.CreateFrameDescription(ColorImageFormat.Rgba); - ColorWidth = frameDesc.Width; - ColorHeight = frameDesc.Height; - - _Texture = new Texture2D(frameDesc.Width, frameDesc.Height, TextureFormat.RGBA32, false); - _Data = new byte[frameDesc.BytesPerPixel * frameDesc.LengthInPixels]; - - if (!_Sensor.IsOpen) - { - _Sensor.Open(); - } - } - } - - void Update () - { - if (_Reader != null) - { - var frame = _Reader.AcquireLatestFrame(); - - if (frame != null) - { - frame.CopyConvertedFrameDataToArray(_Data, ColorImageFormat.Rgba); - _Texture.LoadRawTextureData(_Data); - _Texture.Apply(); - - frame.Dispose(); - frame = null; - } - } - } - - void OnApplicationQuit() - { - if (_Reader != null) - { - _Reader.Dispose(); - _Reader = null; - } - - if (_Sensor != null) - { - if (_Sensor.IsOpen) - { - _Sensor.Close(); - } - - _Sensor = null; - } - } -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/KinectView/Scripts/ColorSourceManager.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/KinectView/Scripts/ColorSourceManager.cs.meta deleted file mode 100644 index f16f40f..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/KinectView/Scripts/ColorSourceManager.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 92ab5bea6110edb4081e490c0982748d -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/KinectView/Scripts/ColorSourceView.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/KinectView/Scripts/ColorSourceView.cs deleted file mode 100644 index 9c9707d..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/KinectView/Scripts/ColorSourceView.cs +++ /dev/null @@ -1,30 +0,0 @@ -using UnityEngine; -using System.Collections; -using Windows.Kinect; - -public class ColorSourceView : MonoBehaviour -{ - public GameObject ColorSourceManager; - private ColorSourceManager _ColorManager; - - void Start () - { - GetComponent().material.SetTextureScale("_MainTex", new Vector2(-1, 1)); - } - - void Update() - { - if (ColorSourceManager == null) - { - return; - } - - _ColorManager = ColorSourceManager.GetComponent(); - if (_ColorManager == null) - { - return; - } - - GetComponent().material.mainTexture = _ColorManager.GetColorTexture(); - } -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/KinectView/Scripts/ColorSourceView.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/KinectView/Scripts/ColorSourceView.cs.meta deleted file mode 100644 index ce51abc..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/KinectView/Scripts/ColorSourceView.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: ee5302fdf7d10e74fbbbe1a2f7503f46 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/KinectView/Scripts/DepthSourceManager.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/KinectView/Scripts/DepthSourceManager.cs deleted file mode 100644 index 5b8500d..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/KinectView/Scripts/DepthSourceManager.cs +++ /dev/null @@ -1,59 +0,0 @@ -using UnityEngine; -using System.Collections; -using Windows.Kinect; - -public class DepthSourceManager : MonoBehaviour -{ - private KinectSensor _Sensor; - private DepthFrameReader _Reader; - private ushort[] _Data; - - public ushort[] GetData() - { - return _Data; - } - - void Start () - { - _Sensor = KinectSensor.GetDefault(); - - if (_Sensor != null) - { - _Reader = _Sensor.DepthFrameSource.OpenReader(); - _Data = new ushort[_Sensor.DepthFrameSource.FrameDescription.LengthInPixels]; - } - } - - void Update () - { - if (_Reader != null) - { - var frame = _Reader.AcquireLatestFrame(); - if (frame != null) - { - frame.CopyFrameDataToArray(_Data); - frame.Dispose(); - frame = null; - } - } - } - - void OnApplicationQuit() - { - if (_Reader != null) - { - _Reader.Dispose(); - _Reader = null; - } - - if (_Sensor != null) - { - if (_Sensor.IsOpen) - { - _Sensor.Close(); - } - - _Sensor = null; - } - } -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/KinectView/Scripts/DepthSourceManager.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/KinectView/Scripts/DepthSourceManager.cs.meta deleted file mode 100644 index 06de839..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/KinectView/Scripts/DepthSourceManager.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 1cd019cdd7a54604b9ae8091d242d8a4 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/KinectView/Scripts/DepthSourceView.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/KinectView/Scripts/DepthSourceView.cs deleted file mode 100644 index 2119f02..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/KinectView/Scripts/DepthSourceView.cs +++ /dev/null @@ -1,252 +0,0 @@ -using UnityEngine; -using System.Collections; -using Windows.Kinect; - -public enum DepthViewMode -{ - SeparateSourceReaders, - MultiSourceReader, -} - -public class DepthSourceView : MonoBehaviour -{ - public DepthViewMode ViewMode = DepthViewMode.SeparateSourceReaders; - - public GameObject ColorSourceManager; - public GameObject DepthSourceManager; - public GameObject MultiSourceManager; - - private KinectSensor _Sensor; - private CoordinateMapper _Mapper; - private Mesh _Mesh; - private Vector3[] _Vertices; - private Vector2[] _UV; - private int[] _Triangles; - - // Only works at 4 right now - private const int _DownsampleSize = 4; - private const double _DepthScale = 0.1f; - private const int _Speed = 50; - - private MultiSourceManager _MultiManager; - private ColorSourceManager _ColorManager; - private DepthSourceManager _DepthManager; - - void Start() - { - _Sensor = KinectSensor.GetDefault(); - if (_Sensor != null) - { - _Mapper = _Sensor.CoordinateMapper; - var frameDesc = _Sensor.DepthFrameSource.FrameDescription; - - // Downsample to lower resolution - CreateMesh(frameDesc.Width / _DownsampleSize, frameDesc.Height / _DownsampleSize); - - if (!_Sensor.IsOpen) - { - _Sensor.Open(); - } - } - } - - void CreateMesh(int width, int height) - { - _Mesh = new Mesh(); - GetComponent().mesh = _Mesh; - - _Vertices = new Vector3[width * height]; - _UV = new Vector2[width * height]; - _Triangles = new int[6 * ((width - 1) * (height - 1))]; - - int triangleIndex = 0; - for (int y = 0; y < height; y++) - { - for (int x = 0; x < width; x++) - { - int index = (y * width) + x; - - _Vertices[index] = new Vector3(x, -y, 0); - _UV[index] = new Vector2(((float)x / (float)width), ((float)y / (float)height)); - - // Skip the last row/col - if (x != (width - 1) && y != (height - 1)) - { - int topLeft = index; - int topRight = topLeft + 1; - int bottomLeft = topLeft + width; - int bottomRight = bottomLeft + 1; - - _Triangles[triangleIndex++] = topLeft; - _Triangles[triangleIndex++] = topRight; - _Triangles[triangleIndex++] = bottomLeft; - _Triangles[triangleIndex++] = bottomLeft; - _Triangles[triangleIndex++] = topRight; - _Triangles[triangleIndex++] = bottomRight; - } - } - } - - _Mesh.vertices = _Vertices; - _Mesh.uv = _UV; - _Mesh.triangles = _Triangles; - _Mesh.RecalculateNormals(); - } - - void OnGUI() - { - GUI.BeginGroup(new Rect(0, 0, Screen.width, Screen.height)); - GUI.TextField(new Rect(Screen.width - 250 , 10, 250, 20), "DepthMode: " + ViewMode.ToString()); - GUI.EndGroup(); - } - - void Update() - { - if (_Sensor == null) - { - return; - } - - if (Input.GetButtonDown("Fire1")) - { - if(ViewMode == DepthViewMode.MultiSourceReader) - { - ViewMode = DepthViewMode.SeparateSourceReaders; - } - else - { - ViewMode = DepthViewMode.MultiSourceReader; - } - } - - float yVal = Input.GetAxis("Horizontal"); - float xVal = -Input.GetAxis("Vertical"); - - transform.Rotate( - (xVal * Time.deltaTime * _Speed), - (yVal * Time.deltaTime * _Speed), - 0, - Space.Self); - - if (ViewMode == DepthViewMode.SeparateSourceReaders) - { - if (ColorSourceManager == null) - { - return; - } - - _ColorManager = ColorSourceManager.GetComponent(); - if (_ColorManager == null) - { - return; - } - - if (DepthSourceManager == null) - { - return; - } - - _DepthManager = DepthSourceManager.GetComponent(); - if (_DepthManager == null) - { - return; - } - - GetComponent().material.mainTexture = _ColorManager.GetColorTexture(); - RefreshData(_DepthManager.GetData(), - _ColorManager.ColorWidth, - _ColorManager.ColorHeight); - } - else - { - if (MultiSourceManager == null) - { - return; - } - - _MultiManager = MultiSourceManager.GetComponent(); - if (_MultiManager == null) - { - return; - } - - GetComponent().material.mainTexture = _MultiManager.GetColorTexture(); - - RefreshData(_MultiManager.GetDepthData(), - _MultiManager.ColorWidth, - _MultiManager.ColorHeight); - } - } - - private void RefreshData(ushort[] depthData, int colorWidth, int colorHeight) - { - var frameDesc = _Sensor.DepthFrameSource.FrameDescription; - - ColorSpacePoint[] colorSpace = new ColorSpacePoint[depthData.Length]; - _Mapper.MapDepthFrameToColorSpace(depthData, colorSpace); - - for (int y = 0; y < frameDesc.Height; y += _DownsampleSize) - { - for (int x = 0; x < frameDesc.Width; x += _DownsampleSize) - { - int indexX = x / _DownsampleSize; - int indexY = y / _DownsampleSize; - int smallIndex = (indexY * (frameDesc.Width / _DownsampleSize)) + indexX; - - double avg = GetAvg(depthData, x, y, frameDesc.Width, frameDesc.Height); - - avg = avg * _DepthScale; - - _Vertices[smallIndex].z = (float)avg; - - // Update UV mapping with CDRP - var colorSpacePoint = colorSpace[(y * frameDesc.Width) + x]; - _UV[smallIndex] = new Vector2(colorSpacePoint.X / colorWidth, colorSpacePoint.Y / colorHeight); - } - } - - _Mesh.vertices = _Vertices; - _Mesh.uv = _UV; - _Mesh.triangles = _Triangles; - _Mesh.RecalculateNormals(); - } - - private double GetAvg(ushort[] depthData, int x, int y, int width, int height) - { - double sum = 0.0; - - for (int y1 = y; y1 < y + 4; y1++) - { - for (int x1 = x; x1 < x + 4; x1++) - { - int fullIndex = (y1 * width) + x1; - - if (depthData[fullIndex] == 0) - sum += 4500; - else - sum += depthData[fullIndex]; - - } - } - - return sum / 16; - } - - void OnApplicationQuit() - { - if (_Mapper != null) - { - _Mapper = null; - } - - if (_Sensor != null) - { - if (_Sensor.IsOpen) - { - _Sensor.Close(); - } - - _Sensor = null; - } - } -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/KinectView/Scripts/DepthSourceView.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/KinectView/Scripts/DepthSourceView.cs.meta deleted file mode 100644 index 09bec26..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/KinectView/Scripts/DepthSourceView.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 383e102cbe3bfb34d94c98ea3c2479b4 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/KinectView/Scripts/DisableOnStart.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/KinectView/Scripts/DisableOnStart.cs deleted file mode 100644 index b6b2ab9..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/KinectView/Scripts/DisableOnStart.cs +++ /dev/null @@ -1,11 +0,0 @@ -using UnityEngine; -using System.Collections; - -public class DisableOnStart : MonoBehaviour { - - // Use this for initialization - void Start () - { - gameObject.SetActive (false); - } -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/KinectView/Scripts/DisableOnStart.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/KinectView/Scripts/DisableOnStart.cs.meta deleted file mode 100644 index 4dddfaa..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/KinectView/Scripts/DisableOnStart.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 61e5c93f5da1e324aa7fd9671db875bc -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/KinectView/Scripts/InfraredSourceManager.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/KinectView/Scripts/InfraredSourceManager.cs deleted file mode 100644 index bdb6b15..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/KinectView/Scripts/InfraredSourceManager.cs +++ /dev/null @@ -1,85 +0,0 @@ -using UnityEngine; -using System.Collections; -using Windows.Kinect; - -public class InfraredSourceManager : MonoBehaviour -{ - private KinectSensor _Sensor; - private InfraredFrameReader _Reader; - private ushort[] _Data; - private byte[] _RawData; - - // I'm not sure this makes sense for the Kinect APIs - // Instead, this logic should be in the VIEW - private Texture2D _Texture; - - public Texture2D GetInfraredTexture() - { - return _Texture; - } - - void Start() - { - _Sensor = KinectSensor.GetDefault(); - if (_Sensor != null) - { - _Reader = _Sensor.InfraredFrameSource.OpenReader(); - var frameDesc = _Sensor.InfraredFrameSource.FrameDescription; - _Data = new ushort[frameDesc.LengthInPixels]; - _RawData = new byte[frameDesc.LengthInPixels * 4]; - _Texture = new Texture2D(frameDesc.Width, frameDesc.Height, TextureFormat.BGRA32, false); - - if (!_Sensor.IsOpen) - { - _Sensor.Open(); - } - } - } - - void Update () - { - if (_Reader != null) - { - var frame = _Reader.AcquireLatestFrame(); - if (frame != null) - { - frame.CopyFrameDataToArray(_Data); - - int index = 0; - foreach(var ir in _Data) - { - byte intensity = (byte)(ir >> 8); - _RawData[index++] = intensity; - _RawData[index++] = intensity; - _RawData[index++] = intensity; - _RawData[index++] = 255; // Alpha - } - - _Texture.LoadRawTextureData(_RawData); - _Texture.Apply(); - - frame.Dispose(); - frame = null; - } - } - } - - void OnApplicationQuit() - { - if (_Reader != null) - { - _Reader.Dispose(); - _Reader = null; - } - - if (_Sensor != null) - { - if (_Sensor.IsOpen) - { - _Sensor.Close(); - } - - _Sensor = null; - } - } -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/KinectView/Scripts/InfraredSourceManager.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/KinectView/Scripts/InfraredSourceManager.cs.meta deleted file mode 100644 index be6708d..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/KinectView/Scripts/InfraredSourceManager.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 63eff7f54e54aa049a2331755f3cb99c -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/KinectView/Scripts/InfraredSourceView.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/KinectView/Scripts/InfraredSourceView.cs deleted file mode 100644 index a57a465..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/KinectView/Scripts/InfraredSourceView.cs +++ /dev/null @@ -1,29 +0,0 @@ -using UnityEngine; -using System.Collections; - -public class InfraredSourceView : MonoBehaviour -{ - public GameObject InfraredSourceManager; - private InfraredSourceManager _InfraredManager; - - void Start () - { - GetComponent().material.SetTextureScale("_MainTex", new Vector2(-1, 1)); - } - - void Update() - { - if (InfraredSourceManager == null) - { - return; - } - - _InfraredManager = InfraredSourceManager.GetComponent(); - if (_InfraredManager == null) - { - return; - } - - GetComponent().material.mainTexture = _InfraredManager.GetInfraredTexture(); - } -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/KinectView/Scripts/InfraredSourceView.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/KinectView/Scripts/InfraredSourceView.cs.meta deleted file mode 100644 index 5cca658..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/KinectView/Scripts/InfraredSourceView.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 98f8736f9d8c8e44592c96e57d57c5d4 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/KinectView/Scripts/MultiSourceManager.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/KinectView/Scripts/MultiSourceManager.cs deleted file mode 100644 index 1186278..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/KinectView/Scripts/MultiSourceManager.cs +++ /dev/null @@ -1,100 +0,0 @@ -using UnityEngine; -using System.Collections; -using Windows.Kinect; - -public class MultiSourceManager : MonoBehaviour { - public int ColorWidth { get; private set; } - public int ColorHeight { get; private set; } - - private KinectSensor _Sensor; - private MultiSourceFrameReader _Reader; - private Texture2D _ColorTexture; - private ushort[] _DepthData; - private byte[] _ColorData; - - public Texture2D GetColorTexture() - { - return _ColorTexture; - } - - public ushort[] GetDepthData() - { - return _DepthData; - } - - void Start () - { - _Sensor = KinectSensor.GetDefault(); - - if (_Sensor != null) - { - _Reader = _Sensor.OpenMultiSourceFrameReader(FrameSourceTypes.Color | FrameSourceTypes.Depth); - - var colorFrameDesc = _Sensor.ColorFrameSource.CreateFrameDescription(ColorImageFormat.Rgba); - ColorWidth = colorFrameDesc.Width; - ColorHeight = colorFrameDesc.Height; - - _ColorTexture = new Texture2D(colorFrameDesc.Width, colorFrameDesc.Height, TextureFormat.RGBA32, false); - _ColorData = new byte[colorFrameDesc.BytesPerPixel * colorFrameDesc.LengthInPixels]; - - var depthFrameDesc = _Sensor.DepthFrameSource.FrameDescription; - _DepthData = new ushort[depthFrameDesc.LengthInPixels]; - - if (!_Sensor.IsOpen) - { - _Sensor.Open(); - } - } - } - - void Update () - { - if (_Reader != null) - { - var frame = _Reader.AcquireLatestFrame(); - if (frame != null) - { - var colorFrame = frame.ColorFrameReference.AcquireFrame(); - if (colorFrame != null) - { - var depthFrame = frame.DepthFrameReference.AcquireFrame(); - if (depthFrame != null) - { - colorFrame.CopyConvertedFrameDataToArray(_ColorData, ColorImageFormat.Rgba); - _ColorTexture.LoadRawTextureData(_ColorData); - _ColorTexture.Apply(); - - depthFrame.CopyFrameDataToArray(_DepthData); - - depthFrame.Dispose(); - depthFrame = null; - } - - colorFrame.Dispose(); - colorFrame = null; - } - - frame = null; - } - } - } - - void OnApplicationQuit() - { - if (_Reader != null) - { - _Reader.Dispose(); - _Reader = null; - } - - if (_Sensor != null) - { - if (_Sensor.IsOpen) - { - _Sensor.Close(); - } - - _Sensor = null; - } - } -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/KinectView/Scripts/MultiSourceManager.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/KinectView/Scripts/MultiSourceManager.cs.meta deleted file mode 100644 index b9b6707..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/KinectView/Scripts/MultiSourceManager.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: f752c4e07617d8d4eb21d4975a2d7c61 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/SplineEditor.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/SplineEditor.meta deleted file mode 100644 index befc50f..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/SplineEditor.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: ba34085223129f046aa6e576451ff313 -folderAsset: yes -timeCreated: 1482219460 -licenseType: Free -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/SplineEditor/Editor.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/SplineEditor/Editor.meta deleted file mode 100644 index b3e67e8..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/SplineEditor/Editor.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 7e01da1325b3d824abf7abbc238b90f0 -folderAsset: yes -timeCreated: 1482219461 -licenseType: Free -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/SplineEditor/Editor/BezierSplineEditor.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/SplineEditor/Editor/BezierSplineEditor.cs deleted file mode 100644 index 4f1e60e..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/SplineEditor/Editor/BezierSplineEditor.cs +++ /dev/null @@ -1,309 +0,0 @@ -using UnityEditor; -using UnityEngine; -using System; -using System.Collections; -using uc.Spline; - -[CustomEditor(typeof(BezierSplineComponent))] -public class BezierSplineEditor : Editor -{ - private const float m_point_size = 0.05f; - private BezierSplineComponent m_splinecomp = null; - private BezierSpline m_spline = null; - private BezierSpline.EditHelper m_edithelper; - private int m_drawidx = -1; - - void OnEnable() - { - if(AssetDatabase.Contains(target)) - { - m_splinecomp = null; - m_spline = null; - m_edithelper = null; - } - else - { - m_splinecomp = (BezierSplineComponent)target; - m_spline = m_splinecomp.Spline; - m_edithelper = m_spline.GetEditHelper() as BezierSpline.EditHelper; - } - } - - void OnDisable() - { - ToolsUtil.Hidden = false; - } - - void OnSceneGUI() - { - if (m_splinecomp != null) - { - bool selected = false; - float hsize, hcsize1, hcsize2; - - Undo.RecordObject(m_splinecomp, "BezierSpline Modify"); - - Handles.matrix = m_splinecomp.transform.localToWorldMatrix; - - ToolsUtil.Hidden = m_edithelper.SomethingSelected; - - m_edithelper.Reset(); - while (m_edithelper.MoveNext()) - { - hsize = HandleUtility.GetHandleSize(m_edithelper.Point.m_point); - if (Handles.Button(m_edithelper.Point.m_point, Quaternion.identity, hsize * m_point_size, hsize * m_point_size, DrawPoint)) - { - m_edithelper.Selected = true; - selected = true; - } - if (m_edithelper.Selected) - { - if (m_edithelper.ControlPointsVisible) - { - BezierSplinePoint selectedPoint = m_edithelper.SelectedPoint as BezierSplinePoint; - Handles.color = new Color(1, 1, 0, 1); - Handles.DrawLine(selectedPoint.m_point, selectedPoint.m_point + selectedPoint.m_prevctrl); - Handles.DrawLine(selectedPoint.m_point, selectedPoint.m_point + selectedPoint.m_nextctrl); - Handles.color = new Color(1, 1, 1, 1); - hcsize1 = HandleUtility.GetHandleSize(selectedPoint.m_prevctrl); - m_drawidx = 0; - if (Handles.Button(selectedPoint.m_point + selectedPoint.m_prevctrl, Quaternion.identity, hcsize1 * m_point_size, hcsize1 * m_point_size, DrawControlPoint)) - { - m_edithelper.ControlPoint1Selected = true; - selected = true; - } - hcsize2 = HandleUtility.GetHandleSize(selectedPoint.m_nextctrl); - m_drawidx = 1; - if (Handles.Button(selectedPoint.m_point + selectedPoint.m_nextctrl, Quaternion.identity, hcsize2 * m_point_size, hcsize1 * m_point_size, DrawControlPoint)) - { - m_edithelper.ControlPoint2Selected = true; - selected = true; - } - } - - if (Tools.current == Tool.Move) - { - BezierSplinePoint selectedPoint = m_edithelper.SelectedPoint as BezierSplinePoint; - if (m_edithelper.ControlPoint1Selected) - { - selectedPoint.m_prevctrl = Handles.PositionHandle(m_edithelper.SelectedPoint.m_point + selectedPoint.m_prevctrl, Quaternion.identity) - m_edithelper.SelectedPoint.m_point; - } - else if (m_edithelper.ControlPoint2Selected) - { - if (selectedPoint.m_type == SplinePointType.Bezier) - { - selectedPoint.m_prevctrl = -(Handles.PositionHandle(m_edithelper.SelectedPoint.m_point + selectedPoint.m_nextctrl, Quaternion.identity) - m_edithelper.SelectedPoint.m_point); - } - else - { - selectedPoint.m_nextctrl = Handles.PositionHandle(m_edithelper.SelectedPoint.m_point + selectedPoint.m_nextctrl, Quaternion.identity) - m_edithelper.SelectedPoint.m_point; - } - } - else - { - m_edithelper.SelectedPoint.m_point = Handles.PositionHandle(m_edithelper.SelectedPoint.m_point, Quaternion.identity); - } - } - } - } - - if (GUI.changed) - { - m_spline.Build(); - EditorUtility.SetDirty(m_splinecomp); - Repaint(); - } - if (selected) - { - Repaint(); - SceneView.RepaintAll(); - GUIUtility.keyboardControl = 0; - } - if (Event.current.type == EventType.ValidateCommand) - { - switch (Event.current.commandName) - { - case "UndoRedoPerformed": - m_spline.Build(); - break; - } - } - } - } - - void DrawPoint(int controlID, Vector3 position, Quaternion rotation, float size, EventType eventType) - { - if (eventType != EventType.Layout && eventType != EventType.Repaint) - return; - - if (m_edithelper.Selected && !m_edithelper.ControlPoint1Selected && !m_edithelper.ControlPoint2Selected) - { - Handles.color = new Color(1, 0, 0, 1); - } - else - { - Handles.color = new Color(1, 1, 1, 1); - } - Handles.DotHandleCap(controlID, position, rotation, size, eventType); - Handles.Label(position, m_edithelper.Index.ToString()); - } - - void DrawControlPoint(int controlID, Vector3 position, Quaternion rotation, float size, EventType eventType) - { - if(m_drawidx == 0) - { - if(m_edithelper.ControlPoint1Selected) - { - Handles.color = new Color(1, 0, 0, 1); - } - else - { - Handles.color = new Color(0, 1, 0, 1); - } - Handles.DotHandleCap(controlID, position, rotation, size, eventType); - Handles.Label(position, "-"); - } - else - { - if(m_edithelper.ControlPoint2Selected) - { - Handles.color = new Color(1, 0, 0, 1); - } - else - { - Handles.color = new Color(0, 1, 0, 1); - } - Handles.DotHandleCap(controlID, position, rotation, size, eventType); - Handles.Label(position, "+"); - } - } - - override public void OnInspectorGUI() - { - if(m_splinecomp != null) - { - bool addremove = false, selected = false; - - Undo.RecordObject(m_splinecomp, "BezierSpline Modify"); - - using (new EditorGUILayout.VerticalScope()) - { - m_spline.WrapMode = (SplineWrapMode)EditorGUILayout.EnumPopup("Wrap mode", m_spline.WrapMode); - m_spline.ReparamType = (SplineReparamType)EditorGUILayout.EnumPopup("Reparameterization", m_spline.ReparamType); - if (m_spline.ReparamType != SplineReparamType.None) - { - m_spline.StepCount = EditorGUILayout.IntSlider("Step count", m_spline.StepCount, 1, 64); - } - - EditorGUILayout.HelpBox("Point count: " + m_spline.PointCount.ToString() + "\n" + "Length :" + m_spline.Length.ToString(), MessageType.Info); - } - - using (new EditorGUILayout.HorizontalScope()) - { - using (new EditorGUILayout.VerticalScope()) - { - if (m_spline.PointCount > 0) - { - if (GUILayout.Button("Select first")) - { - m_edithelper.SelectFirst(); - selected = true; - } - if (m_edithelper.SomethingSelected) - { - if (GUILayout.Button("Select next")) - { - m_edithelper.SelectNext(); - selected = true; - } - if (GUILayout.Button("Select previous")) - { - m_edithelper.SelectPrev(); - selected = true; - } - } - } - } - using (new EditorGUILayout.VerticalScope()) - { - if (GUILayout.Button("Append point")) - { - m_edithelper.AppendPoint(); - addremove = true; - } - if (GUILayout.Button("Remove last")) - { - m_edithelper.RemoveLast(); - addremove = true; - } - if (GUILayout.Button("Reverse points")) - { - m_spline.ReversePoints(); - addremove = true; - } - } - } - - EditorGUILayout.Separator(); - - if (m_edithelper.SomethingSelected) - { - EditorGUILayout.TextArea("", GUI.skin.horizontalSlider); - - EditorGUILayout.BeginHorizontal(); - if (GUILayout.Button("Insert before")) - { - m_edithelper.InsertBefore(); - addremove = true; - } - if (GUILayout.Button("Insert after")) - { - m_edithelper.InsertAfter(); - addremove = true; - } - if (GUILayout.Button("Remove")) - { - m_edithelper.Remove(); - addremove = true; - } - EditorGUILayout.EndHorizontal(); - - EditorGUILayout.Separator(); - - BezierSplinePoint selectedPoint = m_edithelper.SelectedPoint as BezierSplinePoint; - - selectedPoint.m_type = (SplinePointType)EditorGUILayout.EnumPopup("Point type", selectedPoint.m_type); - selectedPoint.m_point = EditorGUILayout.Vector3Field("Position", selectedPoint.m_point); - - if(m_edithelper.ControlPointsVisible) - { - selectedPoint.m_prevctrl = EditorGUILayout.Vector3Field("Control -", selectedPoint.m_prevctrl); - selectedPoint.m_nextctrl = EditorGUILayout.Vector3Field("Control +", selectedPoint.m_nextctrl); - } - } - - - - if (GUI.changed || addremove) - { - m_spline.Build(); - EditorUtility.SetDirty(m_splinecomp); - Repaint(); - } - if(selected) - { - Repaint(); - SceneView.RepaintAll(); - GUIUtility.keyboardControl = 0; - } - - } - } - - [MenuItem("GameObject/Create Other/BezierSpline")] - public static void CreateBezierSpline() - { - GameObject go = new GameObject("BezierSpline"); - go.AddComponent(typeof(BezierSplineComponent)); - } -} \ No newline at end of file diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/SplineEditor/Editor/BezierSplineEditor.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/SplineEditor/Editor/BezierSplineEditor.cs.meta deleted file mode 100644 index 70b0fb9..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/SplineEditor/Editor/BezierSplineEditor.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 5fca67f17674c2646bf02d8329f8d0fd -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/SplineEditor/Editor/ToolsUtil.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/SplineEditor/Editor/ToolsUtil.cs deleted file mode 100644 index 11f2fb1..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/SplineEditor/Editor/ToolsUtil.cs +++ /dev/null @@ -1,19 +0,0 @@ -using UnityEngine; -using UnityEditor; -using System.Collections; -using System.Reflection; - -public class ToolsUtil -{ - public static bool Hidden - { - get - { - return (bool)typeof(Tools).GetField("s_Hidden", BindingFlags.NonPublic | BindingFlags.Static).GetValue(null); - } - set - { - typeof(Tools).GetField("s_Hidden", BindingFlags.NonPublic | BindingFlags.Static).SetValue(null, value); - } - } -} \ No newline at end of file diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/SplineEditor/Editor/ToolsUtil.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/SplineEditor/Editor/ToolsUtil.cs.meta deleted file mode 100644 index 87e71e0..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/SplineEditor/Editor/ToolsUtil.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: e0175365919a26e4a8bcb3f733756b07 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/SplineEditor/Editor/UniSplineEditor.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/SplineEditor/Editor/UniSplineEditor.cs deleted file mode 100644 index a8dcb4f..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/SplineEditor/Editor/UniSplineEditor.cs +++ /dev/null @@ -1,226 +0,0 @@ -using UnityEditor; -using UnityEngine; -using System; -using System.Collections; -using uc.Spline; - -[CustomEditor(typeof(UniSplineComponent))] -public class UniSplineEditor : Editor -{ - private const float m_point_size = 0.05f; - private UniSplineComponent m_splinecomp = null; - private UniSpline m_spline = null; - private UniSpline.EditHelper m_edithelper; - - void OnEnable() - { - if(AssetDatabase.Contains(target)) - { - m_splinecomp = null; - m_spline = null; - m_edithelper = null; - } - else - { - m_splinecomp = (UniSplineComponent)target; - m_spline = m_splinecomp.Spline; - m_edithelper = m_spline.GetEditHelper() as UniSpline.EditHelper; - } - } - - void OnDisable() - { - ToolsUtil.Hidden = false; - } - - void OnSceneGUI() - { - if(m_splinecomp != null) - { - bool selected = false; - float hsize; - - Undo.RecordObject(m_splinecomp, "UniSpline Modify"); - - Handles.matrix = m_splinecomp.transform.localToWorldMatrix; - - ToolsUtil.Hidden = m_edithelper.SomethingSelected; - - m_edithelper.Reset(); - while(m_edithelper.MoveNext()) - { - hsize = HandleUtility.GetHandleSize(m_edithelper.Point.m_point); - if(Handles.Button(m_edithelper.Point.m_point, Quaternion.identity, hsize * m_point_size, hsize * m_point_size, DrawPoint)) - { - m_edithelper.Selected = true; - selected = true; - } - if(m_edithelper.Selected) - { - if(Tools.current == Tool.Move) - { - m_edithelper.Point.m_point = Handles.PositionHandle(m_edithelper.Point.m_point, Quaternion.identity); - } - } - } - - if(GUI.changed) - { - m_spline.Build(); - EditorUtility.SetDirty(m_splinecomp); - Repaint(); - } - if(selected) - { - Repaint(); - SceneView.RepaintAll(); - GUIUtility.keyboardControl = 0; - } - } - } - - void DrawPoint(int controlID, Vector3 position, Quaternion rotation, float size, EventType eventType) - { - if (m_edithelper.Selected) - { - Handles.color = new Color(1, 0, 0, 1); - } - else - { - Handles.color = new Color(1, 1, 1, 1); - } - Handles.DotHandleCap(controlID, position, rotation, size, eventType); - Handles.Label(position, m_edithelper.Index.ToString()); - } - - override public void OnInspectorGUI() - { - if(m_splinecomp != null) - { - bool addremove = false, selected = false; - - Undo.RecordObject(m_splinecomp, "UniSpline Modify"); - - EditorGUILayout.BeginVertical(); - EditorGUILayout.LabelField("Point count", m_spline.PointCount.ToString()); - EditorGUILayout.LabelField("Length", m_spline.Length.ToString()); - m_spline.SplineType = (UniSplineType)EditorGUILayout.EnumPopup("Type", m_spline.SplineType); - m_spline.WrapMode = (SplineWrapMode)EditorGUILayout.EnumPopup("Wrap mode", m_spline.WrapMode); - m_spline.ReparamType = (SplineReparamType)EditorGUILayout.EnumPopup("Reparameterization", m_spline.ReparamType); - if(m_spline.ReparamType != SplineReparamType.None) - { - m_spline.StepCount = EditorGUILayout.IntSlider("Step count", m_spline.StepCount, 1, 64); - } - - switch(m_spline.SplineType) - { - case UniSplineType.CatmullRom: break; - case UniSplineType.Hermite: - m_spline.Tension = EditorGUILayout.FloatField("Tension", m_spline.Tension); - m_spline.Bias = EditorGUILayout.FloatField("Bias", m_spline.Bias); - break; - case UniSplineType.KochanekBartels: - m_spline.Tension = EditorGUILayout.FloatField("Tension", m_spline.Tension); - m_spline.Continuity = EditorGUILayout.FloatField("Continuity", m_spline.Continuity); - m_spline.Bias = EditorGUILayout.FloatField("Bias", m_spline.Bias); - break; - } - - EditorGUILayout.EndVertical(); - - EditorGUILayout.BeginHorizontal(); - if(GUILayout.Button("Append point")) - { - m_edithelper.AppendPoint(); - addremove = true; - } - if(GUILayout.Button("Remove last")) - { - m_edithelper.RemoveLast(); - addremove = true; - } - if(GUILayout.Button("Reverse points")) - { - m_spline.ReversePoints(); - addremove = true; - } - EditorGUILayout.EndHorizontal(); - - EditorGUILayout.BeginHorizontal(); - if(m_spline.GetPointCount() > 0) - { - if(GUILayout.Button("Select first")) - { - m_edithelper.SelectFirst(); - selected = true; - } - if(m_edithelper.SomethingSelected) - { - if(GUILayout.Button("Select next")) - { - m_edithelper.SelectNext(); - selected = true; - } - if(GUILayout.Button("Select previous")) - { - m_edithelper.SelectPrev(); - selected = true; - } - } - } - EditorGUILayout.EndHorizontal(); - - if(m_edithelper.SomethingSelected) - { - m_edithelper.SelectedPoint.m_point = EditorGUILayout.Vector3Field("Position", m_edithelper.SelectedPoint.m_point); - - EditorGUILayout.BeginHorizontal(); - if(GUILayout.Button("Insert before")) - { - m_edithelper.InsertBefore(); - addremove = true; - } - if(GUILayout.Button("Insert after")) - { - m_edithelper.InsertAfter(); - addremove = true; - } - if(GUILayout.Button("Remove")) - { - m_edithelper.Remove(); - addremove = true; - } - EditorGUILayout.EndHorizontal(); - } - - if(GUI.changed || addremove) - { - m_spline.Build(); - EditorUtility.SetDirty(m_splinecomp); - Repaint(); - } - if(selected) - { - Repaint(); - SceneView.RepaintAll(); - GUIUtility.keyboardControl = 0; - } - if (Event.current.type == EventType.ValidateCommand) - { - switch (Event.current.commandName) - { - case "UndoRedoPerformed": - m_spline.Build(); - break; - } - } - } - } - - [MenuItem("GameObject/Create Other/UniSpline")] - public static void CreateUniSpline() - { - GameObject go = new GameObject("UniSpline"); - go.AddComponent(typeof(UniSplineComponent)); - } -} \ No newline at end of file diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/SplineEditor/Editor/UniSplineEditor.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/SplineEditor/Editor/UniSplineEditor.cs.meta deleted file mode 100644 index c5f681d..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/SplineEditor/Editor/UniSplineEditor.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 9c688ced67a614a4995d672131b93ad4 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/SplineEditor/Scripts.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/SplineEditor/Scripts.meta deleted file mode 100644 index d177765..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/SplineEditor/Scripts.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: c15b53b2bd47f6347af0ef456865cf46 -folderAsset: yes -timeCreated: 1482219461 -licenseType: Free -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/SplineEditor/Scripts/BaseSpline.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/SplineEditor/Scripts/BaseSpline.cs deleted file mode 100644 index bd8b1ac..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/SplineEditor/Scripts/BaseSpline.cs +++ /dev/null @@ -1,535 +0,0 @@ -using UnityEngine; -using System.Collections; -using System.Collections.Generic; -using System; - -namespace uc.Spline -{ - public enum UniSplineType - { - CatmullRom, - Hermite, - KochanekBartels - } - - public enum SplineWrapMode - { - Once, - Repeat, - PingPong, - Loop - } - - public enum SplinePointType - { - Corner, - Smooth, - Bezier, - BezierCorner - }; - - public enum SplineSegmentType - { - Linear, - Curve - }; - - public enum SplineReparamType - { - None, - Simple, - RungeKutta - }; - - [Serializable] - public class BaseSplinePoint - { - public BaseSplinePoint(Vector3 m_point) - { - this.m_point = m_point; - } - public Vector3 m_point; - } - - [Serializable] - public class BaseSplineSegment - { - public Vector3 m_startpos, m_startctrl, m_endctrl, m_endpos; - public float m_startlen, m_endlen, m_length; - public float[] m_params, m_precomps; - internal virtual Vector3 GetPosition(float t) { return Vector3.zero; } - internal virtual Vector3 GetTangent(float t) { return Vector3.zero; } - internal virtual Vector3 GetNormal(float t) { return Vector3.zero; } - } - - public abstract class BaseSpline - { - public class SplineIterator - { - internal SplineIterator(BaseSpline spline, bool reverse, int startidx, int endidx) - { - m_spline = spline; - m_reverse = reverse; - m_startidx = Mathf.Min(startidx, endidx); - m_endidx = Mathf.Max(startidx, endidx); - Reset(); - } - - public void SetTransform(Transform trnsfrm) - { - m_transform = trnsfrm; - } - - public Vector3 GetPosition() - { - if (m_transform != null) - { - return m_transform.TransformPoint(m_spline.GetPosition(m_segidx, m_segpos)); - } - else - { - return m_spline.GetPosition(m_segidx, m_segpos); - } - } - - public Vector3 GetTangent() - { - Quaternion rotation = m_transform != null ? m_transform.localRotation : Quaternion.identity; - float direction = m_reverse ? -1 : 1; - return rotation * (direction * m_spline.GetTangent(m_segidx, m_segpos)); - } - - public Vector3 GetNormal() - { - Quaternion rotation = m_transform != null ? m_transform.localRotation : Quaternion.identity; - return rotation * m_spline.GetNormal(m_segidx, m_segpos); - } - - public bool IsOnceOut() - { - return m_onceout; - } - - public void Reset() - { - if (m_reverse) - { - SetToEnd(); - } - else - { - SetToStart(); - } - m_back = false; - m_onceout = false; - } - - public void SetOffset(float offset) - { - offset = WrapPosition(m_spline.WrapMode, offset, m_spline.Length); - m_segidx = m_spline.FindSegment(offset); - m_segpos = offset - m_spline.GetSegmentStartLength(m_segidx); - } - - public float GetOffset() - { - return m_spline.GetSegmentStartLength(m_segidx) + m_segpos; - } - - public void SetOffsetPercent(float offset) - { - offset = WrapPosition(m_spline.WrapMode, offset, m_spline.Length); - m_segidx = m_spline.FindSegment(offset * m_spline.Length); - m_segpos = offset - m_spline.GetSegmentStartLength(m_segidx); - } - - public float GetOffsetPercent() - { - float result = (m_spline.GetSegmentStartLength(m_segidx) + m_segpos) / m_spline.Length; - if (m_reverse) - result = 1 - result; - return result; - } - - public void Iterate(float length) - { - bool stop = false, back = false; - if (m_reverse) - { - length = -length; - } - if (length < 0) - { - back = !m_back; - length = -length; - } - else - { - back = m_back; - } - if (back) - { - while (m_segpos - length < 0 && !stop) - { - length -= m_segpos; - - if (m_segidx - 1 < m_startidx) - { - switch (m_spline.WrapMode) - { - case SplineWrapMode.Loop: - SetToEnd(); - break; - case SplineWrapMode.Once: - SetToStart(); - stop = true; - m_onceout = true; - break; - case SplineWrapMode.Repeat: - SetToEnd(); - break; - case SplineWrapMode.PingPong: - SetToStart(); - m_back = !m_back; - stop = true; - break; - } - } - else - { - --m_segidx; - m_segpos = m_spline.GetSegmentLength(m_segidx); - } - } - if (!stop) - { - m_segpos -= length; - } - } - else - { - while (m_segpos + length > m_spline.GetSegmentLength(m_segidx) && !stop) - { - length -= m_spline.GetSegmentLength(m_segidx) - m_segpos; - - if (m_segidx + 1 >= m_endidx) - { - switch (m_spline.m_wrapmode) - { - case SplineWrapMode.Loop: - SetToStart(); - break; - case SplineWrapMode.Once: - SetToEnd(); - stop = true; - m_onceout = true; - break; - case SplineWrapMode.Repeat: - SetToStart(); - break; - case SplineWrapMode.PingPong: - SetToEnd(); - m_back = !m_back; - stop = true; - break; - } - } - else - { - ++m_segidx; - m_segpos = 0; - } - } - if (!stop) - { - m_segpos += length; - } - } - } - - private void SetToStart() - { - m_segidx = m_startidx; - m_segpos = 0; - } - - private void SetToEnd() - { - m_segidx = m_endidx - 1; - m_segpos = m_spline.GetSegmentLength(m_segidx); - } - - private Transform m_transform = null; - private BaseSpline m_spline; - private int m_segidx = 0, m_startidx = 0, m_endidx = 0; - private bool m_reverse = false, m_back = false, m_onceout = false; - private float m_segpos = 0; - } - - public abstract class BaseEditHelper - { - protected BaseSpline m_spline; - protected int m_idx = -1, m_selidx = -1; - - internal BaseEditHelper(BaseSpline spline) - { - m_spline = spline; - } - - public virtual bool MoveNext() - { - ++m_idx; - if (m_idx < m_spline.PointCount) - { - return true; - } - return false; - } - - public virtual void Reset() - { - m_idx = -1; - } - - public abstract void AppendPoint(); - public abstract void InsertBefore(); - public abstract void InsertAfter(); - - public abstract void Remove(); - - public virtual void RemoveLast() - { - if (m_spline.PointCount > 0) - { - RemoveLastPoint(); - } - if (m_selidx >= m_spline.PointCount) - { - m_selidx = m_spline.PointCount - 1; - } - } - - public virtual void SelectFirst() - { - m_selidx = (m_spline.PointCount > 0) ? 0 : -1; - } - - public virtual void SelectNext() - { - m_selidx = (m_selidx < m_spline.PointCount - 1) ? m_selidx + 1 : 0; - } - - public virtual void SelectPrev() - { - m_selidx = (m_selidx > 0) ? m_selidx - 1 : m_spline.PointCount - 1; - } - - public virtual int Index - { - get { return m_idx; } - } - - public virtual int SelectedIndex - { - get { return m_selidx; } - } - - public virtual bool Selected - { - get { return m_idx == m_selidx; } - set { if (value) { m_selidx = m_idx; } else { m_selidx = -1; } } - } - - public virtual bool SomethingSelected - { - get { return m_selidx != -1; } - } - - public abstract BaseSplinePoint Point { get; set; } - public abstract BaseSplinePoint SelectedPoint { get; set; } - - public abstract void RemoveLastPoint(); - public abstract void RemoveAllPoints(); - } - - [SerializeField] - protected SplineWrapMode m_wrapmode = SplineWrapMode.Once; - [SerializeField] - protected float m_length = 0; - [SerializeField] - protected int m_stepcount = 8; - [SerializeField] - protected SplineReparamType m_reparam = SplineReparamType.None; - - protected int m_buildnum = 0; - - [SerializeField] - protected float m_precompdiv = 1; - - public int BuildNum { get { return m_buildnum; } } - public abstract int PointCount { get; } - - public float Length { get { return m_length; } } - - public SplineWrapMode WrapMode - { - get { return m_wrapmode; } - set { m_wrapmode = value; } - } - - public int StepCount - { - get { return m_stepcount; } - set { if (value > 1) { m_stepcount = value; } } - } - - public SplineReparamType ReparamType - { - get { return m_reparam; } - set { m_reparam = value; } - } - - public abstract void Build(); - - public abstract int GetPointCount(); - public abstract int GetSegmentCount(); - protected abstract float GetSegmentLength(int segidx); - protected abstract float GetSegmentStartLength(int segidx); - protected abstract float GetSegmentEndLength(int segidx); - protected abstract int FindSegment(float offset); - protected abstract Vector3 GetDrawPosition(int segidx, float segpos); - protected abstract Vector3 GetPosition(int segidx, float segpos); - protected abstract Vector3 GetTangent(int segidx, float segpos); - protected abstract Vector3 GetNormal(int segidx, float segpos); - internal abstract void AppendPoint(BaseSplinePoint p); - internal abstract void InsertPoint(int idx, BaseSplinePoint p); - internal abstract void RemovePoint(int idx); - internal abstract Vector3 GetPointPosition(int idx); - - public SplineIterator GetIterator() - { - return new SplineIterator(this, false, 0, GetSegmentCount()); - } - - public SplineIterator GetReverseIterator() - { - return new SplineIterator(this, true, 0, GetSegmentCount()); - } - - public SplineIterator GetPartialIterator(int startidx, int endidx) - { - return new SplineIterator(this, false, startidx, endidx); - } - - public SplineIterator GetPartialReverseIterator(int startidx, int endidx) - { - return new SplineIterator(this, true, startidx, endidx); - } - - public Vector3[] GenerateDrawPoints(int divs) - { - int segcnt = GetSegmentCount(), ptidx = 0; - Vector3[] dc = new Vector3[segcnt * divs + 1]; - float dt = 1 / (float)divs; - - dc[ptidx] = GetDrawPosition(0, 0); - ++ptidx; - for (int i = 0; i < segcnt; ++i) - { - for (int j = 1; j < divs + 1; ++j) - { - dc[ptidx] = GetDrawPosition(i, (float)j * dt); - ++ptidx; - } - } - - return dc; - } - - public abstract BaseEditHelper GetEditHelper(); - - static public float WrapPosition(SplineWrapMode wrapmode, float pos, float len) - { - switch (wrapmode) - { - case SplineWrapMode.Loop: - case SplineWrapMode.Repeat: - pos = Mathf.Repeat(pos, len); - break; - case SplineWrapMode.PingPong: - pos = Mathf.PingPong(pos, len); - break; - case SplineWrapMode.Once: - pos = Mathf.Clamp(pos, 0, len); - break; - } - return pos; - } - - protected float GetReparamRungeKutta(BaseSplineSegment ss, float u) - { - float t = 0, k1, k2, k3, k4, h = u / (float)m_stepcount, mag; - for (int i = 1; i <= m_stepcount; i++) - { - mag = ss.GetTangent(t).magnitude; - if (mag == 0) - { - k1 = 0; - k2 = 0; - k3 = 0; - k4 = 0; - } - else - { - k1 = h / ss.GetTangent(t).magnitude; - k2 = h / ss.GetTangent(t + k1 * 0.5f).magnitude; - k3 = h / ss.GetTangent(t + k2 * 0.5f).magnitude; - k4 = h / ss.GetTangent(t + k3).magnitude; - } - t += (k1 + 2 * (k2 + k3) + k4) * 0.16666666666666666666666666666667f; - } - return t; - } - - protected float GetReparam(BaseSplineSegment ss, float u) - { - if (u <= 0) - { - return 0; - } - else if (u >= 1) - { - return 1; - } - - switch (m_reparam) - { - case SplineReparamType.RungeKutta: - { - int ridx = (int)(u * (float)m_stepcount); - float uc = (u - ss.m_precomps[ridx]) / m_precompdiv; - return Mathf.Lerp(ss.m_params[ridx], ss.m_params[ridx + 1], uc); - } - - case SplineReparamType.Simple: - { - int ridx = 0; - for (int i = 1; i < m_stepcount + 1; ++i) - { - if (ss.m_precomps[i] > u) - { - ridx = i - 1; - break; - } - } - float uc = (u - ss.m_precomps[ridx]) / (ss.m_precomps[ridx + 1] - ss.m_precomps[ridx]); - return Mathf.Lerp(ss.m_params[ridx], ss.m_params[ridx + 1], uc); - } - - default: - return 0; - } - } - - } -} \ No newline at end of file diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/SplineEditor/Scripts/BaseSpline.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/SplineEditor/Scripts/BaseSpline.cs.meta deleted file mode 100644 index 1dc4c7a..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/SplineEditor/Scripts/BaseSpline.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: a59219dcc930dac4abb50c2bd77011bd -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/SplineEditor/Scripts/BezierSplineComponent.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/SplineEditor/Scripts/BezierSplineComponent.cs deleted file mode 100644 index 4d8a175..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/SplineEditor/Scripts/BezierSplineComponent.cs +++ /dev/null @@ -1,552 +0,0 @@ -using UnityEngine; -using System; -using System.Collections; -using System.Collections.Generic; - -namespace uc.Spline -{ - [Serializable] - public class BezierSplinePoint : BaseSplinePoint - { - public BezierSplinePoint(Vector3 p, Vector3 c1, Vector3 c2, SplinePointType t) - : base(p) - { - m_prevctrl = c1; - m_nextctrl = c2; - m_type = t; - } - public BezierSplinePoint(Vector3 p) - : base(p) - { - m_prevctrl = Vector3.zero; - m_nextctrl = Vector3.zero; - m_type = SplinePointType.Corner; - } - - public Vector3 m_prevctrl, m_nextctrl; - public SplinePointType m_type; - } - - [Serializable] - public class BezierSpline : BaseSpline - { - public class EditHelper : BaseEditHelper - { - protected new BezierSpline m_spline; - internal EditHelper(BezierSpline spline) : base(spline) { - this.m_spline = spline; } - - public override void AppendPoint() - { - Vector3 newPos = Vector3.zero; - if (m_spline.PointCount == 1) - { - newPos = m_spline.GetPointPosition(m_spline.PointCount - 1) + Vector3.right; - } - else if(m_spline.PointCount > 1) - { - newPos = m_spline.GetPointPosition(m_spline.PointCount - 1) * 2 - m_spline.GetPointPosition(m_spline.PointCount - 2); - } - BezierSplinePoint p = new BezierSplinePoint(newPos); - m_spline.AppendPoint(p); - m_selidx = m_spline.PointCount - 1; - } - - public override void InsertBefore() - { - if (m_spline.PointCount == 1) - { - BezierSplinePoint p = new BezierSplinePoint(m_spline.GetPointPosition(m_spline.PointCount - 1) + Vector3.left); - m_spline.InsertPoint(0, p); - } - else - { - int previdx = m_selidx; - m_selidx = (int)Mathf.Repeat(m_selidx - 1, m_spline.PointCount - 1); - BezierSplinePoint p = new BezierSplinePoint((m_spline.GetPointPosition(m_selidx) + m_spline.GetPointPosition(previdx)) * 0.5f); - m_spline.InsertPoint(previdx, p); - m_selidx = previdx; - } - } - - public override void InsertAfter() - { - if (m_spline.m_points.Count == 1) - { - AppendPoint(); - } - else - { - int previdx = m_selidx; - m_selidx = (int)Mathf.Repeat(m_selidx + 1, m_spline.PointCount - 1); - BezierSplinePoint p = new BezierSplinePoint((m_spline.GetPointPosition(m_selidx) + m_spline.GetPointPosition(previdx)) * 0.5f); - m_spline.InsertPoint(m_selidx, p); - } - } - - public override void Remove() - { - m_spline.RemovePoint(m_selidx); - m_selidx = (int)Mathf.Repeat(m_selidx, m_spline.PointCount - 1); - } - - private int m_selcpidx = -1; - - public override bool Selected - { - get { return base.Selected; } - set { base.Selected = value; m_selcpidx = -1; } - } - - public override BaseSplinePoint Point - { - get { return m_spline.m_points[m_idx]; } - set { m_spline.m_points[m_idx] = value as BezierSplinePoint; } - } - - public override BaseSplinePoint SelectedPoint - { - get { return m_spline.m_points[m_selidx]; } - set { m_spline.m_points[m_selidx] = value as BezierSplinePoint; } - } - - public bool ControlPoint1Selected - { - get { return m_selcpidx == 0; } - set { if (value) { m_selcpidx = 0; } else { m_selcpidx = -1; } } - } - - public bool ControlPoint2Selected - { - get { return m_selcpidx == 1; } - set { if (value) { m_selcpidx = 1; } else { m_selcpidx = -1; } } - } - - public bool ControlPointsVisible - { - get - { - if (m_selidx == -1) return false; - BezierSplinePoint p = m_spline.m_points[m_selidx] as BezierSplinePoint; - return (p.m_type == SplinePointType.Bezier || - p.m_type == SplinePointType.BezierCorner); - } - } - - public override void RemoveLastPoint() - { - m_spline.m_points.RemoveAt(m_spline.PointCount - 1); - } - - public override void RemoveAllPoints() - { - m_spline.m_points.Clear(); - } - } - - [Serializable] - public class BezierSplineSegment : BaseSplineSegment - { - public SplineSegmentType m_type; - internal override Vector3 GetPosition(float t) - { - switch (m_type) - { - case SplineSegmentType.Linear: - return m_startpos + (m_endpos - m_startpos) * t; - case SplineSegmentType.Curve: - return uc.Math.Spline.Bezier.Position(m_startctrl, m_startpos, m_endpos, m_endctrl, t); - default: return Vector3.zero; - } - } - internal override Vector3 GetTangent(float t) - { - switch (m_type) - { - case SplineSegmentType.Linear: - return (m_endpos - m_startpos); - case SplineSegmentType.Curve: - return uc.Math.Spline.Bezier.Tangent(m_startctrl, m_startpos, m_endpos, m_endctrl, t); - default: return Vector3.zero; - } - } - internal override Vector3 GetNormal(float t) - { - switch (m_type) - { - case SplineSegmentType.Linear: - return Vector3.zero; - case SplineSegmentType.Curve: - return uc.Math.Spline.Bezier.Normal(m_startctrl, m_startpos, m_endpos, m_endctrl, t); - default: return Vector3.zero; - } - } - } - - [SerializeField] - private List m_points = new List(); - [SerializeField] - private BezierSplineSegment[] m_segments = null; - public override int PointCount { get { return m_points.Count; } } - - public void ReversePoints() - { - m_points.Reverse(); - Vector3 swp; - for (int i = 0; i < m_points.Count; ++i) - { - BezierSplinePoint p = m_points[i] as BezierSplinePoint; - - swp = p.m_nextctrl; - p.m_nextctrl = p.m_prevctrl; - p.m_prevctrl = swp; - } - } - - public override void Build() - { - int idx, count; - BezierSplinePoint pp, sp, ep, np; - // - if (m_points.Count < 2) - { - m_segments = null; - m_length = 0; - return; - } - if (m_wrapmode == SplineWrapMode.Loop) - { - count = m_points.Count; - } - else - { - count = m_points.Count - 1; - } - // - m_segments = new BezierSplineSegment[count]; - m_length = 0; - idx = 0; - if (m_wrapmode == SplineWrapMode.Loop) - { - while (idx < count) - { - pp = m_points[(int)Mathf.Repeat(idx - 1, m_points.Count)] as BezierSplinePoint; - sp = m_points[(int)Mathf.Repeat(idx, m_points.Count)] as BezierSplinePoint; - ep = m_points[(int)Mathf.Repeat(idx + 1, m_points.Count)] as BezierSplinePoint; - np = m_points[(int)Mathf.Repeat(idx + 2, m_points.Count)] as BezierSplinePoint; - - m_segments[idx] = new BezierSplineSegment(); - BuildSegment(m_segments[idx] as BezierSplineSegment, pp, sp, ep, np); - ++idx; - } - } - else - { - while (idx < count) - { - pp = m_points[Mathf.Clamp(idx - 1, 0, m_points.Count - 1)] as BezierSplinePoint; - sp = m_points[Mathf.Clamp(idx, 0, m_points.Count - 1)] as BezierSplinePoint; - ep = m_points[Mathf.Clamp(idx + 1, 0, m_points.Count - 1)] as BezierSplinePoint; - np = m_points[Mathf.Clamp(idx + 2, 0, m_points.Count - 1)] as BezierSplinePoint; - - m_segments[idx] = new BezierSplineSegment(); - BuildSegment(m_segments[idx] as BezierSplineSegment, pp, sp, ep, np); - ++idx; - } - } - - ++m_buildnum; - } - - private void BuildSegment(BezierSplineSegment ss, BezierSplinePoint pp, BezierSplinePoint sp, BezierSplinePoint ep, BezierSplinePoint np) - { - PreparePoint(pp, sp, ep); - PreparePoint(sp, ep, np); - - ss.m_startpos = sp.m_point; - ss.m_endpos = ep.m_point; - ss.m_startctrl = ss.m_startpos + sp.m_nextctrl; - ss.m_endctrl = ss.m_endpos + ep.m_prevctrl; - - if (sp.m_type == SplinePointType.Corner && ep.m_type == SplinePointType.Corner) - { - ss.m_type = SplineSegmentType.Linear; - } - else - { - ss.m_type = SplineSegmentType.Curve; - } - - ss.m_startlen = m_length; - float seglen = GetLength(ss); - m_length += seglen; - ss.m_length = seglen; - ss.m_endlen = m_length; - - switch (m_reparam) - { - case SplineReparamType.None: - ss.m_params = null; - ss.m_precomps = null; - break; - - case SplineReparamType.Simple: - { - m_precompdiv = 1 / (float)m_stepcount; - float param = 0, length = 0; - - Vector3 prev, next; - - ss.m_params = new float[m_stepcount + 1]; - ss.m_precomps = new float[m_stepcount + 1]; - for (int i = 1; i < m_stepcount + 1; ++i) - { - prev = ss.GetPosition(param); - param += m_precompdiv; - next = ss.GetPosition(param); - length += (next - prev).magnitude; - ss.m_precomps[i] = length / seglen; - ss.m_params[i] = param; - } - ss.m_params[0] = 0; - ss.m_params[m_stepcount] = 1; - ss.m_precomps[0] = 0; - ss.m_precomps[m_stepcount] = 1; - m_precompdiv = 1 / (float)m_stepcount; - } - break; - - case SplineReparamType.RungeKutta: - float dlen = seglen / (float)m_stepcount, lparam = 0; - - ss.m_params = new float[m_stepcount + 1]; - ss.m_precomps = new float[m_stepcount + 1]; - for (int i = 0; i < m_stepcount + 1; ++i) - { - ss.m_params[i] = GetReparamRungeKutta(ss, lparam); - ss.m_precomps[i] = lparam / seglen; - lparam += dlen; - } - ss.m_params[0] = 0; - ss.m_params[m_stepcount] = 1; - ss.m_precomps[0] = 0; - ss.m_precomps[m_stepcount] = 1; - m_precompdiv = 1 / (float)m_stepcount; - break; - } - } - - private void PreparePoint(BezierSplinePoint pp, BezierSplinePoint pt, BezierSplinePoint np) - { - switch (pt.m_type) - { - case SplinePointType.Bezier: - pt.m_nextctrl = -pt.m_prevctrl; - break; - - case SplinePointType.Smooth: - pt.m_prevctrl = -0.25f * (np.m_point - pp.m_point); - pt.m_nextctrl = -0.25f * (pp.m_point - np.m_point); - break; - - case SplinePointType.Corner: - pt.m_prevctrl = Vector3.zero; - pt.m_nextctrl = Vector3.zero; - break; - - case SplinePointType.BezierCorner: - break; - } - } - - private float GetLength(BezierSplineSegment ss) - { - switch (ss.m_type) - { - case SplineSegmentType.Linear: - return (ss.m_endpos - ss.m_startpos).magnitude; - - case SplineSegmentType.Curve: - { - float len = 0; - Vector3 start, end; - float t = 0, dt = 1 / (float)m_stepcount; - int idx = 0; - start = ss.m_startpos; - while (idx < m_stepcount) - { - t += dt; - end = ss.GetPosition(t); - len += (end - start).magnitude; - start = end; - ++idx; - } - return len; - } - - default: return 0; - } - } - - public override int GetPointCount() { return m_points.Count; } - public override int GetSegmentCount() - { - if (m_segments != null) - { - return m_segments.Length; - } - return 0; - } - protected override float GetSegmentLength(int segidx) - { - return m_segments[segidx].m_length; - } - protected override float GetSegmentStartLength(int segidx) - { - return m_segments[segidx].m_startlen; - } - protected override float GetSegmentEndLength(int segidx) - { - return m_segments[segidx].m_endlen; - } - protected override int FindSegment(float offset) - { - for (int i = 0; i < m_segments.Length; ++i) - { - if (m_segments[i].m_startlen <= offset && m_segments[i].m_endlen > offset) - { - return i; - } - } - return m_segments.Length - 1; - } - protected override Vector3 GetDrawPosition(int segidx, float segpos) - { - return m_segments[segidx].GetPosition(segpos); - } - protected override Vector3 GetPosition(int segidx, float segpos) - { - BaseSplineSegment ss = m_segments[segidx]; - if (m_reparam == SplineReparamType.None) - { - return ss.GetPosition(segpos / ss.m_length); - } - else - { - return ss.GetPosition(GetReparam(ss, segpos / ss.m_length)); - } - } - protected override Vector3 GetTangent(int segidx, float segpos) - { - BaseSplineSegment ss = m_segments[segidx]; - if (m_reparam == SplineReparamType.None) - { - return ss.GetTangent(segpos / ss.m_length); - } - else - { - return ss.GetTangent(GetReparam(ss, segpos / ss.m_length)); - } - } - protected override Vector3 GetNormal(int segidx, float segpos) - { - BaseSplineSegment ss = m_segments[segidx]; - if (m_reparam == SplineReparamType.None) - { - return ss.GetNormal(segpos / ss.m_length); - } - else - { - return ss.GetNormal(GetReparam(ss, segpos / ss.m_length)); - } - } - internal override void AppendPoint(BaseSplinePoint p) - { - m_points.Add(p as BezierSplinePoint); - } - internal override void InsertPoint(int idx, BaseSplinePoint p) - { - if (idx < 0 || idx > m_points.Count) - { - throw (new IndexOutOfRangeException()); - } - m_points.Insert(idx, p as BezierSplinePoint); - } - internal override void RemovePoint(int idx) - { - if (idx < 0 || idx > m_points.Count) - { - throw (new IndexOutOfRangeException()); - } - m_points.RemoveAt(idx); - } - internal override Vector3 GetPointPosition(int idx) - { - if (idx < 0 || idx > m_points.Count) - { - throw (new IndexOutOfRangeException()); - } - return m_points[idx].m_point; - } - - public override BaseEditHelper GetEditHelper() - { - return new EditHelper(this); - } - } - - public class BezierSplineComponent : MonoBehaviour - { - [SerializeField] - private BezierSpline m_spline = new BezierSpline(); - - private int m_buildnum = -1; - private Vector3[] m_drawcache; - - public BezierSpline Spline - { - get { return m_spline; } - } - - void OnDrawGizmosSelected() - { - DrawGizmos(Color.red); - } - - void OnDrawGizmos() - { - DrawGizmos(Color.white); - } - - void DrawGizmos(Color color) - { - int curbuild = m_spline.BuildNum; - if (m_spline.GetSegmentCount() > 0) - { - if (m_buildnum != curbuild) - { - m_drawcache = m_spline.GenerateDrawPoints(16); - m_buildnum = curbuild; - } - - if (m_drawcache != null) - { - Gizmos.matrix = transform.localToWorldMatrix; - Gizmos.color = color; - - Vector3 startpos = Vector3.zero, endpos = Vector3.zero; - - for (int i = 0; i < m_drawcache.Length; ++i) - { - endpos = m_drawcache[i]; - if (i != 0) - { - Gizmos.DrawLine(startpos, endpos); - } - startpos = endpos; - } - } - } - } - } -} \ No newline at end of file diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/SplineEditor/Scripts/BezierSplineComponent.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/SplineEditor/Scripts/BezierSplineComponent.cs.meta deleted file mode 100644 index b47c1af..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/SplineEditor/Scripts/BezierSplineComponent.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 21feb0ecbabf1854fa8aa9617d963310 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/SplineEditor/Scripts/BezierSplinePartialTest.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/SplineEditor/Scripts/BezierSplinePartialTest.cs deleted file mode 100644 index 7f0524f..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/SplineEditor/Scripts/BezierSplinePartialTest.cs +++ /dev/null @@ -1,28 +0,0 @@ -using UnityEngine; -using System.Collections; -using uc.Spline; - -public class BezierSplinePartialTest : MonoBehaviour -{ - public BezierSplineComponent m_spline; - public float m_speed = 1; - public Vector3 m_up = Vector3.up; - private BaseSpline.SplineIterator m_iter; - - void Awake() - { - //m_iter = m_spline.Spline.GetPartialReverseIterator(0, 1); - m_iter = m_spline.Spline.GetPartialIterator(0, 1); - m_iter.SetTransform(m_spline.transform); - } - - void Update() - { - m_iter.Iterate(m_speed * Time.deltaTime); - - Vector3 prevpos = transform.position; - - transform.position = m_iter.GetPosition(); - transform.rotation = Quaternion.LookRotation(m_iter.GetTangent(), m_up); - } -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/SplineEditor/Scripts/BezierSplinePartialTest.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/SplineEditor/Scripts/BezierSplinePartialTest.cs.meta deleted file mode 100644 index d52bfc2..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/SplineEditor/Scripts/BezierSplinePartialTest.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 27e23ea2e28e74a4dae60e8f39da542e -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/SplineEditor/Scripts/BezierSplineTest.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/SplineEditor/Scripts/BezierSplineTest.cs deleted file mode 100644 index a870c9a..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/SplineEditor/Scripts/BezierSplineTest.cs +++ /dev/null @@ -1,37 +0,0 @@ -using UnityEngine; -using System.Collections; -using uc.Spline; - -public class BezierSplineTest : MonoBehaviour -{ - public BezierSplineComponent m_spline; - public float m_speed = 1, m_curspeed = 0 ,m_position = 0; - public Vector3 m_up = Vector3.up; - private BaseSpline.SplineIterator m_iter; - - void Awake() - { - m_iter = m_spline.Spline.GetIterator(); - m_iter.SetTransform(m_spline.transform); - } - - void Update() - { - m_iter.Iterate(m_speed * Time.deltaTime); - - Vector3 prevpos = transform.position; - - transform.position = m_iter.GetPosition(); - - m_curspeed = (transform.position - prevpos).magnitude / Time.deltaTime; - if(m_iter.GetOffset()>=m_spline.Spline.Length-0.2f) - { - SendMessage("reset_role"); - m_iter.SetOffset(0); - } - - Debug.DrawLine(transform.position, transform.position + m_iter.GetTangent().normalized, Color.red); - Debug.DrawLine(transform.position, transform.position + m_iter.GetNormal().normalized, Color.green); - Debug.DrawLine(transform.position, transform.position + Vector3.Cross(m_iter.GetTangent().normalized, m_iter.GetNormal().normalized).normalized, Color.blue); - } -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/SplineEditor/Scripts/BezierSplineTest.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/SplineEditor/Scripts/BezierSplineTest.cs.meta deleted file mode 100644 index d1eea67..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/SplineEditor/Scripts/BezierSplineTest.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: b911a7bc467d9254aa763f7d71a99ff9 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/SplineEditor/Scripts/Ease.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/SplineEditor/Scripts/Ease.cs deleted file mode 100644 index 531e796..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/SplineEditor/Scripts/Ease.cs +++ /dev/null @@ -1,1175 +0,0 @@ -using UnityEngine; -using System.Collections; - -public static class Ease -{ - [System.Serializable] - public enum Easing - { - Linear, - - InQuad, - OutQuad, - InOutQuad, - OutInQuad, - - InCubic, - OutCubic, - InOutCubic, - OutInCubic, - - InQuart, - OutQuart, - InOutQuart, - OutInQuart, - - InQuint, - OutQuint, - InOutQuint, - OutInQuint, - - InSin, - OutSin, - InOutSin, - OutInSin, - - InExp, - OutExp, - InOutExp, - OutInExp, - - InCirc, - OutCirc, - InOutCirc, - OutInCirc, - - InElastic, - OutElastic, - InOutElastic, - OutInElastic, - - InBounce, - OutBounce, - InOutBounce, - OutInBounce, - - InBack, - OutBack, - InOutBack, - OutInBack - } - - public static float EaseByType(Easing e, float start, float end, float t) - { - switch(e) - { - case Easing.Linear: return Linear(start, end, t); - - case Easing.InQuad: return InQuad(start, end, t); - case Easing.OutQuad: return OutQuad(start, end, t); - case Easing.InOutQuad: return InOutQuad(start, end, t); - case Easing.OutInQuad: return OutInQuad(start, end, t); - - case Easing.InCubic: return InCubic(start, end, t); - case Easing.OutCubic: return OutCubic(start, end, t); - case Easing.InOutCubic: return InOutCubic(start, end, t); - case Easing.OutInCubic: return OutInCubic(start, end, t); - - case Easing.InQuart: return InQuart(start, end, t); - case Easing.OutQuart: return OutQuart(start, end, t); - case Easing.InOutQuart: return InOutQuart(start, end, t); - case Easing.OutInQuart: return OutInQuart(start, end, t); - - case Easing.InQuint: return InQuint(start, end, t); - case Easing.OutQuint: return OutQuint(start, end, t); - case Easing.InOutQuint: return InOutQuint(start, end, t); - case Easing.OutInQuint: return OutInQuint(start, end, t); - - case Easing.InSin: return InSin(start, end, t); - case Easing.OutSin: return OutSin(start, end, t); - case Easing.InOutSin: return InOutSin(start, end, t); - case Easing.OutInSin: return OutInSin(start, end, t); - - case Easing.InExp: return InExp(start, end, t); - case Easing.OutExp: return OutExp(start, end, t); - case Easing.InOutExp: return InOutExp(start, end, t); - case Easing.OutInExp: return OutInExp(start, end, t); - - case Easing.InCirc: return InCirc(start, end, t); - case Easing.OutCirc: return OutCirc(start, end, t); - case Easing.InOutCirc: return InOutCirc(start, end, t); - case Easing.OutInCirc: return OutInCirc(start, end, t); - - case Easing.InElastic: return InElastic(start, end, t); - case Easing.OutElastic: return OutElastic(start, end, t); - case Easing.InOutElastic: return InOutElastic(start, end, t); - case Easing.OutInElastic: return OutInElastic(start, end, t); - - case Easing.InBounce: return InBounce(start, end, t); - case Easing.OutBounce: return OutBounce(start, end, t); - case Easing.InOutBounce: return InOutBounce(start, end, t); - case Easing.OutInBounce: return OutInBounce(start, end, t); - - case Easing.InBack: return InBack(start, end, t); - case Easing.OutBack: return OutBack(start, end, t); - case Easing.InOutBack: return InOutBack(start, end, t); - case Easing.OutInBack: return OutInBack(start, end, t); - - default: return 0; - } - } - - public static float Linear(float start, float end, float t) - { - return t * (end - start) + start; - } - - public static float InQuad(float start, float end, float t) - { - return t * t * (end - start) + start; - } - - public static float OutQuad(float start, float end, float t) - { - return - (t * (t - 2)) * (end - start) + start; - } - - public static float InOutQuad(float start, float end, float t) - { - t *= 2; - if(t < 1) - { - return 0.5f * t * t * (end - start) + start; - } - else - { - --t; - return -0.5f * (t * (t - 2) - 1) * (end - start) + start; - } - } - - public static float OutInQuad(float start, float end, float t) - { - t *= 2; - if(t < 1) - { - return (-0.5f * (t * (t - 2) - 1) - 0.5f) * (end - start) + start; - } - else - { - --t; - return (0.5f * t * t + 0.5f) * (end - start) + start; - } - } - - public static float InCubic(float start, float end, float t) - { - return t * t * t * (end - start) + start; - } - - public static float OutCubic(float start, float end, float t) - { - --t; - return (t * t * t + 1) * (end - start) + start; - } - - public static float InOutCubic(float start, float end, float t) - { - t *= 2; - if(t < 1) - { - return 0.5f * t * t * t * (end - start) + start; - } - else - { - t-= 2; - return 0.5f * (t * t * t + 2) * (end - start) + start; - } - } - - public static float OutInCubic(float start, float end, float t) - { - t *= 2; - if(t < 1) - { - --t; - return (0.5f * (t * t * t + 2) - 0.5f) * (end - start) + start; - } - else - { - --t; - return (0.5f * t * t * t + 0.5f) * (end - start) + start; - } - } - - public static float InQuart(float start, float end, float t) - { - return t * t * t * t * (end - start) + start; - } - - public static float OutQuart(float start, float end, float t) - { - --t; - return -(t * t * t * t - 1) * (end - start) + start; - } - - public static float InOutQuart(float start, float end, float t) - { - t *= 2; - if(t < 1) - { - return 0.5f * t * t * t * t * (end - start) + start; - } - else - { - t -= 2; - return -0.5f * (t * t * t * t - 2) * (end - start) + start; - } - } - - public static float OutInQuart(float start, float end, float t) - { - t *= 2; - if(t < 1) - { - --t; - return (-0.5f * t * t * t * t + 0.5f) * (end - start) + start; - } - else - { - --t; - return (0.5f * t * t * t * t + 0.5f) * (end - start) + start; - } - } - - public static float InQuint(float start, float end, float t) - { - return t * t * t * t * t * (end - start) + start; - } - - public static float OutQuint(float start, float end, float t) - { - --t; - return (t * t * t * t * t + 1) * (end - start) + start; - } - - public static float InOutQuint(float start, float end, float t) - { - t *= 2; - if(t < 1) - { - return (0.5f * t * t * t * t * t) * (end - start) + start; - } - else - { - t -= 2; - return (0.5f * t * t * t * t * t + 1) * (end - start) + start; - } - } - - public static float OutInQuint(float start, float end, float t) - { - t *= 2; - if(t < 1) - { - --t; - return (0.5f * (t * t * t * t * t) + 0.5f) * (end - start) + start; - } - else - { - --t; - return (0.5f * t * t * t * t * t + 0.5f) * (end - start) + start; - } - } - - public static float InSin(float start, float end, float t) - { - return -Mathf.Cos(t * Mathf.PI * 0.5f) * (end - start) + end; - } - - public static float OutSin(float start, float end, float t) - { - return Mathf.Sin(t * Mathf.PI * 0.5f) * (end - start) + start; - } - - public static float InOutSin(float start, float end, float t) - { - return (-0.5f * Mathf.Cos(t * Mathf.PI) + 0.5f) * (end - start) + start; - } - - public static float OutInSin(float start, float end, float t) - { - return (t - (-0.5f * Mathf.Cos(t * Mathf.PI) + 0.5f - t)) * (end - start) + start; - } - - public static float InExp(float start, float end, float t) - { - return Mathf.Pow(2, 10 * (t - 1)) * (end - start) + start; - } - - public static float OutExp(float start, float end, float t) - { - return (1 - Mathf.Pow(2, -10 * t)) * (end - start) + start; - } - - public static float InOutExp(float start, float end, float t) - { - t *= 2; - if(t < 1) - { - return 0.5f * Mathf.Pow(2, 10 * (t - 1)) * (end - start) + start; - } - else - { - --t; - return 0.5f * (2 - Mathf.Pow(2, -10 * t)) * (end - start) + start; - } - } - - public static float OutInExp(float start, float end, float t) - { - t *= 2; - if(t < 1) - { - return (0.5f * (2 - Mathf.Pow(2, -10 * t)) - 0.5f) * (end - start) + start; - } - else - { - --t; - return (0.5f * Mathf.Pow(2, 10 * (t - 1)) + 0.5f) * (end - start) + start; - } - } - - public static float InCirc(float start, float end, float t) - { - return -(Mathf.Sqrt(1 - t * t) - 1) * (end - start) + start; - } - - public static float OutCirc(float start, float end, float t) - { - --t; - return Mathf.Sqrt(1 - t * t) * (end - start) + start; - } - - public static float InOutCirc(float start, float end, float t) - { - t *= 2; - if(t < 1) - { - return (-0.5f * (Mathf.Sqrt(1 - t * t) - 1)) * (end - start) + start; - } - else - { - t -= 2; - return (0.5f * (Mathf.Sqrt(1 - t * t) + 1)) * (end - start) + start; - } - } - - public static float OutInCirc(float start, float end, float t) - { - t *= 2; - if(t < 1) - { - --t; - return (0.5f * Mathf.Sqrt(1 - t * t)) * (end - start) + start; - } - else - { - --t; - return (-0.5f * Mathf.Sqrt(1 - t * t) + 1) * (end - start) + start; - } - } - - public static float InElastic(float start, float end, float t) - { - float p = 0.3f, s = 0.075f; - --t; - return (-Mathf.Pow(2, 10 * t) * Mathf.Sin((t - s) * (2 * Mathf.PI) / p)) * (end - start) + start; - } - - public static float OutElastic(float start, float end, float t) - { - float p = 0.3f, s = 0.075f; - return (Mathf.Pow(2, -10 * t) * Mathf.Sin((t - s) * (2 * Mathf.PI) / p)) * (end - start) + end; - } - - public static float InOutElastic(float start, float end, float t) - { - float p = 0.3f, s = 0.075f; - t *= 2; - if(t < 1) - { - --t; - return (-0.5f * Mathf.Pow(2, 10 * t) * Mathf.Sin((t - s) * (2 * Mathf.PI) / p)) * (end - start) + start; - } - else - { - --t; - return (0.5f * Mathf.Pow(2, -10 * t) * Mathf.Sin((t - s) * (2 * Mathf.PI) / p)) * (end - start) + end; - } - } - - public static float OutInElastic(float start, float end, float t) - { - float p = 0.3f, s = 0.075f; - t *= 2; - if(t < 1) - { - return (0.5f * Mathf.Pow(2, -10 * t) * Mathf.Sin((t - s) * (2 * Mathf.PI) / p) - 0.5f) * (end - start) + end; - } - else - { - t -= 2; - return (-0.5f *Mathf.Pow(2, 10 * t) * Mathf.Sin((t - s) * (2 * Mathf.PI) / p) + 0.5f) * (end - start) + start; - } - } - - public static float InBounce(float start, float end, float t) - { - - t = 1 - t; - if(t < 1 / 2.75f) - { - return (-7.5625f * t * t + 1) * (end - start) + start; - } - else if(t < 2.0f / 2.75f) - { - t -= 1.5f / 2.75f; - return (-7.5625f * t * t - 0.75f + 1) * (end - start) + start; - } - else if (t < 2.5f / 2.75f) - { - t -= 2.25f / 2.75f; - return (-7.5625f * t * t - 0.9375f + 1) * (end - start) + start; - } - else - { - t -= 2.625f / 2.75f; - return (-7.5625f * t * t - 0.984375f + 1) * (end - start) + start; - } - } - - public static float OutBounce(float start, float end, float t) - { - - if(t < 1 / 2.75f) - { - return (7.5625f * t * t) * (end - start) + start; - } - else if(t < 2.0f / 2.75f) - { - t -= 1.5f / 2.75f; - return (7.5625f * t * t + 0.75f) * (end - start) + start; - } - else if (t < 2.5f / 2.75f) - { - t -= 2.25f / 2.75f; - return (7.5625f * t * t + 0.9375f) * (end - start) + start; - } - else - { - t -= 2.625f / 2.75f; - return (7.5625f * t * t + 0.984375f) * (end - start) + start; - } - } - - public static float InOutBounce(float start, float end, float t) - { - - t *= 2; - if(t < 1) - { - t = 1 - t; - if(t < 1 / 2.75f) - { - return (-0.5f * 7.5625f * t * t + 0.5f) * (end - start) + start; - } - else if(t < 2.0f / 2.75f) - { - t -= 1.5f / 2.75f; - return (-0.5f * (7.5625f * t * t + 0.75f) + 0.5f) * (end - start) + start; - } - else if (t < 2.5f / 2.75f) - { - t -= 2.25f / 2.75f; - return (-0.5f * (7.5625f * t * t + 0.9375f) + 0.5f) * (end - start) + start; - } - else - { - t -= 2.625f / 2.75f; - return (-0.5f * (7.5625f * t * t + 0.984375f) + 0.5f) * (end - start) + start; - } - } - else - { - --t; - if(t < 1 / 2.75f) - { - return (0.5f * 7.5625f * t * t + 0.5f) * (end - start) + start; - } - else if(t < 2.0f / 2.75f) - { - t -= 1.5f / 2.75f; - return (0.5f * (7.5625f * t * t + 0.75f) + 0.5f) * (end - start) + start; - } - else if (t < 2.5f / 2.75f) - { - t -= 2.25f / 2.75f; - return (0.5f * (7.5625f * t * t + 0.9375f) + 0.5f) * (end - start) + start; - } - else - { - t -= 2.625f / 2.75f; - return (0.5f * (7.5625f * t * t + 0.984375f) + 0.5f) * (end - start) + start; - } - } - } - - public static float OutInBounce(float start, float end, float t) - { - - t *= 2; - if(t < 1) - { - if(t < 1 / 2.75f) - { - return (0.5f * 7.5625f * t * t ) * (end - start) + start; - } - else if(t < 2.0f / 2.75f) - { - t -= 1.5f / 2.75f; - return (0.5f * (7.5625f * t * t + 0.75f)) * (end - start) + start; - } - else if (t < 2.5f / 2.75f) - { - t -= 2.25f / 2.75f; - return (0.5f * (7.5625f * t * t + 0.9375f)) * (end - start) + start; - } - else - { - t -= 2.625f / 2.75f; - return (0.5f * (7.5625f * t * t + 0.984375f)) * (end - start) + start; - } - } - else - { - t = 2 - t; - if(t < 1 / 2.75f) - { - return (-0.5f * 7.5625f * t * t + 1) * (end - start) + start; - } - else if(t < 2.0f / 2.75f) - { - t -= 1.5f / 2.75f; - return (-0.5f * (7.5625f * t * t + 0.75f) + 1) * (end - start) + start; - } - else if (t < 2.5f / 2.75f) - { - t -= 2.25f / 2.75f; - return (-0.5f * (7.5625f * t * t + 0.9375f) + 1) * (end - start) + start; - } - else - { - t -= 2.625f / 2.75f; - return (-0.5f * (7.5625f * t * t + 0.984375f) + 1) * (end - start) + start; - } - } - } - - public static float InBack(float start, float end, float t) - { - return t * t * (2.70158f * t - 1.70158f) * (end - start) + start; - } - - public static float OutBack(float start, float end, float t) - { - --t; - return (1 - t * t * (-2.70158f * t - 1.70158f)) * (end - start) + start; - } - - public static float InOutBack(float start, float end, float t) - { - t *= 2; - if(t < 1) - { - return (0.5f * t * t * (2.70158f * t - 1.70158f)) * (end - start) + start; - } - else - { - t -= 2; - return (1 - 0.5f * t * t * (-2.70158f * t - 1.70158f)) * (end - start) + start; - } - } - - public static float OutInBack(float start, float end, float t) - { - t *= 2; - if(t < 1) - { - --t; - return (0.5f -0.5f * t * t * (-2.70158f * t - 1.70158f)) * (end - start) + start; - } - else - { - --t; - return (0.5f * t * t * (2.70158f * t - 1.70158f) + 0.5f) * (end - start) + start; - } - } - - public static Vector3 EaseByType(Easing e, Vector3 start, Vector3 end, float t) - { - switch(e) - { - case Easing.Linear: return Linear(start, end, t); - - case Easing.InQuad: return InQuad(start, end, t); - case Easing.OutQuad: return OutQuad(start, end, t); - case Easing.InOutQuad: return InOutQuad(start, end, t); - case Easing.OutInQuad: return OutInQuad(start, end, t); - - case Easing.InCubic: return InCubic(start, end, t); - case Easing.OutCubic: return OutCubic(start, end, t); - case Easing.InOutCubic: return InOutCubic(start, end, t); - case Easing.OutInCubic: return OutInCubic(start, end, t); - - case Easing.InQuart: return InQuart(start, end, t); - case Easing.OutQuart: return OutQuart(start, end, t); - case Easing.InOutQuart: return InOutQuart(start, end, t); - case Easing.OutInQuart: return OutInQuart(start, end, t); - - case Easing.InQuint: return InQuint(start, end, t); - case Easing.OutQuint: return OutQuint(start, end, t); - case Easing.InOutQuint: return InOutQuint(start, end, t); - case Easing.OutInQuint: return OutInQuint(start, end, t); - - case Easing.InSin: return InSin(start, end, t); - case Easing.OutSin: return OutSin(start, end, t); - case Easing.InOutSin: return InOutSin(start, end, t); - case Easing.OutInSin: return OutInSin(start, end, t); - - case Easing.InExp: return InExp(start, end, t); - case Easing.OutExp: return OutExp(start, end, t); - case Easing.InOutExp: return InOutExp(start, end, t); - case Easing.OutInExp: return OutInExp(start, end, t); - - case Easing.InCirc: return InCirc(start, end, t); - case Easing.OutCirc: return OutCirc(start, end, t); - case Easing.InOutCirc: return InOutCirc(start, end, t); - case Easing.OutInCirc: return OutInCirc(start, end, t); - - case Easing.InElastic: return InElastic(start, end, t); - case Easing.OutElastic: return OutElastic(start, end, t); - case Easing.InOutElastic: return InOutElastic(start, end, t); - case Easing.OutInElastic: return OutInElastic(start, end, t); - - case Easing.InBounce: return InBounce(start, end, t); - case Easing.OutBounce: return OutBounce(start, end, t); - case Easing.InOutBounce: return InOutBounce(start, end, t); - case Easing.OutInBounce: return OutInBounce(start, end, t); - - case Easing.InBack: return InBack(start, end, t); - case Easing.OutBack: return OutBack(start, end, t); - case Easing.InOutBack: return InOutBack(start, end, t); - case Easing.OutInBack: return OutInBack(start, end, t); - - default: return Vector3.zero; - } - } - - public static Vector3 Linear(Vector3 start, Vector3 end, float t) - { - return t * (end - start) + start; - } - - public static Vector3 InQuad(Vector3 start, Vector3 end, float t) - { - return t * t * (end - start) + start; - } - - public static Vector3 OutQuad(Vector3 start, Vector3 end, float t) - { - return - (t * (t - 2)) * (end - start) + start; - } - - public static Vector3 InOutQuad(Vector3 start, Vector3 end, float t) - { - t *= 2; - if(t < 1) - { - return 0.5f * t * t * (end - start) + start; - } - else - { - --t; - return -0.5f * (t * (t - 2) - 1) * (end - start) + start; - } - } - - public static Vector3 OutInQuad(Vector3 start, Vector3 end, float t) - { - t *= 2; - if(t < 1) - { - return (-0.5f * (t * (t - 2) - 1) - 0.5f) * (end - start) + start; - } - else - { - --t; - return (0.5f * t * t + 0.5f) * (end - start) + start; - } - } - - public static Vector3 InCubic(Vector3 start, Vector3 end, float t) - { - return t * t * t * (end - start) + start; - } - - public static Vector3 OutCubic(Vector3 start, Vector3 end, float t) - { - --t; - return (t * t * t + 1) * (end - start) + start; - } - - public static Vector3 InOutCubic(Vector3 start, Vector3 end, float t) - { - t *= 2; - if(t < 1) - { - return 0.5f * t * t * t * (end - start) + start; - } - else - { - t-= 2; - return 0.5f * (t * t * t + 2) * (end - start) + start; - } - } - - public static Vector3 OutInCubic(Vector3 start, Vector3 end, float t) - { - t *= 2; - if(t < 1) - { - --t; - return (0.5f * (t * t * t + 2) - 0.5f) * (end - start) + start; - } - else - { - --t; - return (0.5f * t * t * t + 0.5f) * (end - start) + start; - } - } - - public static Vector3 InQuart(Vector3 start, Vector3 end, float t) - { - return t * t * t * t * (end - start) + start; - } - - public static Vector3 OutQuart(Vector3 start, Vector3 end, float t) - { - --t; - return -(t * t * t * t - 1) * (end - start) + start; - } - - public static Vector3 InOutQuart(Vector3 start, Vector3 end, float t) - { - t *= 2; - if(t < 1) - { - return 0.5f * t * t * t * t * (end - start) + start; - } - else - { - t -= 2; - return -0.5f * (t * t * t * t - 2) * (end - start) + start; - } - } - - public static Vector3 OutInQuart(Vector3 start, Vector3 end, float t) - { - t *= 2; - if(t < 1) - { - --t; - return (-0.5f * t * t * t * t + 0.5f) * (end - start) + start; - } - else - { - --t; - return (0.5f * t * t * t * t + 0.5f) * (end - start) + start; - } - } - - public static Vector3 InQuint(Vector3 start, Vector3 end, float t) - { - return t * t * t * t * t * (end - start) + start; - } - - public static Vector3 OutQuint(Vector3 start, Vector3 end, float t) - { - --t; - return (t * t * t * t * t + 1) * (end - start) + start; - } - - public static Vector3 InOutQuint(Vector3 start, Vector3 end, float t) - { - t *= 2; - if(t < 1) - { - return (0.5f * t * t * t * t * t) * (end - start) + start; - } - else - { - t -= 2; - return (0.5f * t * t * t * t * t + 1) * (end - start) + start; - } - } - - public static Vector3 OutInQuint(Vector3 start, Vector3 end, float t) - { - t *= 2; - if(t < 1) - { - --t; - return (0.5f * (t * t * t * t * t) + 0.5f) * (end - start) + start; - } - else - { - --t; - return (0.5f * t * t * t * t * t + 0.5f) * (end - start) + start; - } - } - - public static Vector3 InSin(Vector3 start, Vector3 end, float t) - { - return -Mathf.Cos(t * Mathf.PI * 0.5f) * (end - start) + end; - } - - public static Vector3 OutSin(Vector3 start, Vector3 end, float t) - { - return Mathf.Sin(t * Mathf.PI * 0.5f) * (end - start) + start; - } - - public static Vector3 InOutSin(Vector3 start, Vector3 end, float t) - { - return (-0.5f * Mathf.Cos(t * Mathf.PI) + 0.5f) * (end - start) + start; - } - - public static Vector3 OutInSin(Vector3 start, Vector3 end, float t) - { - return (t - (-0.5f * Mathf.Cos(t * Mathf.PI) + 0.5f - t)) * (end - start) + start; - } - - public static Vector3 InExp(Vector3 start, Vector3 end, float t) - { - return Mathf.Pow(2, 10 * (t - 1)) * (end - start) + start; - } - - public static Vector3 OutExp(Vector3 start, Vector3 end, float t) - { - return (1 - Mathf.Pow(2, -10 * t)) * (end - start) + start; - } - - public static Vector3 InOutExp(Vector3 start, Vector3 end, float t) - { - t *= 2; - if(t < 1) - { - return 0.5f * Mathf.Pow(2, 10 * (t - 1)) * (end - start) + start; - } - else - { - --t; - return 0.5f * (2 - Mathf.Pow(2, -10 * t)) * (end - start) + start; - } - } - - public static Vector3 OutInExp(Vector3 start, Vector3 end, float t) - { - t *= 2; - if(t < 1) - { - return (0.5f * (2 - Mathf.Pow(2, -10 * t)) - 0.5f) * (end - start) + start; - } - else - { - --t; - return (0.5f * Mathf.Pow(2, 10 * (t - 1)) + 0.5f) * (end - start) + start; - } - } - - public static Vector3 InCirc(Vector3 start, Vector3 end, float t) - { - return -(Mathf.Sqrt(1 - t * t) - 1) * (end - start) + start; - } - - public static Vector3 OutCirc(Vector3 start, Vector3 end, float t) - { - --t; - return Mathf.Sqrt(1 - t * t) * (end - start) + start; - } - - public static Vector3 InOutCirc(Vector3 start, Vector3 end, float t) - { - t *= 2; - if(t < 1) - { - return (-0.5f * (Mathf.Sqrt(1 - t * t) - 1)) * (end - start) + start; - } - else - { - t -= 2; - return (0.5f * (Mathf.Sqrt(1 - t * t) + 1)) * (end - start) + start; - } - } - - public static Vector3 OutInCirc(Vector3 start, Vector3 end, float t) - { - t *= 2; - if(t < 1) - { - --t; - return (0.5f * Mathf.Sqrt(1 - t * t)) * (end - start) + start; - } - else - { - --t; - return (-0.5f * Mathf.Sqrt(1 - t * t) + 1) * (end - start) + start; - } - } - - public static Vector3 InElastic(Vector3 start, Vector3 end, float t) - { - float p = 0.3f, s = 0.075f; - --t; - return (-Mathf.Pow(2, 10 * t) * Mathf.Sin((t - s) * (2 * Mathf.PI) / p)) * (end - start) + start; - } - - public static Vector3 OutElastic(Vector3 start, Vector3 end, float t) - { - float p = 0.3f, s = 0.075f; - return (Mathf.Pow(2, -10 * t) * Mathf.Sin((t - s) * (2 * Mathf.PI) / p)) * (end - start) + end; - } - - public static Vector3 InOutElastic(Vector3 start, Vector3 end, float t) - { - float p = 0.3f, s = 0.075f; - t *= 2; - if(t < 1) - { - --t; - return (-0.5f * Mathf.Pow(2, 10 * t) * Mathf.Sin((t - s) * (2 * Mathf.PI) / p)) * (end - start) + start; - } - else - { - --t; - return (0.5f * Mathf.Pow(2, -10 * t) * Mathf.Sin((t - s) * (2 * Mathf.PI) / p)) * (end - start) + end; - } - } - - public static Vector3 OutInElastic(Vector3 start, Vector3 end, float t) - { - float p = 0.3f, s = 0.075f; - t *= 2; - if(t < 1) - { - return (0.5f * Mathf.Pow(2, -10 * t) * Mathf.Sin((t - s) * (2 * Mathf.PI) / p) - 0.5f) * (end - start) + end; - } - else - { - t -= 2; - return (-0.5f *Mathf.Pow(2, 10 * t) * Mathf.Sin((t - s) * (2 * Mathf.PI) / p) + 0.5f) * (end - start) + start; - } - } - - public static Vector3 InBounce(Vector3 start, Vector3 end, float t) - { - - t = 1 - t; - if(t < 1 / 2.75f) - { - return (-7.5625f * t * t + 1) * (end - start) + start; - } - else if(t < 2.0f / 2.75f) - { - t -= 1.5f / 2.75f; - return (-7.5625f * t * t - 0.75f + 1) * (end - start) + start; - } - else if (t < 2.5f / 2.75f) - { - t -= 2.25f / 2.75f; - return (-7.5625f * t * t - 0.9375f + 1) * (end - start) + start; - } - else - { - t -= 2.625f / 2.75f; - return (-7.5625f * t * t - 0.984375f + 1) * (end - start) + start; - } - } - - public static Vector3 OutBounce(Vector3 start, Vector3 end, float t) - { - - if(t < 1 / 2.75f) - { - return (7.5625f * t * t) * (end - start) + start; - } - else if(t < 2.0f / 2.75f) - { - t -= 1.5f / 2.75f; - return (7.5625f * t * t + 0.75f) * (end - start) + start; - } - else if (t < 2.5f / 2.75f) - { - t -= 2.25f / 2.75f; - return (7.5625f * t * t + 0.9375f) * (end - start) + start; - } - else - { - t -= 2.625f / 2.75f; - return (7.5625f * t * t + 0.984375f) * (end - start) + start; - } - } - - public static Vector3 InOutBounce(Vector3 start, Vector3 end, float t) - { - - t *= 2; - if(t < 1) - { - t = 1 - t; - if(t < 1 / 2.75f) - { - return (-0.5f * 7.5625f * t * t + 0.5f) * (end - start) + start; - } - else if(t < 2.0f / 2.75f) - { - t -= 1.5f / 2.75f; - return (-0.5f * (7.5625f * t * t + 0.75f) + 0.5f) * (end - start) + start; - } - else if (t < 2.5f / 2.75f) - { - t -= 2.25f / 2.75f; - return (-0.5f * (7.5625f * t * t + 0.9375f) + 0.5f) * (end - start) + start; - } - else - { - t -= 2.625f / 2.75f; - return (-0.5f * (7.5625f * t * t + 0.984375f) + 0.5f) * (end - start) + start; - } - } - else - { - --t; - if(t < 1 / 2.75f) - { - return (0.5f * 7.5625f * t * t + 0.5f) * (end - start) + start; - } - else if(t < 2.0f / 2.75f) - { - t -= 1.5f / 2.75f; - return (0.5f * (7.5625f * t * t + 0.75f) + 0.5f) * (end - start) + start; - } - else if (t < 2.5f / 2.75f) - { - t -= 2.25f / 2.75f; - return (0.5f * (7.5625f * t * t + 0.9375f) + 0.5f) * (end - start) + start; - } - else - { - t -= 2.625f / 2.75f; - return (0.5f * (7.5625f * t * t + 0.984375f) + 0.5f) * (end - start) + start; - } - } - } - - public static Vector3 OutInBounce(Vector3 start, Vector3 end, float t) - { - - t *= 2; - if(t < 1) - { - if(t < 1 / 2.75f) - { - return (0.5f * 7.5625f * t * t ) * (end - start) + start; - } - else if(t < 2.0f / 2.75f) - { - t -= 1.5f / 2.75f; - return (0.5f * (7.5625f * t * t + 0.75f)) * (end - start) + start; - } - else if (t < 2.5f / 2.75f) - { - t -= 2.25f / 2.75f; - return (0.5f * (7.5625f * t * t + 0.9375f)) * (end - start) + start; - } - else - { - t -= 2.625f / 2.75f; - return (0.5f * (7.5625f * t * t + 0.984375f)) * (end - start) + start; - } - } - else - { - t = 2 - t; - if(t < 1 / 2.75f) - { - return (-0.5f * 7.5625f * t * t + 1) * (end - start) + start; - } - else if(t < 2.0f / 2.75f) - { - t -= 1.5f / 2.75f; - return (-0.5f * (7.5625f * t * t + 0.75f) + 1) * (end - start) + start; - } - else if (t < 2.5f / 2.75f) - { - t -= 2.25f / 2.75f; - return (-0.5f * (7.5625f * t * t + 0.9375f) + 1) * (end - start) + start; - } - else - { - t -= 2.625f / 2.75f; - return (-0.5f * (7.5625f * t * t + 0.984375f) + 1) * (end - start) + start; - } - } - } - - public static Vector3 InBack(Vector3 start, Vector3 end, float t) - { - return t * t * (2.70158f * t - 1.70158f) * (end - start) + start; - } - - public static Vector3 OutBack(Vector3 start, Vector3 end, float t) - { - --t; - return (1 - t * t * (-2.70158f * t - 1.70158f)) * (end - start) + start; - } - - public static Vector3 InOutBack(Vector3 start, Vector3 end, float t) - { - t *= 2; - if(t < 1) - { - return (0.5f * t * t * (2.70158f * t - 1.70158f)) * (end - start) + start; - } - else - { - t -= 2; - return (1 - 0.5f * t * t * (-2.70158f * t - 1.70158f)) * (end - start) + start; - } - } - - public static Vector3 OutInBack(Vector3 start, Vector3 end, float t) - { - t *= 2; - if(t < 1) - { - --t; - return (0.5f -0.5f * t * t * (-2.70158f * t - 1.70158f)) * (end - start) + start; - } - else - { - --t; - return (0.5f * t * t * (2.70158f * t - 1.70158f) + 0.5f) * (end - start) + start; - } - } -} \ No newline at end of file diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/SplineEditor/Scripts/Ease.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/SplineEditor/Scripts/Ease.cs.meta deleted file mode 100644 index d430894..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/SplineEditor/Scripts/Ease.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 1fe61ea27a023d24fb096f1049432aa8 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/SplineEditor/Scripts/UniSplineComponent.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/SplineEditor/Scripts/UniSplineComponent.cs deleted file mode 100644 index 20b5ee0..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/SplineEditor/Scripts/UniSplineComponent.cs +++ /dev/null @@ -1,503 +0,0 @@ -using UnityEngine; -using System; -using System.Collections; -using System.Collections.Generic; -namespace uc.Spline -{ - [Serializable] - public class UniSpline : BaseSpline - { - public class EditHelper : BaseEditHelper - { - protected new UniSpline m_spline; - internal EditHelper(UniSpline spline) : base(spline) { this.m_spline = spline; } - - public override void AppendPoint() - { - Vector3 newPos = Vector3.zero; - if (m_spline.PointCount == 1) - { - newPos = m_spline.GetPointPosition(m_spline.m_points.Count - 1)+ Vector3.right; - } - else if (m_spline.PointCount > 1) - { - newPos = m_spline.GetPointPosition(m_spline.m_points.Count - 1) * 2 - m_spline.GetPointPosition(m_spline.m_points.Count - 2); - } - BaseSplinePoint p = new BaseSplinePoint(newPos); - m_spline.AppendPoint(p); - m_selidx = m_spline.PointCount - 1; - } - - public override void InsertBefore() - { - if (m_spline.PointCount == 1) - { - m_spline.InsertPoint(0, new BaseSplinePoint(m_spline.GetPointPosition(m_spline.PointCount - 1)+ Vector3.left)); - } - else - { - int previdx = m_selidx; - m_selidx = (int)Mathf.Repeat(m_selidx - 1, m_spline.PointCount - 1); - m_spline.InsertPoint(previdx, new BaseSplinePoint((m_spline.GetPointPosition(m_selidx) + m_spline.GetPointPosition(previdx)) * 0.5f)); - m_selidx = previdx; - } - } - - public override void InsertAfter() - { - if (m_spline.PointCount == 1) - { - AppendPoint(); - } - else - { - int previdx = m_selidx; - m_selidx = (int)Mathf.Repeat(m_selidx + 1, m_spline.PointCount - 1); - m_spline.InsertPoint(m_selidx, new BaseSplinePoint((m_spline.GetPointPosition(m_selidx) + m_spline.GetPointPosition(previdx)) * 0.5f)); - } - } - - public override void Remove() - { - m_spline.m_points.RemoveAt(m_selidx); - m_selidx = (int)Mathf.Repeat(m_selidx, m_spline.PointCount - 1); - } - - public override BaseSplinePoint Point - { - get { return m_spline.m_points[m_idx]; } - set { m_spline.m_points[m_idx] = value; } - } - - public override BaseSplinePoint SelectedPoint - { - get { return m_spline.m_points[m_selidx]; } - set { m_spline.m_points[m_selidx] = value; } - } - - public override void RemoveLastPoint() - { - m_spline.m_points.RemoveAt(m_spline.PointCount - 1); - } - public override void RemoveAllPoints() - { - m_spline.m_points.Clear(); - } - } - - [Serializable] - public class UniSplineSegment : BaseSplineSegment - { - public UniSplineType m_type = UniSplineType.CatmullRom; - internal override Vector3 GetPosition(float t) - { - switch (m_type) - { - case UniSplineType.CatmullRom: - return uc.Math.Spline.CatmullRom.Position(m_startctrl, m_startpos, m_endpos, m_endctrl, t); - case UniSplineType.Hermite: - return uc.Math.Spline.Hermite.Position(m_startctrl, m_startpos, m_endpos, m_endctrl, t); - case UniSplineType.KochanekBartels: - return uc.Math.Spline.KochanekBartels.Position(m_startctrl, m_startpos, m_endpos, m_endctrl, t); - default: return Vector3.zero; - } - } - internal override Vector3 GetTangent(float t) - { - switch (m_type) - { - case UniSplineType.CatmullRom: - return uc.Math.Spline.CatmullRom.Tangent(m_startctrl, m_startpos, m_endpos, m_endctrl, t); - case UniSplineType.Hermite: - return uc.Math.Spline.Hermite.Tangent(m_startctrl, m_startpos, m_endpos, m_endctrl, t); - case UniSplineType.KochanekBartels: - return uc.Math.Spline.KochanekBartels.Tangent(m_startctrl, m_startpos, m_endpos, m_endctrl, t); - default: return Vector3.zero; - } - } - internal override Vector3 GetNormal(float t) - { - switch (m_type) - { - case UniSplineType.CatmullRom: - return uc.Math.Spline.CatmullRom.Normal(m_startctrl, m_startpos, m_endpos, m_endctrl, t); - case UniSplineType.Hermite: - return uc.Math.Spline.Hermite.Normal(m_startctrl, m_startpos, m_endpos, m_endctrl, t); - case UniSplineType.KochanekBartels: - return uc.Math.Spline.KochanekBartels.Normal(m_startctrl, m_startpos, m_endpos, m_endctrl, t); - default: return Vector3.zero; - } - } - } - - [SerializeField] - private List m_points = new List(); - [SerializeField] - private UniSplineSegment[] m_segments = null; - public override int PointCount { get { return m_points.Count; } } - - [SerializeField] - private UniSplineType m_type = UniSplineType.CatmullRom; - [SerializeField] - private float m_bias = 0, m_tension = 0, m_continuity = 0; - - public UniSplineType SplineType - { - get { return m_type; } - set { m_type = value; } - } - - public float Bias - { - get { return m_bias; } - set { m_bias = Mathf.Clamp(value, -1, 1); } - } - - public float Continuity - { - get { return m_continuity; } - set { m_continuity = Mathf.Clamp(value, -1, 1); } - } - - public float Tension - { - get { return m_tension; } - set { m_tension = Mathf.Clamp(value, -1, 1); } - } - - public void ReversePoints() - { - m_points.Reverse(); - } - - public override void Build() - { - int idx, count; - Vector3 spt1 = Vector3.zero, spt2 = Vector3.zero, spt3 = Vector3.zero, spt4 = Vector3.zero; - // - if (m_points.Count < 2) - { - m_segments = null; - m_length = 0; - return; - } - if (m_wrapmode == SplineWrapMode.Loop) - { - count = m_points.Count; - } - else - { - count = m_points.Count - 1; - } - - m_segments = new UniSplineSegment[count]; - m_length = 0; - idx = 0; - if (m_wrapmode == SplineWrapMode.Loop) - { - while (idx < count) - { - spt1 = m_points[(int)Mathf.Repeat(idx, m_points.Count)].m_point; - spt2 = m_points[(int)Mathf.Repeat(idx - 1, m_points.Count)].m_point; - spt3 = m_points[(int)Mathf.Repeat(idx + 2, m_points.Count)].m_point; - spt4 = m_points[(int)Mathf.Repeat(idx + 1, m_points.Count)].m_point; - - m_segments[idx] = new UniSplineSegment(); - (m_segments[idx] as UniSplineSegment).m_type = m_type; - BuildSegment(m_segments[idx] as UniSplineSegment, spt1, spt2, spt3, spt4); - ++idx; - } - } - else - { - while (idx < count) - { - spt1 = m_points[Mathf.Clamp(idx, 0, m_points.Count - 1)].m_point; - spt2 = m_points[Mathf.Clamp(idx - 1, 0, m_points.Count - 1)].m_point; - spt3 = m_points[Mathf.Clamp(idx + 2, 0, m_points.Count - 1)].m_point; - spt4 = m_points[Mathf.Clamp(idx + 1, 0, m_points.Count - 1)].m_point; - - m_segments[idx] = new UniSplineSegment(); - (m_segments[idx] as UniSplineSegment).m_type = m_type; - BuildSegment(m_segments[idx] as UniSplineSegment, spt1, spt2, spt3, spt4); - ++idx; - } - } - - ++m_buildnum; - } - - private void BuildSegment(UniSplineSegment ss, Vector3 sp, Vector3 sc, Vector3 ec, Vector3 ep) - { - ss.m_startpos = sp; - ss.m_endpos = ep; - - switch (m_type) - { - case UniSplineType.CatmullRom: - - ss.m_startctrl = sc; - ss.m_endctrl = ec; - break; - - case UniSplineType.Hermite: - { - float tens = (1 - m_tension) * 0.5f, - coef1 = (1 + m_bias) * tens, - coef2 = (1 - m_bias) * tens; - ss.m_startctrl = (sp - sc) * coef1 + (ep - sp) * coef2; - ss.m_endctrl = (ep - sp) * coef1 + (ec - ep) * coef2; - } - break; - - case UniSplineType.KochanekBartels: - { - float c1 = (1 - m_tension) * (1 + m_bias) * (1 + m_continuity) * 0.5f, - c2 = (1 - m_tension) * (1 - m_bias) * (1 - m_continuity) * 0.5f, - c3 = (1 - m_tension) * (1 + m_bias) * (1 - m_continuity) * 0.5f, - c4 = (1 - m_tension) * (1 - m_bias) * (1 + m_continuity) * 0.5f; - ss.m_startctrl = c1 * (sp - sc) + c2 * (ep - sp); - ss.m_endctrl = c3 * (ep - sp) + c4 * (ec - ep); - } - break; - } - - ss.m_startlen = m_length; - float seglen = GetLength(ss); - m_length += seglen; - ss.m_length = seglen; - ss.m_endlen = m_length; - - switch (m_reparam) - { - case SplineReparamType.None: - ss.m_params = null; - ss.m_precomps = null; - break; - - case SplineReparamType.Simple: - { - m_precompdiv = 1 / (float)m_stepcount; - float param = 0, length = 0; - - Vector3 prev, next; - - ss.m_params = new float[m_stepcount + 1]; - ss.m_precomps = new float[m_stepcount + 1]; - for (int i = 1; i < m_stepcount + 1; ++i) - { - prev = ss.GetPosition(param); - param += m_precompdiv; - next = ss.GetPosition(param); - length += (next - prev).magnitude; - ss.m_precomps[i] = length / seglen; - ss.m_params[i] = param; - } - ss.m_params[0] = 0; - ss.m_params[m_stepcount] = 1; - ss.m_precomps[0] = 0; - ss.m_precomps[m_stepcount] = 1; - m_precompdiv = 1 / (float)m_stepcount; - } - break; - - case SplineReparamType.RungeKutta: - float dlen = seglen / (float)m_stepcount, lparam = 0; - - ss.m_params = new float[m_stepcount + 1]; - ss.m_precomps = new float[m_stepcount + 1]; - for (int i = 0; i < m_stepcount + 1; ++i) - { - ss.m_params[i] = GetReparamRungeKutta(ss, lparam); - ss.m_precomps[i] = lparam / seglen; - lparam += dlen; - } - ss.m_params[0] = 0; - ss.m_params[m_stepcount] = 1; - ss.m_precomps[0] = 0; - ss.m_precomps[m_stepcount] = 1; - m_precompdiv = 1 / (float)m_stepcount; - break; - } - } - - private float GetLength(UniSplineSegment ss) - { - float len = 0; - Vector3 start, end; - float t = 0, dt = 1 / (float)m_stepcount; - int idx = 0; - start = ss.m_startpos; - while (idx < m_stepcount) - { - t += dt; - end = ss.GetPosition(t); - len += (end - start).magnitude; - start = end; - ++idx; - } - return len; - } - - public override int GetPointCount() { return m_points.Count; } - public override int GetSegmentCount() - { - if (m_segments != null) - { - return m_segments.Length; - } - return 0; - } - protected override float GetSegmentLength(int segidx) - { - return m_segments[segidx].m_length; - } - protected override float GetSegmentStartLength(int segidx) - { - return m_segments[segidx].m_startlen; - } - protected override float GetSegmentEndLength(int segidx) - { - return m_segments[segidx].m_endlen; - } - protected override int FindSegment(float offset) - { - for (int i = 0; i < m_segments.Length; ++i) - { - if (m_segments[i].m_startlen <= offset && m_segments[i].m_endlen > offset) - { - return i; - } - } - return m_segments.Length - 1; - } - protected override Vector3 GetDrawPosition(int segidx, float segpos) - { - return m_segments[segidx].GetPosition(segpos); - } - protected override Vector3 GetPosition(int segidx, float segpos) - { - BaseSplineSegment ss = m_segments[segidx]; - if (m_reparam == SplineReparamType.None) - { - return ss.GetPosition(segpos / ss.m_length); - } - else - { - return ss.GetPosition(GetReparam(ss, segpos / ss.m_length)); - } - } - protected override Vector3 GetTangent(int segidx, float segpos) - { - BaseSplineSegment ss = m_segments[segidx]; - if (m_reparam == SplineReparamType.None) - { - return ss.GetTangent(segpos / ss.m_length); - } - else - { - return ss.GetTangent(GetReparam(ss, segpos / ss.m_length)); - } - } - protected override Vector3 GetNormal(int segidx, float segpos) - { - BaseSplineSegment ss = m_segments[segidx]; - if (m_reparam == SplineReparamType.None) - { - return ss.GetNormal(segpos / ss.m_length); - } - else - { - return ss.GetNormal(GetReparam(ss, segpos / ss.m_length)); - } - } - internal override void AppendPoint(BaseSplinePoint p) - { - m_points.Add(p); - } - internal override void InsertPoint(int idx, BaseSplinePoint p) - { - if (idx < 0 || idx > m_points.Count) - { - throw (new IndexOutOfRangeException()); - } - m_points.Insert(idx, p); - } - internal override void RemovePoint(int idx) - { - if (idx < 0 || idx > m_points.Count) - { - throw (new IndexOutOfRangeException()); - } - m_points.RemoveAt(idx); - } - internal override Vector3 GetPointPosition(int idx) - { - if (idx < 0 || idx > m_points.Count) - { - throw (new IndexOutOfRangeException()); - } - return m_points[idx].m_point; - } - - public override BaseEditHelper GetEditHelper() - { - return new EditHelper(this); - } - } - - public class UniSplineComponent : MonoBehaviour - { - [SerializeField] - private UniSpline m_spline = new UniSpline(); - - private int m_buildnum = -1; - private Vector3[] m_drawcache; - - public UniSpline Spline - { - get { return m_spline; } - } - - void OnDrawGizmosSelected() - { - DrawGizmos(Color.red); - } - - void OnDrawGizmos() - { - DrawGizmos(Color.white); - } - - public void DrawGizmos(Color color) - { - int curbuild = m_spline.BuildNum; - if (m_spline.GetSegmentCount() > 0) - { - if (m_buildnum != curbuild) - { - m_drawcache = m_spline.GenerateDrawPoints(16); - m_buildnum = curbuild; - } - - if (m_drawcache != null) - { - Gizmos.matrix = transform.localToWorldMatrix; - Gizmos.color = color; - - Vector3 startpos = Vector3.zero, endpos = Vector3.zero; - - for (int i = 0; i < m_drawcache.Length; ++i) - { - endpos = m_drawcache[i]; - if (i != 0) - { - Gizmos.DrawLine(startpos, endpos); - } - startpos = endpos; - } - } - } - } - } -} \ No newline at end of file diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/SplineEditor/Scripts/UniSplineComponent.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/SplineEditor/Scripts/UniSplineComponent.cs.meta deleted file mode 100644 index 708e20f..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/SplineEditor/Scripts/UniSplineComponent.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 133bc704398cd994a8c359b97a8ec3c6 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/SplineEditor/Scripts/UniSplineTest.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/SplineEditor/Scripts/UniSplineTest.cs deleted file mode 100644 index b915dd9..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/SplineEditor/Scripts/UniSplineTest.cs +++ /dev/null @@ -1,37 +0,0 @@ -using UnityEngine; -using System.Collections; -using uc.Spline; - -public class UniSplineTest : MonoBehaviour -{ - public UniSplineComponent m_spline; - public float m_speed = 1, m_curspeed = 0, m_position = 0; - public Vector3 m_up = Vector3.up; - public Ease.Easing m_easing; - private BaseSpline.SplineIterator m_iter; - - void Awake() - { - m_iter = m_spline.Spline.GetIterator(); - m_iter.SetTransform(m_spline.transform); - } - - void Update() - { - m_position += m_speed * Time.deltaTime; - m_iter.SetOffset(Ease.EaseByType(m_easing, 0, m_spline.Spline.Length, m_position / m_spline.Spline.Length)); - - Vector3 prevpos = transform.position; - - transform.position = m_iter.GetPosition(); - transform.rotation = Quaternion.LookRotation(m_iter.GetTangent(), m_up); - - m_curspeed = (transform.position - prevpos).magnitude / Time.deltaTime; - - /* - Debug.DrawLine(transform.position, transform.position + m_iter.GetTangent().normalized, Color.red); - Debug.DrawLine(transform.position, transform.position + m_iter.GetNormal().normalized, Color.green); - Debug.DrawLine(transform.position, transform.position + Vector3.Cross(m_iter.GetTangent().normalized, m_iter.GetNormal().normalized).normalized, Color.blue); - */ - } -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/SplineEditor/Scripts/UniSplineTest.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/SplineEditor/Scripts/UniSplineTest.cs.meta deleted file mode 100644 index 387f811..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/SplineEditor/Scripts/UniSplineTest.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 9a01219ae1b84284abd71a1a330f1218 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets.meta deleted file mode 100644 index 83b15cb..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 9fa92981704c08548bd50b9fc1dd940e -folderAsset: yes -timeCreated: 1484640274 -licenseType: Free -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Editor.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Editor.meta deleted file mode 100644 index 4b2e03e..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Editor.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 5da2500853a87e24094934ae8214498c -folderAsset: yes -timeCreated: 1484640274 -licenseType: Free -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Editor/ImageEffects.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Editor/ImageEffects.meta deleted file mode 100644 index 1dfb536..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Editor/ImageEffects.meta +++ /dev/null @@ -1,6 +0,0 @@ -fileFormatVersion: 2 -guid: 225198e07aaae3547a6d1f6e7177555f -folderAsset: yes -DefaultImporter: - userData: - assetBundleName: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Editor/ImageEffects/AntialiasingEditor.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Editor/ImageEffects/AntialiasingEditor.cs deleted file mode 100644 index 795b9d8..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Editor/ImageEffects/AntialiasingEditor.cs +++ /dev/null @@ -1,75 +0,0 @@ -using System; -using UnityEditor; -using UnityEngine; - -namespace UnityStandardAssets.ImageEffects -{ - [CustomEditor(typeof (Antialiasing))] - public class AntialiasingEditor : Editor - { - private SerializedObject serObj; - - private SerializedProperty mode; - - private SerializedProperty showGeneratedNormals; - private SerializedProperty offsetScale; - private SerializedProperty blurRadius; - private SerializedProperty dlaaSharp; - - private SerializedProperty edgeThresholdMin; - private SerializedProperty edgeThreshold; - private SerializedProperty edgeSharpness; - - - private void OnEnable() - { - serObj = new SerializedObject(target); - - mode = serObj.FindProperty("mode"); - - showGeneratedNormals = serObj.FindProperty("showGeneratedNormals"); - offsetScale = serObj.FindProperty("offsetScale"); - blurRadius = serObj.FindProperty("blurRadius"); - dlaaSharp = serObj.FindProperty("dlaaSharp"); - - edgeThresholdMin = serObj.FindProperty("edgeThresholdMin"); - edgeThreshold = serObj.FindProperty("edgeThreshold"); - edgeSharpness = serObj.FindProperty("edgeSharpness"); - } - - - public override void OnInspectorGUI() - { - serObj.Update(); - - GUILayout.Label("Luminance based fullscreen antialiasing", EditorStyles.miniBoldLabel); - - EditorGUILayout.PropertyField(mode, new GUIContent("Technique")); - - Material mat = (target as Antialiasing).CurrentAAMaterial(); - if (null == mat && (target as Antialiasing).enabled) - { - EditorGUILayout.HelpBox("This AA technique is currently not supported. Choose a different technique or disable the effect and use MSAA instead.", MessageType.Warning); - } - - if (mode.enumValueIndex == (int) AAMode.NFAA) - { - EditorGUILayout.PropertyField(offsetScale, new GUIContent("Edge Detect Ofs")); - EditorGUILayout.PropertyField(blurRadius, new GUIContent("Blur Radius")); - EditorGUILayout.PropertyField(showGeneratedNormals, new GUIContent("Show Normals")); - } - else if (mode.enumValueIndex == (int) AAMode.DLAA) - { - EditorGUILayout.PropertyField(dlaaSharp, new GUIContent("Sharp")); - } - else if (mode.enumValueIndex == (int) AAMode.FXAA3Console) - { - EditorGUILayout.PropertyField(edgeThresholdMin, new GUIContent("Edge Min Threshhold")); - EditorGUILayout.PropertyField(edgeThreshold, new GUIContent("Edge Threshhold")); - EditorGUILayout.PropertyField(edgeSharpness, new GUIContent("Edge Sharpness")); - } - - serObj.ApplyModifiedProperties(); - } - } -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Editor/ImageEffects/AntialiasingEditor.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Editor/ImageEffects/AntialiasingEditor.cs.meta deleted file mode 100644 index bbf3d2e..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Editor/ImageEffects/AntialiasingEditor.cs.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: ba15fa37442517749a3c4640a4ad4054 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Editor/ImageEffects/BloomAndFlaresEditor.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Editor/ImageEffects/BloomAndFlaresEditor.cs deleted file mode 100644 index 6a9c7cd..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Editor/ImageEffects/BloomAndFlaresEditor.cs +++ /dev/null @@ -1,161 +0,0 @@ -using System; -using UnityEditor; -using UnityEngine; - -namespace UnityStandardAssets.ImageEffects -{ - [CustomEditor (typeof(BloomAndFlares))] - class BloomAndFlaresEditor : Editor - { - SerializedProperty tweakMode; - SerializedProperty screenBlendMode; - - SerializedObject serObj; - - SerializedProperty hdr; - SerializedProperty sepBlurSpread; - SerializedProperty useSrcAlphaAsMask; - - SerializedProperty bloomIntensity; - SerializedProperty bloomthreshold; - SerializedProperty bloomBlurIterations; - - SerializedProperty lensflares; - - SerializedProperty hollywoodFlareBlurIterations; - - SerializedProperty lensflareMode; - SerializedProperty hollyStretchWidth; - SerializedProperty lensflareIntensity; - SerializedProperty lensflarethreshold; - SerializedProperty flareColorA; - SerializedProperty flareColorB; - SerializedProperty flareColorC; - SerializedProperty flareColorD; - - SerializedProperty lensFlareVignetteMask; - - void OnEnable () { - serObj = new SerializedObject (target); - - screenBlendMode = serObj.FindProperty("screenBlendMode"); - hdr = serObj.FindProperty("hdr"); - - sepBlurSpread = serObj.FindProperty("sepBlurSpread"); - useSrcAlphaAsMask = serObj.FindProperty("useSrcAlphaAsMask"); - - bloomIntensity = serObj.FindProperty("bloomIntensity"); - bloomthreshold = serObj.FindProperty("bloomThreshold"); - bloomBlurIterations = serObj.FindProperty("bloomBlurIterations"); - - lensflares = serObj.FindProperty("lensflares"); - - lensflareMode = serObj.FindProperty("lensflareMode"); - hollywoodFlareBlurIterations = serObj.FindProperty("hollywoodFlareBlurIterations"); - hollyStretchWidth = serObj.FindProperty("hollyStretchWidth"); - lensflareIntensity = serObj.FindProperty("lensflareIntensity"); - lensflarethreshold = serObj.FindProperty("lensflareThreshold"); - flareColorA = serObj.FindProperty("flareColorA"); - flareColorB = serObj.FindProperty("flareColorB"); - flareColorC = serObj.FindProperty("flareColorC"); - flareColorD = serObj.FindProperty("flareColorD"); - lensFlareVignetteMask = serObj.FindProperty("lensFlareVignetteMask"); - - tweakMode = serObj.FindProperty("tweakMode"); - } - - - public override void OnInspectorGUI () { - serObj.Update(); - - GUILayout.Label("HDR " + (hdr.enumValueIndex == 0 ? "auto detected, " : (hdr.enumValueIndex == 1 ? "forced on, " : "disabled, ")) + (useSrcAlphaAsMask.floatValue < 0.1f ? " ignoring alpha channel glow information" : " using alpha channel glow information"), EditorStyles.miniBoldLabel); - - EditorGUILayout.PropertyField (tweakMode, new GUIContent("Tweak mode")); - EditorGUILayout.PropertyField (screenBlendMode, new GUIContent("Blend mode")); - EditorGUILayout.PropertyField (hdr, new GUIContent("HDR")); - - // display info text when screen blend mode cannot be used - Camera cam = (target as BloomAndFlares).GetComponent(); - if (cam != null) { -#if UNITY_5_6_OR_NEWER - if (screenBlendMode.enumValueIndex==0 && ((cam.allowHDR && hdr.enumValueIndex==0) || (hdr.enumValueIndex==1))) { -#else - if (screenBlendMode.enumValueIndex == 0 && ((cam.hdr && hdr.enumValueIndex == 0) || (hdr.enumValueIndex == 1))) { -#endif - EditorGUILayout.HelpBox("Screen blend is not supported in HDR. Using 'Add' instead.", MessageType.Info); - } - } - - if (1 == tweakMode.intValue) - EditorGUILayout.PropertyField (lensflares, new GUIContent("Cast lens flares")); - - EditorGUILayout.Separator (); - - EditorGUILayout.PropertyField (bloomIntensity, new GUIContent("Intensity")); - bloomthreshold.floatValue = EditorGUILayout.Slider ("threshold", bloomthreshold.floatValue, -0.05f, 4.0f); - bloomBlurIterations.intValue = EditorGUILayout.IntSlider ("Blur iterations", bloomBlurIterations.intValue, 1, 4); - sepBlurSpread.floatValue = EditorGUILayout.Slider ("Blur spread", sepBlurSpread.floatValue, 0.1f, 10.0f); - - if (1 == tweakMode.intValue) - useSrcAlphaAsMask.floatValue = EditorGUILayout.Slider (new GUIContent("Use alpha mask", "Make alpha channel define glowiness"), useSrcAlphaAsMask.floatValue, 0.0f, 1.0f); - else - useSrcAlphaAsMask.floatValue = 0.0f; - - if (1 == tweakMode.intValue) { - EditorGUILayout.Separator (); - - if (lensflares.boolValue) { - - // further lens flare tweakings - if (0 != tweakMode.intValue) - EditorGUILayout.PropertyField (lensflareMode, new GUIContent("Lens flare mode")); - else - lensflareMode.enumValueIndex = 0; - - EditorGUILayout.PropertyField(lensFlareVignetteMask, new GUIContent("Lens flare mask", "This mask is needed to prevent lens flare artifacts")); - - EditorGUILayout.PropertyField (lensflareIntensity, new GUIContent("Local intensity")); - lensflarethreshold.floatValue = EditorGUILayout.Slider ("Local threshold", lensflarethreshold.floatValue, 0.0f, 1.0f); - - if (lensflareMode.intValue == 0) { - // ghosting - EditorGUILayout.BeginHorizontal (); - EditorGUILayout.PropertyField (flareColorA, new GUIContent("1st Color")); - EditorGUILayout.PropertyField (flareColorB, new GUIContent("2nd Color")); - EditorGUILayout.EndHorizontal (); - - EditorGUILayout.BeginHorizontal (); - EditorGUILayout.PropertyField (flareColorC, new GUIContent("3rd Color")); - EditorGUILayout.PropertyField (flareColorD, new GUIContent("4th Color")); - EditorGUILayout.EndHorizontal (); - } - else if (lensflareMode.intValue == 1) { - // hollywood - EditorGUILayout.PropertyField (hollyStretchWidth, new GUIContent("Stretch width")); - hollywoodFlareBlurIterations.intValue = EditorGUILayout.IntSlider ("Blur iterations", hollywoodFlareBlurIterations.intValue, 1, 4); - - EditorGUILayout.PropertyField (flareColorA, new GUIContent("Tint Color")); - } - else if (lensflareMode.intValue == 2) { - // both - EditorGUILayout.PropertyField (hollyStretchWidth, new GUIContent("Stretch width")); - hollywoodFlareBlurIterations.intValue = EditorGUILayout.IntSlider ("Blur iterations", hollywoodFlareBlurIterations.intValue, 1, 4); - - EditorGUILayout.BeginHorizontal (); - EditorGUILayout.PropertyField (flareColorA, new GUIContent("1st Color")); - EditorGUILayout.PropertyField (flareColorB, new GUIContent("2nd Color")); - EditorGUILayout.EndHorizontal (); - - EditorGUILayout.BeginHorizontal (); - EditorGUILayout.PropertyField (flareColorC, new GUIContent("3rd Color")); - EditorGUILayout.PropertyField (flareColorD, new GUIContent("4th Color")); - EditorGUILayout.EndHorizontal (); - } - } - } else - lensflares.boolValue = false; // disable lens flares in simple tweak mode - - serObj.ApplyModifiedProperties(); - } - } -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Editor/ImageEffects/BloomAndFlaresEditor.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Editor/ImageEffects/BloomAndFlaresEditor.cs.meta deleted file mode 100644 index a4f4e00..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Editor/ImageEffects/BloomAndFlaresEditor.cs.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 4deca87cb459d1642ac8f734856ca84e -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Editor/ImageEffects/BloomEditor.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Editor/ImageEffects/BloomEditor.cs deleted file mode 100644 index 9f67a19..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Editor/ImageEffects/BloomEditor.cs +++ /dev/null @@ -1,166 +0,0 @@ -using System; -using UnityEditor; -using UnityEngine; - -namespace UnityStandardAssets.ImageEffects -{ - [CustomEditor (typeof(Bloom))] - class BloomEditor : Editor - { - SerializedProperty tweakMode; - SerializedProperty screenBlendMode; - - SerializedObject serObj; - - SerializedProperty hdr; - SerializedProperty quality; - SerializedProperty sepBlurSpread; - - SerializedProperty bloomIntensity; - SerializedProperty bloomThresholdColor; - SerializedProperty bloomThreshold; - SerializedProperty bloomBlurIterations; - - SerializedProperty hollywoodFlareBlurIterations; - - SerializedProperty lensflareMode; - SerializedProperty hollyStretchWidth; - SerializedProperty lensflareIntensity; - SerializedProperty flareRotation; - SerializedProperty lensFlareSaturation; - SerializedProperty lensflareThreshold; - SerializedProperty flareColorA; - SerializedProperty flareColorB; - SerializedProperty flareColorC; - SerializedProperty flareColorD; - - SerializedProperty lensFlareVignetteMask; - - void OnEnable () { - serObj = new SerializedObject (target); - - screenBlendMode = serObj.FindProperty("screenBlendMode"); - hdr = serObj.FindProperty("hdr"); - quality = serObj.FindProperty("quality"); - - sepBlurSpread = serObj.FindProperty("sepBlurSpread"); - - bloomIntensity = serObj.FindProperty("bloomIntensity"); - bloomThreshold = serObj.FindProperty("bloomThreshold"); - bloomThresholdColor = serObj.FindProperty("bloomThresholdColor"); - bloomBlurIterations = serObj.FindProperty("bloomBlurIterations"); - - lensflareMode = serObj.FindProperty("lensflareMode"); - hollywoodFlareBlurIterations = serObj.FindProperty("hollywoodFlareBlurIterations"); - hollyStretchWidth = serObj.FindProperty("hollyStretchWidth"); - lensflareIntensity = serObj.FindProperty("lensflareIntensity"); - lensflareThreshold = serObj.FindProperty("lensflareThreshold"); - lensFlareSaturation = serObj.FindProperty("lensFlareSaturation"); - flareRotation = serObj.FindProperty("flareRotation"); - flareColorA = serObj.FindProperty("flareColorA"); - flareColorB = serObj.FindProperty("flareColorB"); - flareColorC = serObj.FindProperty("flareColorC"); - flareColorD = serObj.FindProperty("flareColorD"); - lensFlareVignetteMask = serObj.FindProperty("lensFlareVignetteMask"); - - tweakMode = serObj.FindProperty("tweakMode"); - } - - - public override void OnInspectorGUI () { - serObj.Update(); - - EditorGUILayout.LabelField("Glow and Lens Flares for bright screen pixels", EditorStyles.miniLabel); - - EditorGUILayout.PropertyField (quality, new GUIContent("Quality", "High quality preserves high frequencies with bigger blurs and uses a better blending and down-/upsampling")); - - EditorGUILayout.Separator (); - - EditorGUILayout.PropertyField (tweakMode, new GUIContent("Mode")); - EditorGUILayout.PropertyField (screenBlendMode, new GUIContent("Blend")); - EditorGUILayout.PropertyField (hdr, new GUIContent("HDR")); - - EditorGUILayout.Separator (); - - // display info text when screen blend mode cannot be used - Camera cam = (target as Bloom).GetComponent(); - if (cam != null) { -#if UNITY_5_6_OR_NEWER - if (screenBlendMode.enumValueIndex==0 && ((cam.allowHDR && hdr.enumValueIndex==0) || (hdr.enumValueIndex==1))) { -#else - if (screenBlendMode.enumValueIndex == 0 && ((cam.hdr && hdr.enumValueIndex == 0) || (hdr.enumValueIndex == 1))) { -#endif - EditorGUILayout.HelpBox("Screen blend is not supported in HDR. Using 'Add' instead.", MessageType.Info); - } - } - - EditorGUILayout.PropertyField (bloomIntensity, new GUIContent("Intensity")); - bloomThreshold.floatValue = EditorGUILayout.Slider ("Threshold", bloomThreshold.floatValue, -0.05f, 4.0f); - if (1 == tweakMode.intValue) { - EditorGUILayout.PropertyField(bloomThresholdColor, new GUIContent(" RGB Threshold")); - } - EditorGUILayout.Separator (); - - bloomBlurIterations.intValue = EditorGUILayout.IntSlider ("Blur Iterations", bloomBlurIterations.intValue, 1, 4); - sepBlurSpread.floatValue = EditorGUILayout.Slider (" Sample Distance", sepBlurSpread.floatValue, 0.1f, 10.0f); - EditorGUILayout.Separator (); - - if (1 == tweakMode.intValue) { - // further lens flare tweakings - if (0 != tweakMode.intValue) - EditorGUILayout.PropertyField (lensflareMode, new GUIContent("Lens Flares")); - else - lensflareMode.enumValueIndex = 0; - - EditorGUILayout.PropertyField (lensflareIntensity, new GUIContent(" Local Intensity", "0 disables lens flares entirely (optimization)")); - lensflareThreshold.floatValue = EditorGUILayout.Slider ("Threshold", lensflareThreshold.floatValue, 0.0f, 4.0f); - - if (Mathf.Abs(lensflareIntensity.floatValue) > Mathf.Epsilon) { - if (lensflareMode.intValue == 0) { - // ghosting - EditorGUILayout.BeginHorizontal (); - EditorGUILayout.PropertyField (flareColorA, new GUIContent(" 1st Color")); - EditorGUILayout.PropertyField (flareColorB, new GUIContent(" 2nd Color")); - EditorGUILayout.EndHorizontal (); - - EditorGUILayout.BeginHorizontal (); - EditorGUILayout.PropertyField (flareColorC, new GUIContent(" 3rd Color")); - EditorGUILayout.PropertyField (flareColorD, new GUIContent(" 4th Color")); - EditorGUILayout.EndHorizontal (); - } - else if (lensflareMode.intValue == 1) { - // hollywood - EditorGUILayout.PropertyField (hollyStretchWidth, new GUIContent(" Stretch width")); - EditorGUILayout.PropertyField (flareRotation, new GUIContent( " Rotation")); - hollywoodFlareBlurIterations.intValue = EditorGUILayout.IntSlider (" Blur Iterations", hollywoodFlareBlurIterations.intValue, 1, 4); - - EditorGUILayout.PropertyField (lensFlareSaturation, new GUIContent(" Saturation")); - EditorGUILayout.PropertyField (flareColorA, new GUIContent(" Tint Color")); - } - else if (lensflareMode.intValue == 2) { - // both - EditorGUILayout.PropertyField (hollyStretchWidth, new GUIContent(" Stretch width")); - hollywoodFlareBlurIterations.intValue = EditorGUILayout.IntSlider (" Blur Iterations", hollywoodFlareBlurIterations.intValue, 1, 4); - - EditorGUILayout.PropertyField (lensFlareSaturation, new GUIContent(" Saturation")); - - EditorGUILayout.BeginHorizontal (); - EditorGUILayout.PropertyField (flareColorA, new GUIContent(" 1st Color")); - EditorGUILayout.PropertyField (flareColorB, new GUIContent(" 2nd Color")); - EditorGUILayout.EndHorizontal (); - - EditorGUILayout.BeginHorizontal (); - EditorGUILayout.PropertyField (flareColorC, new GUIContent(" 3rd Color")); - EditorGUILayout.PropertyField (flareColorD, new GUIContent(" 4th Color")); - EditorGUILayout.EndHorizontal (); - } - - EditorGUILayout.PropertyField(lensFlareVignetteMask, new GUIContent(" Mask", "This mask is needed to prevent lens flare artifacts")); - - } - } - - serObj.ApplyModifiedProperties(); - } - } -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Editor/ImageEffects/BloomEditor.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Editor/ImageEffects/BloomEditor.cs.meta deleted file mode 100644 index ad4d3b3..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Editor/ImageEffects/BloomEditor.cs.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 43fcc28c40e404d4eabfc88b1dbda7b5 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Editor/ImageEffects/CameraMotionBlurEditor.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Editor/ImageEffects/CameraMotionBlurEditor.cs deleted file mode 100644 index bc1f5ff..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Editor/ImageEffects/CameraMotionBlurEditor.cs +++ /dev/null @@ -1,99 +0,0 @@ -using System; -using UnityEditor; -using UnityEngine; - -namespace UnityStandardAssets.ImageEffects -{ - [CustomEditor (typeof(CameraMotionBlur))] - class CameraMotionBlurEditor : Editor - { - SerializedObject serObj; - - SerializedProperty filterType; - SerializedProperty preview; - SerializedProperty previewScale; - SerializedProperty movementScale; - SerializedProperty jitter; - SerializedProperty rotationScale; - SerializedProperty maxVelocity; - SerializedProperty minVelocity; - SerializedProperty velocityScale; - SerializedProperty velocityDownsample; - SerializedProperty noiseTexture; - SerializedProperty showVelocity; - SerializedProperty showVelocityScale; - SerializedProperty excludeLayers; - - void OnEnable () { - serObj = new SerializedObject (target); - - filterType = serObj.FindProperty ("filterType"); - - preview = serObj.FindProperty ("preview"); - previewScale = serObj.FindProperty ("previewScale"); - - movementScale = serObj.FindProperty ("movementScale"); - rotationScale = serObj.FindProperty ("rotationScale"); - - maxVelocity = serObj.FindProperty ("maxVelocity"); - minVelocity = serObj.FindProperty ("minVelocity"); - - jitter = serObj.FindProperty ("jitter"); - - excludeLayers = serObj.FindProperty ("excludeLayers"); - - velocityScale = serObj.FindProperty ("velocityScale"); - velocityDownsample = serObj.FindProperty ("velocityDownsample"); - - noiseTexture = serObj.FindProperty ("noiseTexture"); - } - - - public override void OnInspectorGUI () { - serObj.Update (); - - EditorGUILayout.LabelField("Simulates camera based motion blur", EditorStyles.miniLabel); - - EditorGUILayout.PropertyField (filterType, new GUIContent("Technique")); - if (filterType.enumValueIndex == 3 && !(target as CameraMotionBlur).Dx11Support()) { - EditorGUILayout.HelpBox("DX11 mode not supported (need shader model 5)", MessageType.Info); - } - EditorGUILayout.PropertyField (velocityScale, new GUIContent(" Velocity Scale")); - if (filterType.enumValueIndex >= 2) { - EditorGUILayout.LabelField(" Tile size used during reconstruction filter:", EditorStyles.miniLabel); - EditorGUILayout.Slider(maxVelocity, 2.0f, 10.0f, new GUIContent(" Velocity Max")); - } - else - EditorGUILayout.Slider (maxVelocity, 2.0f, 10.0f, new GUIContent(" Velocity Max")); - EditorGUILayout.Slider(minVelocity, 0.0f, 10.0f, new GUIContent(" Velocity Min")); - - EditorGUILayout.Separator (); - - EditorGUILayout.LabelField("Technique Specific"); - - if (filterType.enumValueIndex == 0) { - // portal style motion blur - EditorGUILayout.PropertyField (rotationScale, new GUIContent(" Camera Rotation")); - EditorGUILayout.PropertyField (movementScale, new GUIContent(" Camera Movement")); - } - else { - // "plausible" blur or cheap, local blur - EditorGUILayout.PropertyField (excludeLayers, new GUIContent(" Exclude Layers")); - EditorGUILayout.PropertyField (velocityDownsample, new GUIContent(" Velocity Downsample")); - velocityDownsample.intValue = velocityDownsample.intValue < 1 ? 1 : velocityDownsample.intValue; - if (filterType.enumValueIndex >= 2) { // only display jitter for reconstruction - EditorGUILayout.PropertyField (noiseTexture, new GUIContent(" Sample Jitter")); - EditorGUILayout.Slider (jitter, 0.0f, 10.0f, new GUIContent(" Jitter Strength")); - } - } - - EditorGUILayout.Separator (); - - EditorGUILayout.PropertyField (preview, new GUIContent("Preview")); - if (preview.boolValue) - EditorGUILayout.PropertyField (previewScale, new GUIContent("")); - - serObj.ApplyModifiedProperties(); - } - } -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Editor/ImageEffects/CameraMotionBlurEditor.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Editor/ImageEffects/CameraMotionBlurEditor.cs.meta deleted file mode 100644 index af66969..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Editor/ImageEffects/CameraMotionBlurEditor.cs.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 80cbbe1c107bf5e43a96347d3dfc2658 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Editor/ImageEffects/ColorCorrectionCurvesEditor.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Editor/ImageEffects/ColorCorrectionCurvesEditor.cs deleted file mode 100644 index f37adb0..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Editor/ImageEffects/ColorCorrectionCurvesEditor.cs +++ /dev/null @@ -1,124 +0,0 @@ -using System; -using UnityEditor; -using UnityEngine; - -namespace UnityStandardAssets.ImageEffects -{ - [CustomEditor (typeof(ColorCorrectionCurves))] - class ColorCorrectionCurvesEditor : Editor { - SerializedObject serObj; - - SerializedProperty mode; - - SerializedProperty redChannel; - SerializedProperty greenChannel; - SerializedProperty blueChannel; - - SerializedProperty useDepthCorrection; - - SerializedProperty depthRedChannel; - SerializedProperty depthGreenChannel; - SerializedProperty depthBlueChannel; - - SerializedProperty zCurveChannel; - - SerializedProperty saturation; - - SerializedProperty selectiveCc; - SerializedProperty selectiveFromColor; - SerializedProperty selectiveToColor; - - private bool applyCurveChanges = false; - - void OnEnable () { - serObj = new SerializedObject (target); - - mode = serObj.FindProperty ("mode"); - - saturation = serObj.FindProperty ("saturation"); - - redChannel = serObj.FindProperty ("redChannel"); - greenChannel = serObj.FindProperty ("greenChannel"); - blueChannel = serObj.FindProperty ("blueChannel"); - - useDepthCorrection = serObj.FindProperty ("useDepthCorrection"); - - zCurveChannel = serObj.FindProperty ("zCurve"); - - depthRedChannel = serObj.FindProperty ("depthRedChannel"); - depthGreenChannel = serObj.FindProperty ("depthGreenChannel"); - depthBlueChannel = serObj.FindProperty ("depthBlueChannel"); - - serObj.ApplyModifiedProperties (); - - selectiveCc = serObj.FindProperty ("selectiveCc"); - selectiveFromColor = serObj.FindProperty ("selectiveFromColor"); - selectiveToColor = serObj.FindProperty ("selectiveToColor"); - } - - void CurveGui ( string name, SerializedProperty animationCurve, Color color) { - // @NOTE: EditorGUILayout.CurveField is buggy and flickers, using PropertyField for now - //animationCurve.animationCurveValue = EditorGUILayout.CurveField (GUIContent (name), animationCurve.animationCurveValue, color, Rect (0.0f,0.0f,1.0f,1.0f)); - EditorGUILayout.PropertyField (animationCurve, new GUIContent (name)); - if (GUI.changed) - applyCurveChanges = true; - } - - void BeginCurves () { - applyCurveChanges = false; - } - - void ApplyCurves () { - if (applyCurveChanges) { - serObj.ApplyModifiedProperties (); - (serObj.targetObject as ColorCorrectionCurves).gameObject.SendMessage ("UpdateTextures"); - } - } - - - public override void OnInspectorGUI () { - serObj.Update (); - - GUILayout.Label ("Use curves to tweak RGB channel colors", EditorStyles.miniBoldLabel); - - saturation.floatValue = EditorGUILayout.Slider( "Saturation", saturation.floatValue, 0.0f, 5.0f); - - EditorGUILayout.PropertyField (mode, new GUIContent ("Mode")); - EditorGUILayout.Separator (); - - BeginCurves (); - - CurveGui (" Red", redChannel, Color.red); - CurveGui (" Green", greenChannel, Color.green); - CurveGui (" Blue", blueChannel, Color.blue); - - EditorGUILayout.Separator (); - - if (mode.intValue > 0) - useDepthCorrection.boolValue = true; - else - useDepthCorrection.boolValue = false; - - if (useDepthCorrection.boolValue) { - CurveGui (" Red (depth)", depthRedChannel, Color.red); - CurveGui (" Green (depth)", depthGreenChannel, Color.green); - CurveGui (" Blue (depth)", depthBlueChannel, Color.blue); - EditorGUILayout.Separator (); - CurveGui (" Blend Curve", zCurveChannel, Color.grey); - } - - EditorGUILayout.Separator (); - EditorGUILayout.PropertyField (selectiveCc, new GUIContent ("Selective")); - if (selectiveCc.boolValue) { - EditorGUILayout.PropertyField (selectiveFromColor, new GUIContent (" Key")); - EditorGUILayout.PropertyField (selectiveToColor, new GUIContent (" Target")); - } - - - ApplyCurves (); - - if (!applyCurveChanges) - serObj.ApplyModifiedProperties (); - } - } -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Editor/ImageEffects/ColorCorrectionCurvesEditor.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Editor/ImageEffects/ColorCorrectionCurvesEditor.cs.meta deleted file mode 100644 index b1c7fa3..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Editor/ImageEffects/ColorCorrectionCurvesEditor.cs.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: a4a9489f73e4f0344ab3fc97bdf5170b -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Editor/ImageEffects/ColorCorrectionLookupEditor.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Editor/ImageEffects/ColorCorrectionLookupEditor.cs deleted file mode 100644 index 4d6c4bc..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Editor/ImageEffects/ColorCorrectionLookupEditor.cs +++ /dev/null @@ -1,90 +0,0 @@ -using System; -using UnityEditor; -using UnityEngine; - -namespace UnityStandardAssets.ImageEffects -{ - [CustomEditor (typeof(ColorCorrectionLookup))] - class ColorCorrectionLookupEditor : Editor - { - SerializedObject serObj; - - void OnEnable () { - serObj = new SerializedObject (target); - } - - private Texture2D tempClutTex2D; - - - public override void OnInspectorGUI () { - serObj.Update (); - - EditorGUILayout.LabelField("Converts textures into color lookup volumes (for grading)", EditorStyles.miniLabel); - - //EditorGUILayout.LabelField("Change Lookup Texture (LUT):"); - //EditorGUILayout.BeginHorizontal (); - //Rect r = GUILayoutUtility.GetAspectRect(1.0ff); - - Rect r; Texture2D t; - - //EditorGUILayout.Space(); - tempClutTex2D = EditorGUILayout.ObjectField (" Based on", tempClutTex2D, typeof(Texture2D), false) as Texture2D; - if (tempClutTex2D == null) { - t = AssetDatabase.LoadMainAssetAtPath(((ColorCorrectionLookup)target).basedOnTempTex) as Texture2D; - if (t) tempClutTex2D = t; - } - - Texture2D tex = tempClutTex2D; - - if (tex && (target as ColorCorrectionLookup).basedOnTempTex != AssetDatabase.GetAssetPath(tex)) - { - EditorGUILayout.Separator(); - if (!(target as ColorCorrectionLookup).ValidDimensions(tex)) - { - EditorGUILayout.HelpBox ("Invalid texture dimensions!\nPick another texture or adjust dimension to e.g. 256x16.", MessageType.Warning); - } - else if (GUILayout.Button ("Convert and Apply")) - { - string path = AssetDatabase.GetAssetPath (tex); - TextureImporter textureImporter = AssetImporter.GetAtPath(path) as TextureImporter; - bool doImport = textureImporter.isReadable == false; - if (textureImporter.mipmapEnabled == true) { - doImport = true; - } - if (textureImporter.textureCompression != TextureImporterCompression.Uncompressed) { - doImport = true; - } - - if (doImport) - { - textureImporter.isReadable = true; - textureImporter.mipmapEnabled = false; - textureImporter.textureCompression = TextureImporterCompression.Uncompressed; - AssetDatabase.ImportAsset (path, ImportAssetOptions.ForceUpdate); - //tex = AssetDatabase.LoadMainAssetAtPath(path); - } - - (target as ColorCorrectionLookup).Convert(tex, path); - } - } - - if ((target as ColorCorrectionLookup).basedOnTempTex != "") - { - EditorGUILayout.HelpBox("Using " + (target as ColorCorrectionLookup).basedOnTempTex, MessageType.Info); - t = AssetDatabase.LoadMainAssetAtPath(((ColorCorrectionLookup)target).basedOnTempTex) as Texture2D; - if (t) { - r = GUILayoutUtility.GetLastRect(); - r = GUILayoutUtility.GetRect(r.width, 20); - r.x += r.width * 0.05f/2.0f; - r.width *= 0.95f; - GUI.DrawTexture (r, t); - GUILayoutUtility.GetRect(r.width, 4); - } - } - - //EditorGUILayout.EndHorizontal (); - - serObj.ApplyModifiedProperties(); - } - } -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Editor/ImageEffects/ColorCorrectionLookupEditor.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Editor/ImageEffects/ColorCorrectionLookupEditor.cs.meta deleted file mode 100644 index 9286d0e..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Editor/ImageEffects/ColorCorrectionLookupEditor.cs.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 66c17be95fbf398439ea09f8892a8b43 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Editor/ImageEffects/CreaseShadingEditor.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Editor/ImageEffects/CreaseShadingEditor.cs deleted file mode 100644 index da5d62d..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Editor/ImageEffects/CreaseShadingEditor.cs +++ /dev/null @@ -1,60 +0,0 @@ -using System; -using UnityEditor; -using UnityEditor.AnimatedValues; -using UnityEngine; - -namespace UnityStandardAssets.ImageEffects -{ - [CustomEditor(typeof(CreaseShading))] - class CreaseShadingEditor : Editor { - SerializedObject serObj; - - SerializedProperty m_intensity; - SerializedProperty m_softness; - SerializedProperty m_spread; - - AnimBool m_showSoftnessWarning = new AnimBool(); - AnimBool m_showSpreadWarning = new AnimBool(); - - private bool softnessWarningValue { get { return m_softness.intValue > 4; } } - private bool spreadWarningValue { get { return m_spread.floatValue > 4; } } - - void OnEnable () { - serObj = new SerializedObject (target); - - m_intensity = serObj.FindProperty("intensity"); - m_softness = serObj.FindProperty("softness"); - m_spread = serObj.FindProperty("spread"); - - m_showSoftnessWarning.valueChanged.AddListener(Repaint); - m_showSpreadWarning.valueChanged.AddListener(Repaint); - - m_showSoftnessWarning.value = softnessWarningValue; - m_showSpreadWarning.value = spreadWarningValue; - } - - public override void OnInspectorGUI () { - serObj.Update (); - - EditorGUILayout.Slider(m_intensity, -5.0f, 5.0f, new GUIContent("Intensity")); - - EditorGUILayout.IntSlider(m_softness, 0, 15, new GUIContent("Softness")); - m_showSoftnessWarning.target = softnessWarningValue; - if (EditorGUILayout.BeginFadeGroup(m_showSoftnessWarning.faded)) - { - EditorGUILayout.HelpBox("High Softness value might reduce performance.", MessageType.Warning, false); - } - EditorGUILayout.EndFadeGroup(); - - EditorGUILayout.Slider(m_spread, 0.0f, 50.0f, new GUIContent("Spread")); - m_showSpreadWarning.target = spreadWarningValue; - if (EditorGUILayout.BeginFadeGroup(m_showSpreadWarning.faded)) - { - EditorGUILayout.HelpBox("High Spread value might introduce visual artifacts.", MessageType.Warning, false); - } - EditorGUILayout.EndFadeGroup(); - - serObj.ApplyModifiedProperties (); - } - } -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Editor/ImageEffects/CreaseShadingEditor.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Editor/ImageEffects/CreaseShadingEditor.cs.meta deleted file mode 100644 index 85fb4ba..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Editor/ImageEffects/CreaseShadingEditor.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 6788af605d2f1244789565913bb4e7f6 -timeCreated: 1434032656 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Editor/ImageEffects/DepthOfFieldEditor.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Editor/ImageEffects/DepthOfFieldEditor.cs deleted file mode 100644 index acd7aca..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Editor/ImageEffects/DepthOfFieldEditor.cs +++ /dev/null @@ -1,161 +0,0 @@ -using System; -using UnityEditor; -using UnityEditor.AnimatedValues; -using UnityEngine; - -namespace UnityStandardAssets.ImageEffects -{ - [CustomEditor(typeof(DepthOfField))] - class DepthOfFieldEditor : Editor - { - SerializedObject serObj; - - SerializedProperty visualizeFocus; - SerializedProperty focalLength; - SerializedProperty focalSize; - SerializedProperty aperture; - SerializedProperty focalTransform; - SerializedProperty maxBlurSize; - SerializedProperty highResolution; - - SerializedProperty blurType; - SerializedProperty blurSampleCount; - - SerializedProperty nearBlur; - SerializedProperty foregroundOverlap; - - SerializedProperty dx11BokehThreshold; - SerializedProperty dx11SpawnHeuristic; - SerializedProperty dx11BokehTexture; - SerializedProperty dx11BokehScale; - SerializedProperty dx11BokehIntensity; - - AnimBool showFocalDistance = new AnimBool(); - AnimBool showDiscBlurSettings = new AnimBool(); - AnimBool showDX11BlurSettings = new AnimBool(); - AnimBool showNearBlurOverlapSize = new AnimBool(); - - bool useFocalDistance { get { return focalTransform.objectReferenceValue == null; } } - bool useDiscBlur { get { return blurType.enumValueIndex < 1; } } - bool useDX11Blur { get { return blurType.enumValueIndex > 0; } } - bool useNearBlur { get { return nearBlur.boolValue; } } - - - void OnEnable() - { - serObj = new SerializedObject(target); - - visualizeFocus = serObj.FindProperty("visualizeFocus"); - - focalLength = serObj.FindProperty("focalLength"); - focalSize = serObj.FindProperty("focalSize"); - aperture = serObj.FindProperty("aperture"); - focalTransform = serObj.FindProperty("focalTransform"); - maxBlurSize = serObj.FindProperty("maxBlurSize"); - highResolution = serObj.FindProperty("highResolution"); - - blurType = serObj.FindProperty("blurType"); - blurSampleCount = serObj.FindProperty("blurSampleCount"); - - nearBlur = serObj.FindProperty("nearBlur"); - foregroundOverlap = serObj.FindProperty("foregroundOverlap"); - - dx11BokehThreshold = serObj.FindProperty("dx11BokehThreshold"); - dx11SpawnHeuristic = serObj.FindProperty("dx11SpawnHeuristic"); - dx11BokehTexture = serObj.FindProperty("dx11BokehTexture"); - dx11BokehScale = serObj.FindProperty("dx11BokehScale"); - dx11BokehIntensity = serObj.FindProperty("dx11BokehIntensity"); - - InitializedAnimBools(); - } - - void InitializedAnimBools() - { - showFocalDistance.valueChanged.AddListener(Repaint); - showFocalDistance.value = useFocalDistance; - - showDiscBlurSettings.valueChanged.AddListener(Repaint); - showDiscBlurSettings.value = useDiscBlur; - - showDX11BlurSettings.valueChanged.AddListener(Repaint); - showDX11BlurSettings.value = useDX11Blur; - - showNearBlurOverlapSize.valueChanged.AddListener(Repaint); - showNearBlurOverlapSize.value = useNearBlur; - } - - - void UpdateAnimBoolTargets() - { - showFocalDistance.target = useFocalDistance; - showDiscBlurSettings.target = useDiscBlur; - showDX11BlurSettings.target = useDX11Blur; - showNearBlurOverlapSize.target = useNearBlur; - } - - - public override void OnInspectorGUI() - { - serObj.Update(); - - UpdateAnimBoolTargets(); - - EditorGUILayout.LabelField("Simulates camera lens defocus", EditorStyles.miniLabel); - - GUILayout.Label("Focal Settings"); - EditorGUILayout.PropertyField(visualizeFocus, new GUIContent(" Visualize")); - EditorGUILayout.PropertyField(focalTransform, new GUIContent(" Focus on Transform")); - - if (EditorGUILayout.BeginFadeGroup(showFocalDistance.faded)) - { - EditorGUILayout.PropertyField(focalLength, new GUIContent(" Focal Distance")); - } - EditorGUILayout.EndFadeGroup(); - - EditorGUILayout.Slider(focalSize, 0.0f, 2.0f, new GUIContent(" Focal Size")); - EditorGUILayout.Slider(aperture, 0.0f, 1.0f, new GUIContent(" Aperture")); - - EditorGUILayout.Separator(); - - EditorGUILayout.PropertyField(blurType, new GUIContent("Defocus Type")); - - if (!(target as DepthOfField).Dx11Support() && blurType.enumValueIndex > 0) - { - EditorGUILayout.HelpBox("DX11 mode not supported (need shader model 5)", MessageType.Info); - } - - if (EditorGUILayout.BeginFadeGroup(showDiscBlurSettings.faded)) - { - EditorGUILayout.PropertyField(blurSampleCount, new GUIContent(" Sample Count")); - } - EditorGUILayout.EndFadeGroup(); - - EditorGUILayout.Slider(maxBlurSize, 0.1f, 2.0f, new GUIContent(" Max Blur Distance")); - EditorGUILayout.PropertyField(highResolution, new GUIContent(" High Resolution")); - - EditorGUILayout.Separator(); - - EditorGUILayout.PropertyField(nearBlur, new GUIContent("Near Blur")); - if (EditorGUILayout.BeginFadeGroup(showNearBlurOverlapSize.faded)) - { - EditorGUILayout.Slider(foregroundOverlap, 0.1f, 2.0f, new GUIContent(" Overlap Size")); - } - EditorGUILayout.EndFadeGroup(); - - EditorGUILayout.Separator(); - - if (EditorGUILayout.BeginFadeGroup(showDX11BlurSettings.faded)) - { - GUILayout.Label("DX11 Bokeh Settings"); - EditorGUILayout.PropertyField(dx11BokehTexture, new GUIContent(" Bokeh Texture")); - EditorGUILayout.Slider(dx11BokehScale, 0.0f, 50.0f, new GUIContent(" Bokeh Scale")); - EditorGUILayout.Slider(dx11BokehIntensity, 0.0f, 100.0f, new GUIContent(" Bokeh Intensity")); - EditorGUILayout.Slider(dx11BokehThreshold, 0.0f, 1.0f, new GUIContent(" Min Luminance")); - EditorGUILayout.Slider(dx11SpawnHeuristic, 0.01f, 1.0f, new GUIContent(" Spawn Heuristic")); - } - EditorGUILayout.EndFadeGroup(); - - serObj.ApplyModifiedProperties(); - } - } -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Editor/ImageEffects/DepthOfFieldEditor.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Editor/ImageEffects/DepthOfFieldEditor.cs.meta deleted file mode 100644 index 8d85a2e..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Editor/ImageEffects/DepthOfFieldEditor.cs.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 427fdf36119bab44a9131abd19b90f57 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Editor/ImageEffects/EdgeDetectionEditor.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Editor/ImageEffects/EdgeDetectionEditor.cs deleted file mode 100644 index 9d2d7a5..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Editor/ImageEffects/EdgeDetectionEditor.cs +++ /dev/null @@ -1,72 +0,0 @@ -using System; -using UnityEditor; -using UnityEngine; - -namespace UnityStandardAssets.ImageEffects -{ - [CustomEditor (typeof(EdgeDetection))] - class EdgeDetectionEditor : Editor - { - SerializedObject serObj; - - SerializedProperty mode; - SerializedProperty sensitivityDepth; - SerializedProperty sensitivityNormals; - - SerializedProperty lumThreshold; - - SerializedProperty edgesOnly; - SerializedProperty edgesOnlyBgColor; - - SerializedProperty edgeExp; - SerializedProperty sampleDist; - - - void OnEnable () { - serObj = new SerializedObject (target); - - mode = serObj.FindProperty("mode"); - - sensitivityDepth = serObj.FindProperty("sensitivityDepth"); - sensitivityNormals = serObj.FindProperty("sensitivityNormals"); - - lumThreshold = serObj.FindProperty("lumThreshold"); - - edgesOnly = serObj.FindProperty("edgesOnly"); - edgesOnlyBgColor = serObj.FindProperty("edgesOnlyBgColor"); - - edgeExp = serObj.FindProperty("edgeExp"); - sampleDist = serObj.FindProperty("sampleDist"); - } - - - public override void OnInspectorGUI () { - serObj.Update (); - - GUILayout.Label("Detects spatial differences and converts into black outlines", EditorStyles.miniBoldLabel); - EditorGUILayout.PropertyField (mode, new GUIContent("Mode")); - - if (mode.intValue < 2) { - EditorGUILayout.PropertyField (sensitivityDepth, new GUIContent(" Depth Sensitivity")); - EditorGUILayout.PropertyField (sensitivityNormals, new GUIContent(" Normals Sensitivity")); - } - else if (mode.intValue < 4) { - EditorGUILayout.PropertyField (edgeExp, new GUIContent(" Edge Exponent")); - } - else { - // lum based mode - EditorGUILayout.PropertyField (lumThreshold, new GUIContent(" Luminance Threshold")); - } - - EditorGUILayout.PropertyField (sampleDist, new GUIContent(" Sample Distance")); - - EditorGUILayout.Separator (); - - GUILayout.Label ("Background Options"); - edgesOnly.floatValue = EditorGUILayout.Slider (" Edges only", edgesOnly.floatValue, 0.0f, 1.0f); - EditorGUILayout.PropertyField (edgesOnlyBgColor, new GUIContent (" Color")); - - serObj.ApplyModifiedProperties(); - } - } -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Editor/ImageEffects/EdgeDetectionEditor.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Editor/ImageEffects/EdgeDetectionEditor.cs.meta deleted file mode 100644 index 3ec10ca..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Editor/ImageEffects/EdgeDetectionEditor.cs.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: b5f1618d14cd80f4da910f00b04af37f -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Editor/ImageEffects/NoiseAndGrainEditor.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Editor/ImageEffects/NoiseAndGrainEditor.cs deleted file mode 100644 index 5b31336..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Editor/ImageEffects/NoiseAndGrainEditor.cs +++ /dev/null @@ -1,111 +0,0 @@ -using System; -using UnityEditor; -using UnityEngine; - -namespace UnityStandardAssets.ImageEffects -{ - [CustomEditor (typeof( NoiseAndGrain))] - class NoiseAndGrainEditor : Editor - { - SerializedObject serObj; - - SerializedProperty intensityMultiplier; - SerializedProperty generalIntensity; - SerializedProperty blackIntensity; - SerializedProperty whiteIntensity; - SerializedProperty midGrey; - - SerializedProperty dx11Grain; - SerializedProperty softness; - SerializedProperty monochrome; - - SerializedProperty intensities; - SerializedProperty tiling; - SerializedProperty monochromeTiling; - - SerializedProperty noiseTexture; - SerializedProperty filterMode; - - void OnEnable () { - serObj = new SerializedObject (target); - - intensityMultiplier = serObj.FindProperty("intensityMultiplier"); - generalIntensity = serObj.FindProperty("generalIntensity"); - blackIntensity = serObj.FindProperty("blackIntensity"); - whiteIntensity = serObj.FindProperty("whiteIntensity"); - midGrey = serObj.FindProperty("midGrey"); - - dx11Grain = serObj.FindProperty("dx11Grain"); - softness = serObj.FindProperty("softness"); - monochrome = serObj.FindProperty("monochrome"); - - intensities = serObj.FindProperty("intensities"); - tiling = serObj.FindProperty("tiling"); - monochromeTiling = serObj.FindProperty("monochromeTiling"); - - noiseTexture = serObj.FindProperty("noiseTexture"); - filterMode = serObj.FindProperty("filterMode"); - } - - - public override void OnInspectorGUI () { - serObj.Update(); - - EditorGUILayout.LabelField("Overlays animated noise patterns", EditorStyles.miniLabel); - - EditorGUILayout.PropertyField(dx11Grain, new GUIContent("DirectX 11 Grain")); - - if (dx11Grain.boolValue && !(target as NoiseAndGrain).Dx11Support()) { - EditorGUILayout.HelpBox("DX11 mode not supported (need DX11 GPU and enable DX11 in PlayerSettings)", MessageType.Info); - } - - EditorGUILayout.PropertyField(monochrome, new GUIContent("Monochrome")); - - EditorGUILayout.Separator(); - - EditorGUILayout.Slider(intensityMultiplier, 0.0f, 10.0f, new GUIContent("Intensity Multiplier")); - EditorGUILayout.Slider(generalIntensity, 0.0f, 1.0f, new GUIContent(" General")); - EditorGUILayout.Slider(blackIntensity, 0.0f, 1.0f, new GUIContent(" Black Boost")); - EditorGUILayout.Slider(whiteIntensity, 0.0f, 1.0f, new GUIContent(" White Boost")); - midGrey.floatValue = EditorGUILayout.Slider( new GUIContent(" Mid Grey (for Boost)"), midGrey.floatValue, 0.0f, 1.0f); - if (monochrome.boolValue == false) { - Color c = new Color(intensities.vector3Value.x,intensities.vector3Value.y,intensities.vector3Value.z,1.0f); - c = EditorGUILayout.ColorField(new GUIContent(" Color Weights"), c); - intensities.vector3Value = new Vector3(c.r, c.g, c.b); - } - - if (!dx11Grain.boolValue) { - EditorGUILayout.Separator(); - - EditorGUILayout.LabelField("Noise Shape"); - EditorGUILayout.PropertyField(noiseTexture, new GUIContent(" Texture")); - EditorGUILayout.PropertyField(filterMode, new GUIContent(" Filter")); - } - else { - EditorGUILayout.Separator(); - EditorGUILayout.LabelField("Noise Shape"); - } - - softness.floatValue = EditorGUILayout.Slider( new GUIContent(" Softness"),softness.floatValue, 0.0f, 0.99f); - - if (!dx11Grain.boolValue) { - EditorGUILayout.Separator(); - EditorGUILayout.LabelField("Advanced"); - - if (monochrome.boolValue == false) - { - Vector3 temp = tiling.vector3Value; - temp.x = EditorGUILayout.FloatField(new GUIContent(" Tiling (Red)"), tiling.vector3Value.x); - temp.y = EditorGUILayout.FloatField(new GUIContent(" Tiling (Green)"), tiling.vector3Value.y); - temp.z = EditorGUILayout.FloatField(new GUIContent(" Tiling (Blue)"), tiling.vector3Value.z); - tiling.vector3Value = temp; - } - else { - EditorGUILayout.PropertyField(monochromeTiling, new GUIContent(" Tiling")); - } - } - - serObj.ApplyModifiedProperties(); - } - } -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Editor/ImageEffects/NoiseAndGrainEditor.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Editor/ImageEffects/NoiseAndGrainEditor.cs.meta deleted file mode 100644 index 1ca666a..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Editor/ImageEffects/NoiseAndGrainEditor.cs.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: abd63abcc46fbcb4588164b671b52d3b -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Editor/ImageEffects/SunShaftsEditor.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Editor/ImageEffects/SunShaftsEditor.cs deleted file mode 100644 index 51deae7..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Editor/ImageEffects/SunShaftsEditor.cs +++ /dev/null @@ -1,105 +0,0 @@ -using System; -using UnityEditor; -using UnityEngine; - -namespace UnityStandardAssets.ImageEffects -{ - [CustomEditor (typeof(SunShafts))] - class SunShaftsEditor : Editor - { - SerializedObject serObj; - - SerializedProperty sunTransform; - SerializedProperty radialBlurIterations; - SerializedProperty sunColor; - SerializedProperty sunThreshold; - SerializedProperty sunShaftBlurRadius; - SerializedProperty sunShaftIntensity; - SerializedProperty useDepthTexture; - SerializedProperty resolution; - SerializedProperty screenBlendMode; - SerializedProperty maxRadius; - - void OnEnable () { - serObj = new SerializedObject (target); - - screenBlendMode = serObj.FindProperty("screenBlendMode"); - - sunTransform = serObj.FindProperty("sunTransform"); - sunColor = serObj.FindProperty("sunColor"); - sunThreshold = serObj.FindProperty("sunThreshold"); - - sunShaftBlurRadius = serObj.FindProperty("sunShaftBlurRadius"); - radialBlurIterations = serObj.FindProperty("radialBlurIterations"); - - sunShaftIntensity = serObj.FindProperty("sunShaftIntensity"); - - resolution = serObj.FindProperty("resolution"); - - maxRadius = serObj.FindProperty("maxRadius"); - - useDepthTexture = serObj.FindProperty("useDepthTexture"); - } - - - public override void OnInspectorGUI () { - serObj.Update (); - - EditorGUILayout.BeginHorizontal(); - - EditorGUILayout.PropertyField (useDepthTexture, new GUIContent ("Rely on Z Buffer?")); - if ((target as SunShafts).GetComponent()) - GUILayout.Label("Current camera mode: "+ (target as SunShafts).GetComponent().depthTextureMode, EditorStyles.miniBoldLabel); - - EditorGUILayout.EndHorizontal(); - - // depth buffer need - /* - bool newVal = useDepthTexture.boolValue; - if (newVal != oldVal) { - if (newVal) - (target as SunShafts).camera.depthTextureMode |= DepthTextureMode.Depth; - else - (target as SunShafts).camera.depthTextureMode &= ~DepthTextureMode.Depth; - } - */ - - EditorGUILayout.PropertyField (resolution, new GUIContent("Resolution")); - EditorGUILayout.PropertyField (screenBlendMode, new GUIContent("Blend mode")); - - EditorGUILayout.Separator (); - - EditorGUILayout.BeginHorizontal(); - - EditorGUILayout.PropertyField (sunTransform, new GUIContent("Shafts caster", "Chose a transform that acts as a root point for the produced sun shafts")); - if ((target as SunShafts).sunTransform && (target as SunShafts).GetComponent()) { - if (GUILayout.Button("Center on " + (target as SunShafts).GetComponent().name)) { - if (EditorUtility.DisplayDialog ("Move sun shafts source?", "The SunShafts caster named "+ (target as SunShafts).sunTransform.name +"\n will be centered along "+(target as SunShafts).GetComponent().name+". Are you sure? ", "Please do", "Don't")) { - Ray ray = (target as SunShafts).GetComponent().ViewportPointToRay(new Vector3(0.5f,0.5f,0)); - (target as SunShafts).sunTransform.position = ray.origin + ray.direction * 500.0f; - (target as SunShafts).sunTransform.LookAt ((target as SunShafts).transform); - } - } - } - - EditorGUILayout.EndHorizontal(); - - EditorGUILayout.Separator (); - - EditorGUILayout.PropertyField (sunThreshold, new GUIContent ("Threshold color")); - EditorGUILayout.PropertyField (sunColor, new GUIContent ("Shafts color")); - maxRadius.floatValue = 1.0f - EditorGUILayout.Slider ("Distance falloff", 1.0f - maxRadius.floatValue, 0.1f, 1.0f); - - EditorGUILayout.Separator (); - - sunShaftBlurRadius.floatValue = EditorGUILayout.Slider ("Blur size", sunShaftBlurRadius.floatValue, 1.0f, 10.0f); - radialBlurIterations.intValue = EditorGUILayout.IntSlider ("Blur iterations", radialBlurIterations.intValue, 1, 3); - - EditorGUILayout.Separator (); - - EditorGUILayout.PropertyField (sunShaftIntensity, new GUIContent("Intensity")); - - serObj.ApplyModifiedProperties(); - } - } -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Editor/ImageEffects/SunShaftsEditor.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Editor/ImageEffects/SunShaftsEditor.cs.meta deleted file mode 100644 index b8d901f..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Editor/ImageEffects/SunShaftsEditor.cs.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 54f6f6313f2aecc4d81035ec0031e313 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Editor/ImageEffects/TonemappingEditor.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Editor/ImageEffects/TonemappingEditor.cs deleted file mode 100644 index 8d42887..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Editor/ImageEffects/TonemappingEditor.cs +++ /dev/null @@ -1,85 +0,0 @@ -using System; -using UnityEditor; -using UnityEngine; - -namespace UnityStandardAssets.ImageEffects -{ - [CustomEditor (typeof(Tonemapping))] - class TonemappingEditor : Editor - { - SerializedObject serObj; - - SerializedProperty type; - - // CURVE specific parameter - SerializedProperty remapCurve; - - SerializedProperty exposureAdjustment; - - // REINHARD specific parameter - SerializedProperty middleGrey; - SerializedProperty white; - SerializedProperty adaptionSpeed; - SerializedProperty adaptiveTextureSize; - - void OnEnable () { - serObj = new SerializedObject (target); - - type = serObj.FindProperty ("type"); - remapCurve = serObj.FindProperty ("remapCurve"); - exposureAdjustment = serObj.FindProperty ("exposureAdjustment"); - middleGrey = serObj.FindProperty ("middleGrey"); - white = serObj.FindProperty ("white"); - adaptionSpeed = serObj.FindProperty ("adaptionSpeed"); - adaptiveTextureSize = serObj.FindProperty("adaptiveTextureSize"); - } - - - public override void OnInspectorGUI () { - serObj.Update (); - - GUILayout.Label("Mapping HDR to LDR ranges since 1982", EditorStyles.miniLabel); - - Camera cam = (target as Tonemapping).GetComponent(); - if (cam != null) { -#if UNITY_5_6_OR_NEWER - if (!cam.allowHDR) { -#else - if (!cam.hdr) { -#endif - EditorGUILayout.HelpBox("The camera is not HDR enabled. This will likely break the Tonemapper.", MessageType.Warning); - } - else if (!(target as Tonemapping).validRenderTextureFormat) { - EditorGUILayout.HelpBox("The input to Tonemapper is not in HDR. Make sure that all effects prior to this are executed in HDR.", MessageType.Warning); - } - } - - EditorGUILayout.PropertyField (type, new GUIContent ("Technique")); - - if (type.enumValueIndex == (int) Tonemapping.TonemapperType.UserCurve) { - EditorGUILayout.PropertyField (remapCurve, new GUIContent ("Remap curve", "Specify the mapping of luminances yourself")); - } else if (type.enumValueIndex == (int) Tonemapping.TonemapperType.SimpleReinhard) { - EditorGUILayout.PropertyField (exposureAdjustment, new GUIContent ("Exposure", "Exposure adjustment")); - } else if (type.enumValueIndex == (int) Tonemapping.TonemapperType.Hable) { - EditorGUILayout.PropertyField (exposureAdjustment, new GUIContent ("Exposure", "Exposure adjustment")); - } else if (type.enumValueIndex == (int) Tonemapping.TonemapperType.Photographic) { - EditorGUILayout.PropertyField (exposureAdjustment, new GUIContent ("Exposure", "Exposure adjustment")); - } else if (type.enumValueIndex == (int) Tonemapping.TonemapperType.OptimizedHejiDawson) { - EditorGUILayout.PropertyField (exposureAdjustment, new GUIContent ("Exposure", "Exposure adjustment")); - } else if (type.enumValueIndex == (int) Tonemapping.TonemapperType.AdaptiveReinhard) { - EditorGUILayout.PropertyField (middleGrey, new GUIContent ("Middle grey", "Middle grey defines the average luminance thus brightening or darkening the entire image.")); - EditorGUILayout.PropertyField (white, new GUIContent ("White", "Smallest luminance value that will be mapped to white")); - EditorGUILayout.PropertyField (adaptionSpeed, new GUIContent ("Adaption Speed", "Speed modifier for the automatic adaption")); - EditorGUILayout.PropertyField (adaptiveTextureSize, new GUIContent ("Texture size", "Defines the amount of downsamples needed.")); - } else if (type.enumValueIndex == (int) Tonemapping.TonemapperType.AdaptiveReinhardAutoWhite) { - EditorGUILayout.PropertyField (middleGrey, new GUIContent ("Middle grey", "Middle grey defines the average luminance thus brightening or darkening the entire image.")); - EditorGUILayout.PropertyField (adaptionSpeed, new GUIContent ("Adaption Speed", "Speed modifier for the automatic adaption")); - EditorGUILayout.PropertyField (adaptiveTextureSize, new GUIContent ("Texture size", "Defines the amount of downsamples needed.")); - } - - GUILayout.Label("All following effects will use LDR color buffers", EditorStyles.miniBoldLabel); - - serObj.ApplyModifiedProperties(); - } - } -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Editor/ImageEffects/TonemappingEditor.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Editor/ImageEffects/TonemappingEditor.cs.meta deleted file mode 100644 index 40c242a..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Editor/ImageEffects/TonemappingEditor.cs.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 0f7cab214f141f642b87a5bdbd14653e -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Editor/ImageEffects/VignetteAndChromaticAberrationEditor.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Editor/ImageEffects/VignetteAndChromaticAberrationEditor.cs deleted file mode 100644 index 7ccec20..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Editor/ImageEffects/VignetteAndChromaticAberrationEditor.cs +++ /dev/null @@ -1,62 +0,0 @@ -using System; -using UnityEditor; -using UnityEngine; - -namespace UnityStandardAssets.ImageEffects -{ - [CustomEditor (typeof(VignetteAndChromaticAberration))] - class VignetteAndChromaticAberrationEditor : Editor - { - private SerializedObject m_SerObj; - private SerializedProperty m_Mode; - private SerializedProperty m_Intensity; // intensity == 0 disables pre pass (optimization) - private SerializedProperty m_ChromaticAberration; - private SerializedProperty m_AxialAberration; - private SerializedProperty m_Blur; // blur == 0 disables blur pass (optimization) - private SerializedProperty m_BlurSpread; - private SerializedProperty m_BlurDistance; - private SerializedProperty m_LuminanceDependency; - - - void OnEnable () - { - m_SerObj = new SerializedObject (target); - m_Mode = m_SerObj.FindProperty ("mode"); - m_Intensity = m_SerObj.FindProperty ("intensity"); - m_ChromaticAberration = m_SerObj.FindProperty ("chromaticAberration"); - m_AxialAberration = m_SerObj.FindProperty ("axialAberration"); - m_Blur = m_SerObj.FindProperty ("blur"); - m_BlurSpread = m_SerObj.FindProperty ("blurSpread"); - m_LuminanceDependency = m_SerObj.FindProperty ("luminanceDependency"); - m_BlurDistance = m_SerObj.FindProperty ("blurDistance"); - } - - - public override void OnInspectorGUI () - { - m_SerObj.Update (); - - EditorGUILayout.LabelField("Simulates the common lens artifacts 'Vignette' and 'Aberration'", EditorStyles.miniLabel); - - EditorGUILayout.Slider(m_Intensity, 0.0f, 1.0f, new GUIContent("Vignetting")); - EditorGUILayout.Slider(m_Blur, 0.0f, 1.0f, new GUIContent(" Blurred Corners")); - if (m_Blur.floatValue>0.0f) - EditorGUILayout.Slider(m_BlurSpread, 0.0f, 1.0f, new GUIContent(" Blur Distance")); - - EditorGUILayout.Separator (); - - EditorGUILayout.PropertyField (m_Mode, new GUIContent("Aberration")); - if (m_Mode.intValue>0) - { - EditorGUILayout.Slider(m_ChromaticAberration, 0.0f, 5.0f, new GUIContent(" Tangential Aberration")); - EditorGUILayout.Slider(m_AxialAberration, 0.0f, 5.0f, new GUIContent(" Axial Aberration")); - m_LuminanceDependency.floatValue = EditorGUILayout.Slider(" Contrast Dependency", m_LuminanceDependency.floatValue, 0.001f, 1.0f); - m_BlurDistance.floatValue = EditorGUILayout.Slider(" Blur Distance", m_BlurDistance.floatValue, 0.001f, 5.0f); - } - else - EditorGUILayout.PropertyField (m_ChromaticAberration, new GUIContent(" Chromatic Aberration")); - - m_SerObj.ApplyModifiedProperties(); - } - } -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Editor/ImageEffects/VignetteAndChromaticAberrationEditor.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Editor/ImageEffects/VignetteAndChromaticAberrationEditor.cs.meta deleted file mode 100644 index 278b4eb..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Editor/ImageEffects/VignetteAndChromaticAberrationEditor.cs.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 08126bf2baa528c4cb9c60340a24e5d6 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Editor/KinectCopyPluginDataHelper.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Editor/KinectCopyPluginDataHelper.cs deleted file mode 100644 index b94333d..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Editor/KinectCopyPluginDataHelper.cs +++ /dev/null @@ -1,70 +0,0 @@ -using UnityEngine; -using UnityEditor; -using System; -using System.Collections.Generic; -using System.IO; - -public static class KinectCopyPluginDataHelper -{ - private const string DataDirSuffix = "_Data"; - private const string PluginsDirName = "Plugins"; - - private static Dictionary TargetToDirName = new Dictionary() - { - {BuildTarget.StandaloneWindows, "x86"}, - {BuildTarget.StandaloneWindows64, "x86_64"} - }; - - public static void CopyPluginData(BuildTarget target, string buildTargetPath, string subDirToCopy) - { - string subDirName; - if (!TargetToDirName.TryGetValue (target, out subDirName)) - { - // No work to do - return; - } - - // Get Required Paths - var buildName = Path.GetFileNameWithoutExtension(buildTargetPath); - var targetDir = Directory.GetParent(buildTargetPath); - var separator = Path.DirectorySeparatorChar; - - var buildDataDir = targetDir.FullName + separator + buildName + DataDirSuffix + separator; - var tgtPluginsDir = buildDataDir + separator + PluginsDirName + separator + subDirToCopy + separator; - var srcPluginsDir = Application.dataPath + separator + PluginsDirName + separator + subDirName + separator + subDirToCopy + separator; - - CopyAll (new DirectoryInfo (srcPluginsDir), new DirectoryInfo(tgtPluginsDir)); - } - - /// - /// Recursive Copy Directory Method - /// - private static void CopyAll(DirectoryInfo source, DirectoryInfo target) - { - // Check if the source directory exists, if not, don't do any work. - if (!Directory.Exists(source.FullName)) - { - return; - } - - // Check if the target directory exists, if not, create it. - if (!Directory.Exists(target.FullName)) - { - Directory.CreateDirectory(target.FullName); - } - - // Copy each file into it’s new directory. - foreach (var fileInfo in source.GetFiles()) - { - fileInfo.CopyTo (Path.Combine (target.ToString (), fileInfo.Name), true); - } - - // Copy each subdirectory using recursion. - foreach (var subDirInfo in source.GetDirectories()) - { - DirectoryInfo nextTargetSubDir = target.CreateSubdirectory(subDirInfo.Name); - CopyAll(subDirInfo, nextTargetSubDir); - } - } - -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Editor/KinectCopyPluginDataHelper.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Editor/KinectCopyPluginDataHelper.cs.meta deleted file mode 100644 index 9b34d13..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Editor/KinectCopyPluginDataHelper.cs.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: a103df75c03c9c54096627354fdb1398 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects.meta deleted file mode 100644 index fc4ec9c..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects.meta +++ /dev/null @@ -1,6 +0,0 @@ -fileFormatVersion: 2 -guid: 115d1f9d9bd29064ab981e57c8fc8cdf -folderAsset: yes -DefaultImporter: - userData: - assetBundleName: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects.meta deleted file mode 100644 index 5b717ba..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects.meta +++ /dev/null @@ -1,6 +0,0 @@ -fileFormatVersion: 2 -guid: d6e0c95a128e14227939c51b5d9ad74e -folderAsset: yes -DefaultImporter: - userData: - assetBundleName: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts.meta deleted file mode 100644 index 0ca768e..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts.meta +++ /dev/null @@ -1,6 +0,0 @@ -fileFormatVersion: 2 -guid: cd3e1490c3d9a7a498538315414d5129 -folderAsset: yes -DefaultImporter: - userData: - assetBundleName: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/Antialiasing.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/Antialiasing.cs deleted file mode 100644 index fdecc11..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/Antialiasing.cs +++ /dev/null @@ -1,177 +0,0 @@ -using System; -using UnityEngine; - -namespace UnityStandardAssets.ImageEffects -{ - public enum AAMode - { - FXAA2 = 0, - FXAA3Console = 1, - FXAA1PresetA = 2, - FXAA1PresetB = 3, - NFAA = 4, - SSAA = 5, - DLAA = 6, - } - - [ExecuteInEditMode] - [RequireComponent(typeof (Camera))] - [AddComponentMenu("Image Effects/Other/Antialiasing")] - public class Antialiasing : PostEffectsBase - { - public AAMode mode = AAMode.FXAA3Console; - - public bool showGeneratedNormals = false; - public float offsetScale = 0.2f; - public float blurRadius = 18.0f; - - public float edgeThresholdMin = 0.05f; - public float edgeThreshold = 0.2f; - public float edgeSharpness = 4.0f; - - public bool dlaaSharp = false; - - public Shader ssaaShader; - private Material ssaa; - public Shader dlaaShader; - private Material dlaa; - public Shader nfaaShader; - private Material nfaa; - public Shader shaderFXAAPreset2; - private Material materialFXAAPreset2; - public Shader shaderFXAAPreset3; - private Material materialFXAAPreset3; - public Shader shaderFXAAII; - private Material materialFXAAII; - public Shader shaderFXAAIII; - private Material materialFXAAIII; - - - public Material CurrentAAMaterial() - { - Material returnValue = null; - - switch (mode) - { - case AAMode.FXAA3Console: - returnValue = materialFXAAIII; - break; - case AAMode.FXAA2: - returnValue = materialFXAAII; - break; - case AAMode.FXAA1PresetA: - returnValue = materialFXAAPreset2; - break; - case AAMode.FXAA1PresetB: - returnValue = materialFXAAPreset3; - break; - case AAMode.NFAA: - returnValue = nfaa; - break; - case AAMode.SSAA: - returnValue = ssaa; - break; - case AAMode.DLAA: - returnValue = dlaa; - break; - default: - returnValue = null; - break; - } - - return returnValue; - } - - - public override bool CheckResources() - { - CheckSupport(false); - - materialFXAAPreset2 = CreateMaterial(shaderFXAAPreset2, materialFXAAPreset2); - materialFXAAPreset3 = CreateMaterial(shaderFXAAPreset3, materialFXAAPreset3); - materialFXAAII = CreateMaterial(shaderFXAAII, materialFXAAII); - materialFXAAIII = CreateMaterial(shaderFXAAIII, materialFXAAIII); - nfaa = CreateMaterial(nfaaShader, nfaa); - ssaa = CreateMaterial(ssaaShader, ssaa); - dlaa = CreateMaterial(dlaaShader, dlaa); - - if (!ssaaShader.isSupported) - { - NotSupported(); - ReportAutoDisable(); - } - - return isSupported; - } - - - public void OnRenderImage(RenderTexture source, RenderTexture destination) - { - if (CheckResources() == false) - { - Graphics.Blit(source, destination); - return; - } - - // ---------------------------------------------------------------- - // FXAA antialiasing modes - - if (mode == AAMode.FXAA3Console && (materialFXAAIII != null)) - { - materialFXAAIII.SetFloat("_EdgeThresholdMin", edgeThresholdMin); - materialFXAAIII.SetFloat("_EdgeThreshold", edgeThreshold); - materialFXAAIII.SetFloat("_EdgeSharpness", edgeSharpness); - - Graphics.Blit(source, destination, materialFXAAIII); - } - else if (mode == AAMode.FXAA1PresetB && (materialFXAAPreset3 != null)) - { - Graphics.Blit(source, destination, materialFXAAPreset3); - } - else if (mode == AAMode.FXAA1PresetA && materialFXAAPreset2 != null) - { - source.anisoLevel = 4; - Graphics.Blit(source, destination, materialFXAAPreset2); - source.anisoLevel = 0; - } - else if (mode == AAMode.FXAA2 && materialFXAAII != null) - { - Graphics.Blit(source, destination, materialFXAAII); - } - else if (mode == AAMode.SSAA && ssaa != null) - { - // ---------------------------------------------------------------- - // SSAA antialiasing - Graphics.Blit(source, destination, ssaa); - } - else if (mode == AAMode.DLAA && dlaa != null) - { - // ---------------------------------------------------------------- - // DLAA antialiasing - - source.anisoLevel = 0; - RenderTexture interim = RenderTexture.GetTemporary(source.width, source.height); - Graphics.Blit(source, interim, dlaa, 0); - Graphics.Blit(interim, destination, dlaa, dlaaSharp ? 2 : 1); - RenderTexture.ReleaseTemporary(interim); - } - else if (mode == AAMode.NFAA && nfaa != null) - { - // ---------------------------------------------------------------- - // nfaa antialiasing - - source.anisoLevel = 0; - - nfaa.SetFloat("_OffsetScale", offsetScale); - nfaa.SetFloat("_BlurRadius", blurRadius); - - Graphics.Blit(source, destination, nfaa, showGeneratedNormals ? 1 : 0); - } - else - { - // none of the AA is supported, fallback to a simple blit - Graphics.Blit(source, destination); - } - } - } -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/Antialiasing.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/Antialiasing.cs.meta deleted file mode 100644 index 6284674..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/Antialiasing.cs.meta +++ /dev/null @@ -1,16 +0,0 @@ -fileFormatVersion: 2 -guid: 646b5bc27a658f447b1d929fd5ffbd70 -MonoImporter: - serializedVersion: 2 - defaultReferences: - - ssaaShader: {fileID: 4800000, guid: b3728d1488b02490cbd196c7941bf1f8, type: 3} - - dlaaShader: {fileID: 4800000, guid: 017ca72b9e8a749058d13ebd527e98fa, type: 3} - - nfaaShader: {fileID: 4800000, guid: ce0cb2621f6d84e21a87414e471a3cce, type: 3} - - shaderFXAAPreset2: {fileID: 4800000, guid: 6f1418cffd12146f2a83be795f6fa5a7, type: 3} - - shaderFXAAPreset3: {fileID: 4800000, guid: c182fa94a5a0a4c02870641efcd38cd5, type: 3} - - shaderFXAAII: {fileID: 4800000, guid: cd5b323dcc592457790ff18b528f5e67, type: 3} - - shaderFXAAIII: {fileID: 4800000, guid: c547503fff0e8482ea5793727057041c, type: 3} - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/Bloom.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/Bloom.cs deleted file mode 100644 index 2ac20b2..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/Bloom.cs +++ /dev/null @@ -1,363 +0,0 @@ -using System; -using UnityEngine; - -namespace UnityStandardAssets.ImageEffects -{ - [ExecuteInEditMode] - [RequireComponent (typeof(Camera))] - [AddComponentMenu ("Image Effects/Bloom and Glow/Bloom")] - public class Bloom : PostEffectsBase - { - public enum LensFlareStyle - { - Ghosting = 0, - Anamorphic = 1, - Combined = 2, - } - - public enum TweakMode - { - Basic = 0, - Complex = 1, - } - - public enum HDRBloomMode - { - Auto = 0, - On = 1, - Off = 2, - } - - public enum BloomScreenBlendMode - { - Screen = 0, - Add = 1, - } - - public enum BloomQuality - { - Cheap = 0, - High = 1, - } - - public TweakMode tweakMode = 0; - public BloomScreenBlendMode screenBlendMode = BloomScreenBlendMode.Add; - - public HDRBloomMode hdr = HDRBloomMode.Auto; - private bool doHdr = false; - public float sepBlurSpread = 2.5f; - - public BloomQuality quality = BloomQuality.High; - - public float bloomIntensity = 0.5f; - public float bloomThreshold = 0.5f; - public Color bloomThresholdColor = Color.white; - public int bloomBlurIterations = 2; - - public int hollywoodFlareBlurIterations = 2; - public float flareRotation = 0.0f; - public LensFlareStyle lensflareMode = (LensFlareStyle) 1; - public float hollyStretchWidth = 2.5f; - public float lensflareIntensity = 0.0f; - public float lensflareThreshold = 0.3f; - public float lensFlareSaturation = 0.75f; - public Color flareColorA = new Color (0.4f, 0.4f, 0.8f, 0.75f); - public Color flareColorB = new Color (0.4f, 0.8f, 0.8f, 0.75f); - public Color flareColorC = new Color (0.8f, 0.4f, 0.8f, 0.75f); - public Color flareColorD = new Color (0.8f, 0.4f, 0.0f, 0.75f); - public Texture2D lensFlareVignetteMask; - - public Shader lensFlareShader; - private Material lensFlareMaterial; - - public Shader screenBlendShader; - private Material screenBlend; - - public Shader blurAndFlaresShader; - private Material blurAndFlaresMaterial; - - public Shader brightPassFilterShader; - private Material brightPassFilterMaterial; - - - public override bool CheckResources () - { - CheckSupport (false); - - screenBlend = CheckShaderAndCreateMaterial (screenBlendShader, screenBlend); - lensFlareMaterial = CheckShaderAndCreateMaterial(lensFlareShader,lensFlareMaterial); - blurAndFlaresMaterial = CheckShaderAndCreateMaterial (blurAndFlaresShader, blurAndFlaresMaterial); - brightPassFilterMaterial = CheckShaderAndCreateMaterial(brightPassFilterShader, brightPassFilterMaterial); - - if (!isSupported) - ReportAutoDisable (); - return isSupported; - } - - public void OnRenderImage (RenderTexture source, RenderTexture destination) - { - if (CheckResources()==false) - { - Graphics.Blit (source, destination); - return; - } - - // screen blend is not supported when HDR is enabled (will cap values) - - doHdr = false; - if (hdr == HDRBloomMode.Auto) -#if UNITY_5_6_OR_NEWER - doHdr = source.format == RenderTextureFormat.ARGBHalf && GetComponent().allowHDR; -#else - doHdr = source.format == RenderTextureFormat.ARGBHalf && GetComponent().hdr; -#endif - else - { - doHdr = hdr == HDRBloomMode.On; - } - - doHdr = doHdr && supportHDRTextures; - - BloomScreenBlendMode realBlendMode = screenBlendMode; - if (doHdr) - realBlendMode = BloomScreenBlendMode.Add; - - var rtFormat= (doHdr) ? RenderTextureFormat.ARGBHalf : RenderTextureFormat.Default; - var rtW2= source.width/2; - var rtH2= source.height/2; - var rtW4= source.width/4; - var rtH4= source.height/4; - - float widthOverHeight = (1.0f * source.width) / (1.0f * source.height); - float oneOverBaseSize = 1.0f / 512.0f; - - // downsample - RenderTexture quarterRezColor = RenderTexture.GetTemporary (rtW4, rtH4, 0, rtFormat); - RenderTexture halfRezColorDown = RenderTexture.GetTemporary (rtW2, rtH2, 0, rtFormat); - if (quality > BloomQuality.Cheap) { - Graphics.Blit (source, halfRezColorDown, screenBlend, 2); - RenderTexture rtDown4 = RenderTexture.GetTemporary (rtW4, rtH4, 0, rtFormat); - Graphics.Blit (halfRezColorDown, rtDown4, screenBlend, 2); - Graphics.Blit (rtDown4, quarterRezColor, screenBlend, 6); - RenderTexture.ReleaseTemporary(rtDown4); - } - else { - Graphics.Blit (source, halfRezColorDown); - Graphics.Blit (halfRezColorDown, quarterRezColor, screenBlend, 6); - } - RenderTexture.ReleaseTemporary (halfRezColorDown); - - // cut colors (thresholding) - RenderTexture secondQuarterRezColor = RenderTexture.GetTemporary (rtW4, rtH4, 0, rtFormat); - BrightFilter (bloomThreshold * bloomThresholdColor, quarterRezColor, secondQuarterRezColor); - - // blurring - - if (bloomBlurIterations < 1) bloomBlurIterations = 1; - else if (bloomBlurIterations > 10) bloomBlurIterations = 10; - - for (int iter = 0; iter < bloomBlurIterations; iter++) - { - float spreadForPass = (1.0f + (iter * 0.25f)) * sepBlurSpread; - - // vertical blur - RenderTexture blur4 = RenderTexture.GetTemporary (rtW4, rtH4, 0, rtFormat); - blurAndFlaresMaterial.SetVector ("_Offsets", new Vector4 (0.0f, spreadForPass * oneOverBaseSize, 0.0f, 0.0f)); - Graphics.Blit (secondQuarterRezColor, blur4, blurAndFlaresMaterial, 4); - RenderTexture.ReleaseTemporary(secondQuarterRezColor); - secondQuarterRezColor = blur4; - - // horizontal blur - blur4 = RenderTexture.GetTemporary (rtW4, rtH4, 0, rtFormat); - blurAndFlaresMaterial.SetVector ("_Offsets", new Vector4 ((spreadForPass / widthOverHeight) * oneOverBaseSize, 0.0f, 0.0f, 0.0f)); - Graphics.Blit (secondQuarterRezColor, blur4, blurAndFlaresMaterial, 4); - RenderTexture.ReleaseTemporary (secondQuarterRezColor); - secondQuarterRezColor = blur4; - - if (quality > BloomQuality.Cheap) - { - if (iter == 0) - { - Graphics.SetRenderTarget(quarterRezColor); - GL.Clear(false, true, Color.black); // Clear to avoid RT restore - Graphics.Blit (secondQuarterRezColor, quarterRezColor); - } - else - { - quarterRezColor.MarkRestoreExpected(); // using max blending, RT restore expected - Graphics.Blit (secondQuarterRezColor, quarterRezColor, screenBlend, 10); - } - } - } - - if (quality > BloomQuality.Cheap) - { - Graphics.SetRenderTarget(secondQuarterRezColor); - GL.Clear(false, true, Color.black); // Clear to avoid RT restore - Graphics.Blit (quarterRezColor, secondQuarterRezColor, screenBlend, 6); - } - - // lens flares: ghosting, anamorphic or both (ghosted anamorphic flares) - - if (lensflareIntensity > Mathf.Epsilon) - { - - RenderTexture rtFlares4 = RenderTexture.GetTemporary (rtW4, rtH4, 0, rtFormat); - - if (lensflareMode == 0) - { - // ghosting only - - BrightFilter (lensflareThreshold, secondQuarterRezColor, rtFlares4); - - if (quality > BloomQuality.Cheap) - { - // smooth a little - blurAndFlaresMaterial.SetVector ("_Offsets", new Vector4 (0.0f, (1.5f) / (1.0f * quarterRezColor.height), 0.0f, 0.0f)); - Graphics.SetRenderTarget(quarterRezColor); - GL.Clear(false, true, Color.black); // Clear to avoid RT restore - Graphics.Blit (rtFlares4, quarterRezColor, blurAndFlaresMaterial, 4); - - blurAndFlaresMaterial.SetVector ("_Offsets", new Vector4 ((1.5f) / (1.0f * quarterRezColor.width), 0.0f, 0.0f, 0.0f)); - Graphics.SetRenderTarget(rtFlares4); - GL.Clear(false, true, Color.black); // Clear to avoid RT restore - Graphics.Blit (quarterRezColor, rtFlares4, blurAndFlaresMaterial, 4); - } - - // no ugly edges! - Vignette (0.975f, rtFlares4, rtFlares4); - BlendFlares (rtFlares4, secondQuarterRezColor); - } - else - { - - //Vignette (0.975ff, rtFlares4, rtFlares4); - //DrawBorder(rtFlares4, screenBlend, 8); - - float flareXRot = 1.0f * Mathf.Cos(flareRotation); - float flareyRot = 1.0f * Mathf.Sin(flareRotation); - - float stretchWidth = (hollyStretchWidth * 1.0f / widthOverHeight) * oneOverBaseSize; - - blurAndFlaresMaterial.SetVector ("_Offsets", new Vector4 (flareXRot, flareyRot, 0.0f, 0.0f)); - blurAndFlaresMaterial.SetVector ("_Threshhold", new Vector4 (lensflareThreshold, 1.0f, 0.0f, 0.0f)); - blurAndFlaresMaterial.SetVector ("_TintColor", new Vector4 (flareColorA.r, flareColorA.g, flareColorA.b, flareColorA.a) * flareColorA.a * lensflareIntensity); - blurAndFlaresMaterial.SetFloat ("_Saturation", lensFlareSaturation); - - // "pre and cut" - quarterRezColor.DiscardContents(); - Graphics.Blit (rtFlares4, quarterRezColor, blurAndFlaresMaterial, 2); - // "post" - rtFlares4.DiscardContents(); - Graphics.Blit (quarterRezColor, rtFlares4, blurAndFlaresMaterial, 3); - - blurAndFlaresMaterial.SetVector ("_Offsets", new Vector4 (flareXRot * stretchWidth, flareyRot * stretchWidth, 0.0f, 0.0f)); - // stretch 1st - blurAndFlaresMaterial.SetFloat ("_StretchWidth", hollyStretchWidth); - quarterRezColor.DiscardContents(); - Graphics.Blit (rtFlares4, quarterRezColor, blurAndFlaresMaterial, 1); - // stretch 2nd - blurAndFlaresMaterial.SetFloat ("_StretchWidth", hollyStretchWidth * 2.0f); - rtFlares4.DiscardContents(); - Graphics.Blit (quarterRezColor, rtFlares4, blurAndFlaresMaterial, 1); - // stretch 3rd - blurAndFlaresMaterial.SetFloat ("_StretchWidth", hollyStretchWidth * 4.0f); - quarterRezColor.DiscardContents(); - Graphics.Blit (rtFlares4, quarterRezColor, blurAndFlaresMaterial, 1); - - // additional blur passes - for (int iter = 0; iter < hollywoodFlareBlurIterations; iter++) - { - stretchWidth = (hollyStretchWidth * 2.0f / widthOverHeight) * oneOverBaseSize; - - blurAndFlaresMaterial.SetVector ("_Offsets", new Vector4 (stretchWidth * flareXRot, stretchWidth * flareyRot, 0.0f, 0.0f)); - rtFlares4.DiscardContents(); - Graphics.Blit (quarterRezColor, rtFlares4, blurAndFlaresMaterial, 4); - - blurAndFlaresMaterial.SetVector ("_Offsets", new Vector4 (stretchWidth * flareXRot, stretchWidth * flareyRot, 0.0f, 0.0f)); - quarterRezColor.DiscardContents(); - Graphics.Blit (rtFlares4, quarterRezColor, blurAndFlaresMaterial, 4); - } - - if (lensflareMode == (LensFlareStyle) 1) - // anamorphic lens flares - AddTo (1.0f, quarterRezColor, secondQuarterRezColor); - else - { - // "combined" lens flares - - Vignette (1.0f, quarterRezColor, rtFlares4); - BlendFlares (rtFlares4, quarterRezColor); - AddTo (1.0f, quarterRezColor, secondQuarterRezColor); - } - } - RenderTexture.ReleaseTemporary (rtFlares4); - } - - int blendPass = (int) realBlendMode; - //if (Mathf.Abs(chromaticBloom) < Mathf.Epsilon) - // blendPass += 4; - - screenBlend.SetFloat ("_Intensity", bloomIntensity); - screenBlend.SetTexture ("_ColorBuffer", source); - - if (quality > BloomQuality.Cheap) - { - RenderTexture halfRezColorUp = RenderTexture.GetTemporary (rtW2, rtH2, 0, rtFormat); - Graphics.Blit (secondQuarterRezColor, halfRezColorUp); - Graphics.Blit (halfRezColorUp, destination, screenBlend, blendPass); - RenderTexture.ReleaseTemporary (halfRezColorUp); - } - else - Graphics.Blit (secondQuarterRezColor, destination, screenBlend, blendPass); - - RenderTexture.ReleaseTemporary (quarterRezColor); - RenderTexture.ReleaseTemporary (secondQuarterRezColor); - } - - private void AddTo (float intensity_, RenderTexture from, RenderTexture to) - { - screenBlend.SetFloat ("_Intensity", intensity_); - to.MarkRestoreExpected(); // additive blending, RT restore expected - Graphics.Blit (from, to, screenBlend, 9); - } - - private void BlendFlares (RenderTexture from, RenderTexture to) - { - lensFlareMaterial.SetVector ("colorA", new Vector4 (flareColorA.r, flareColorA.g, flareColorA.b, flareColorA.a) * lensflareIntensity); - lensFlareMaterial.SetVector ("colorB", new Vector4 (flareColorB.r, flareColorB.g, flareColorB.b, flareColorB.a) * lensflareIntensity); - lensFlareMaterial.SetVector ("colorC", new Vector4 (flareColorC.r, flareColorC.g, flareColorC.b, flareColorC.a) * lensflareIntensity); - lensFlareMaterial.SetVector ("colorD", new Vector4 (flareColorD.r, flareColorD.g, flareColorD.b, flareColorD.a) * lensflareIntensity); - to.MarkRestoreExpected(); // additive blending, RT restore expected - Graphics.Blit (from, to, lensFlareMaterial); - } - - private void BrightFilter (float thresh, RenderTexture from, RenderTexture to) - { - brightPassFilterMaterial.SetVector ("_Threshhold", new Vector4 (thresh, thresh, thresh, thresh)); - Graphics.Blit (from, to, brightPassFilterMaterial, 0); - } - - private void BrightFilter (Color threshColor, RenderTexture from, RenderTexture to) - { - brightPassFilterMaterial.SetVector ("_Threshhold", threshColor); - Graphics.Blit (from, to, brightPassFilterMaterial, 1); - } - - private void Vignette (float amount, RenderTexture from, RenderTexture to) - { - if (lensFlareVignetteMask) - { - screenBlend.SetTexture ("_ColorBuffer", lensFlareVignetteMask); - to.MarkRestoreExpected(); // using blending, RT restore expected - Graphics.Blit (from == to ? null : from, to, screenBlend, from == to ? 7 : 3); - } - else if (from != to) - { - Graphics.SetRenderTarget (to); - GL.Clear(false, true, Color.black); // clear destination to avoid RT restore - Graphics.Blit (from, to); - } - } - } -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/Bloom.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/Bloom.cs.meta deleted file mode 100644 index edcd45d..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/Bloom.cs.meta +++ /dev/null @@ -1,17 +0,0 @@ -fileFormatVersion: 2 -guid: 7fceaeb339b971b429c4cc600acabd13 -MonoImporter: - serializedVersion: 2 - defaultReferences: - - lensFlareVignetteMask: {fileID: 2800000, guid: 95ef4804fe0be4c999ddaa383536cde8, - type: 3} - - lensFlareShader: {fileID: 4800000, guid: 459fe69d2f6d74ddb92f04dbf45a866b, type: 3} - - screenBlendShader: {fileID: 4800000, guid: 7856cbff0a0ca45c787d5431eb805bb0, type: 3} - - blurAndFlaresShader: {fileID: 4800000, guid: be6e39cf196f146d5be72fbefb18ed75, - type: 3} - - brightPassFilterShader: {fileID: 4800000, guid: 0aeaa4cb29f5d4e9c8455f04c8575c8c, - type: 3} - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/BloomAndFlares.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/BloomAndFlares.cs deleted file mode 100644 index 4cb19e4..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/BloomAndFlares.cs +++ /dev/null @@ -1,318 +0,0 @@ -using System; -using UnityEngine; - -namespace UnityStandardAssets.ImageEffects -{ - public enum LensflareStyle34 - { - Ghosting = 0, - Anamorphic = 1, - Combined = 2, - } - - public enum TweakMode34 - { - Basic = 0, - Complex = 1, - } - - public enum HDRBloomMode - { - Auto = 0, - On = 1, - Off = 2, - } - - public enum BloomScreenBlendMode - { - Screen = 0, - Add = 1, - } - - [ExecuteInEditMode] - [RequireComponent(typeof(Camera))] - [AddComponentMenu("Image Effects/Bloom and Glow/BloomAndFlares (3.5, Deprecated)")] - public class BloomAndFlares : PostEffectsBase - { - public TweakMode34 tweakMode = 0; - public BloomScreenBlendMode screenBlendMode = BloomScreenBlendMode.Add; - - public HDRBloomMode hdr = HDRBloomMode.Auto; - private bool doHdr = false; - public float sepBlurSpread = 1.5f; - public float useSrcAlphaAsMask = 0.5f; - - public float bloomIntensity = 1.0f; - public float bloomThreshold = 0.5f; - public int bloomBlurIterations = 2; - - public bool lensflares = false; - public int hollywoodFlareBlurIterations = 2; - public LensflareStyle34 lensflareMode = (LensflareStyle34)1; - public float hollyStretchWidth = 3.5f; - public float lensflareIntensity = 1.0f; - public float lensflareThreshold = 0.3f; - public Color flareColorA = new Color(0.4f, 0.4f, 0.8f, 0.75f); - public Color flareColorB = new Color(0.4f, 0.8f, 0.8f, 0.75f); - public Color flareColorC = new Color(0.8f, 0.4f, 0.8f, 0.75f); - public Color flareColorD = new Color(0.8f, 0.4f, 0.0f, 0.75f); - public Texture2D lensFlareVignetteMask; - - public Shader lensFlareShader; - private Material lensFlareMaterial; - - public Shader vignetteShader; - private Material vignetteMaterial; - - public Shader separableBlurShader; - private Material separableBlurMaterial; - - public Shader addBrightStuffOneOneShader; - private Material addBrightStuffBlendOneOneMaterial; - - public Shader screenBlendShader; - private Material screenBlend; - - public Shader hollywoodFlaresShader; - private Material hollywoodFlaresMaterial; - - public Shader brightPassFilterShader; - private Material brightPassFilterMaterial; - - - public override bool CheckResources() - { - CheckSupport(false); - - screenBlend = CheckShaderAndCreateMaterial(screenBlendShader, screenBlend); - lensFlareMaterial = CheckShaderAndCreateMaterial(lensFlareShader, lensFlareMaterial); - vignetteMaterial = CheckShaderAndCreateMaterial(vignetteShader, vignetteMaterial); - separableBlurMaterial = CheckShaderAndCreateMaterial(separableBlurShader, separableBlurMaterial); - addBrightStuffBlendOneOneMaterial = CheckShaderAndCreateMaterial(addBrightStuffOneOneShader, addBrightStuffBlendOneOneMaterial); - hollywoodFlaresMaterial = CheckShaderAndCreateMaterial(hollywoodFlaresShader, hollywoodFlaresMaterial); - brightPassFilterMaterial = CheckShaderAndCreateMaterial(brightPassFilterShader, brightPassFilterMaterial); - - if (!isSupported) - ReportAutoDisable(); - return isSupported; - } - - void OnRenderImage(RenderTexture source, RenderTexture destination) - { - if (CheckResources() == false) - { - Graphics.Blit(source, destination); - return; - } - - // screen blend is not supported when HDR is enabled (will cap values) - - doHdr = false; - if (hdr == HDRBloomMode.Auto) -#if UNITY_5_6_OR_NEWER - doHdr = source.format == RenderTextureFormat.ARGBHalf && GetComponent().allowHDR; -#else - doHdr = source.format == RenderTextureFormat.ARGBHalf && GetComponent().hdr; -#endif - else - { - doHdr = hdr == HDRBloomMode.On; - } - - doHdr = doHdr && supportHDRTextures; - - BloomScreenBlendMode realBlendMode = screenBlendMode; - if (doHdr) - realBlendMode = BloomScreenBlendMode.Add; - - var rtFormat = (doHdr) ? RenderTextureFormat.ARGBHalf : RenderTextureFormat.Default; - RenderTexture halfRezColor = RenderTexture.GetTemporary(source.width / 2, source.height / 2, 0, rtFormat); - RenderTexture quarterRezColor = RenderTexture.GetTemporary(source.width / 4, source.height / 4, 0, rtFormat); - RenderTexture secondQuarterRezColor = RenderTexture.GetTemporary(source.width / 4, source.height / 4, 0, rtFormat); - RenderTexture thirdQuarterRezColor = RenderTexture.GetTemporary(source.width / 4, source.height / 4, 0, rtFormat); - - float widthOverHeight = (1.0f * source.width) / (1.0f * source.height); - float oneOverBaseSize = 1.0f / 512.0f; - - // downsample - - Graphics.Blit(source, halfRezColor, screenBlend, 2); // <- 2 is stable downsample - Graphics.Blit(halfRezColor, quarterRezColor, screenBlend, 2); // <- 2 is stable downsample - - RenderTexture.ReleaseTemporary(halfRezColor); - - // cut colors (thresholding) - - BrightFilter(bloomThreshold, useSrcAlphaAsMask, quarterRezColor, secondQuarterRezColor); - quarterRezColor.DiscardContents(); - - // blurring - - if (bloomBlurIterations < 1) bloomBlurIterations = 1; - - for (int iter = 0; iter < bloomBlurIterations; iter++) - { - float spreadForPass = (1.0f + (iter * 0.5f)) * sepBlurSpread; - separableBlurMaterial.SetVector("offsets", new Vector4(0.0f, spreadForPass * oneOverBaseSize, 0.0f, 0.0f)); - - RenderTexture src = iter == 0 ? secondQuarterRezColor : quarterRezColor; - Graphics.Blit(src, thirdQuarterRezColor, separableBlurMaterial); - src.DiscardContents(); - - separableBlurMaterial.SetVector("offsets", new Vector4((spreadForPass / widthOverHeight) * oneOverBaseSize, 0.0f, 0.0f, 0.0f)); - Graphics.Blit(thirdQuarterRezColor, quarterRezColor, separableBlurMaterial); - thirdQuarterRezColor.DiscardContents(); - } - - // lens flares: ghosting, anamorphic or a combination - - if (lensflares) - { - - if (lensflareMode == 0) - { - - BrightFilter(lensflareThreshold, 0.0f, quarterRezColor, thirdQuarterRezColor); - quarterRezColor.DiscardContents(); - - // smooth a little, this needs to be resolution dependent - /* - separableBlurMaterial.SetVector ("offsets", Vector4 (0.0ff, (2.0ff) / (1.0ff * quarterRezColor.height), 0.0ff, 0.0ff)); - Graphics.Blit (thirdQuarterRezColor, secondQuarterRezColor, separableBlurMaterial); - separableBlurMaterial.SetVector ("offsets", Vector4 ((2.0ff) / (1.0ff * quarterRezColor.width), 0.0ff, 0.0ff, 0.0ff)); - Graphics.Blit (secondQuarterRezColor, thirdQuarterRezColor, separableBlurMaterial); - */ - // no ugly edges! - - Vignette(0.975f, thirdQuarterRezColor, secondQuarterRezColor); - thirdQuarterRezColor.DiscardContents(); - - BlendFlares(secondQuarterRezColor, quarterRezColor); - secondQuarterRezColor.DiscardContents(); - } - - // (b) hollywood/anamorphic flares? - - else - { - - // thirdQuarter has the brightcut unblurred colors - // quarterRezColor is the blurred, brightcut buffer that will end up as bloom - - hollywoodFlaresMaterial.SetVector("_threshold", new Vector4(lensflareThreshold, 1.0f / (1.0f - lensflareThreshold), 0.0f, 0.0f)); - hollywoodFlaresMaterial.SetVector("tintColor", new Vector4(flareColorA.r, flareColorA.g, flareColorA.b, flareColorA.a) * flareColorA.a * lensflareIntensity); - Graphics.Blit(thirdQuarterRezColor, secondQuarterRezColor, hollywoodFlaresMaterial, 2); - thirdQuarterRezColor.DiscardContents(); - - Graphics.Blit(secondQuarterRezColor, thirdQuarterRezColor, hollywoodFlaresMaterial, 3); - secondQuarterRezColor.DiscardContents(); - - hollywoodFlaresMaterial.SetVector("offsets", new Vector4((sepBlurSpread * 1.0f / widthOverHeight) * oneOverBaseSize, 0.0f, 0.0f, 0.0f)); - hollywoodFlaresMaterial.SetFloat("stretchWidth", hollyStretchWidth); - Graphics.Blit(thirdQuarterRezColor, secondQuarterRezColor, hollywoodFlaresMaterial, 1); - thirdQuarterRezColor.DiscardContents(); - - hollywoodFlaresMaterial.SetFloat("stretchWidth", hollyStretchWidth * 2.0f); - Graphics.Blit(secondQuarterRezColor, thirdQuarterRezColor, hollywoodFlaresMaterial, 1); - secondQuarterRezColor.DiscardContents(); - - hollywoodFlaresMaterial.SetFloat("stretchWidth", hollyStretchWidth * 4.0f); - Graphics.Blit(thirdQuarterRezColor, secondQuarterRezColor, hollywoodFlaresMaterial, 1); - thirdQuarterRezColor.DiscardContents(); - - if (lensflareMode == (LensflareStyle34)1) - { - for (int itera = 0; itera < hollywoodFlareBlurIterations; itera++) - { - separableBlurMaterial.SetVector("offsets", new Vector4((hollyStretchWidth * 2.0f / widthOverHeight) * oneOverBaseSize, 0.0f, 0.0f, 0.0f)); - Graphics.Blit(secondQuarterRezColor, thirdQuarterRezColor, separableBlurMaterial); - secondQuarterRezColor.DiscardContents(); - - separableBlurMaterial.SetVector("offsets", new Vector4((hollyStretchWidth * 2.0f / widthOverHeight) * oneOverBaseSize, 0.0f, 0.0f, 0.0f)); - Graphics.Blit(thirdQuarterRezColor, secondQuarterRezColor, separableBlurMaterial); - thirdQuarterRezColor.DiscardContents(); - } - - AddTo(1.0f, secondQuarterRezColor, quarterRezColor); - secondQuarterRezColor.DiscardContents(); - } - else - { - - // (c) combined - - for (int ix = 0; ix < hollywoodFlareBlurIterations; ix++) - { - separableBlurMaterial.SetVector("offsets", new Vector4((hollyStretchWidth * 2.0f / widthOverHeight) * oneOverBaseSize, 0.0f, 0.0f, 0.0f)); - Graphics.Blit(secondQuarterRezColor, thirdQuarterRezColor, separableBlurMaterial); - secondQuarterRezColor.DiscardContents(); - - separableBlurMaterial.SetVector("offsets", new Vector4((hollyStretchWidth * 2.0f / widthOverHeight) * oneOverBaseSize, 0.0f, 0.0f, 0.0f)); - Graphics.Blit(thirdQuarterRezColor, secondQuarterRezColor, separableBlurMaterial); - thirdQuarterRezColor.DiscardContents(); - } - - Vignette(1.0f, secondQuarterRezColor, thirdQuarterRezColor); - secondQuarterRezColor.DiscardContents(); - - BlendFlares(thirdQuarterRezColor, secondQuarterRezColor); - thirdQuarterRezColor.DiscardContents(); - - AddTo(1.0f, secondQuarterRezColor, quarterRezColor); - secondQuarterRezColor.DiscardContents(); - } - } - } - - // screen blend bloom results to color buffer - - screenBlend.SetFloat("_Intensity", bloomIntensity); - screenBlend.SetTexture("_ColorBuffer", source); - Graphics.Blit(quarterRezColor, destination, screenBlend, (int)realBlendMode); - - RenderTexture.ReleaseTemporary(quarterRezColor); - RenderTexture.ReleaseTemporary(secondQuarterRezColor); - RenderTexture.ReleaseTemporary(thirdQuarterRezColor); - } - - private void AddTo(float intensity_, RenderTexture from, RenderTexture to) - { - addBrightStuffBlendOneOneMaterial.SetFloat("_Intensity", intensity_); - Graphics.Blit(from, to, addBrightStuffBlendOneOneMaterial); - } - - private void BlendFlares(RenderTexture from, RenderTexture to) - { - lensFlareMaterial.SetVector("colorA", new Vector4(flareColorA.r, flareColorA.g, flareColorA.b, flareColorA.a) * lensflareIntensity); - lensFlareMaterial.SetVector("colorB", new Vector4(flareColorB.r, flareColorB.g, flareColorB.b, flareColorB.a) * lensflareIntensity); - lensFlareMaterial.SetVector("colorC", new Vector4(flareColorC.r, flareColorC.g, flareColorC.b, flareColorC.a) * lensflareIntensity); - lensFlareMaterial.SetVector("colorD", new Vector4(flareColorD.r, flareColorD.g, flareColorD.b, flareColorD.a) * lensflareIntensity); - Graphics.Blit(from, to, lensFlareMaterial); - } - - private void BrightFilter(float thresh, float useAlphaAsMask, RenderTexture from, RenderTexture to) - { - if (doHdr) - brightPassFilterMaterial.SetVector("threshold", new Vector4(thresh, 1.0f, 0.0f, 0.0f)); - else - brightPassFilterMaterial.SetVector("threshold", new Vector4(thresh, 1.0f / (1.0f - thresh), 0.0f, 0.0f)); - brightPassFilterMaterial.SetFloat("useSrcAlphaAsMask", useAlphaAsMask); - Graphics.Blit(from, to, brightPassFilterMaterial); - } - - private void Vignette(float amount, RenderTexture from, RenderTexture to) - { - if (lensFlareVignetteMask) - { - screenBlend.SetTexture("_ColorBuffer", lensFlareVignetteMask); - Graphics.Blit(from, to, screenBlend, 3); - } - else - { - vignetteMaterial.SetFloat("vignetteIntensity", amount); - Graphics.Blit(from, to, vignetteMaterial); - } - } - - } -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/BloomAndFlares.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/BloomAndFlares.cs.meta deleted file mode 100644 index d3b3c7b..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/BloomAndFlares.cs.meta +++ /dev/null @@ -1,22 +0,0 @@ -fileFormatVersion: 2 -guid: 02536f33053638549ab5c50ff3ecc0de -MonoImporter: - serializedVersion: 2 - defaultReferences: - - lensFlareVignetteMask: {fileID: 2800000, guid: 95ef4804fe0be4c999ddaa383536cde8, - type: 3} - - lensFlareShader: {fileID: 4800000, guid: 459fe69d2f6d74ddb92f04dbf45a866b, type: 3} - - vignetteShader: {fileID: 4800000, guid: 627943dc7a9a74286b70a4f694a0acd5, type: 3} - - separableBlurShader: {fileID: 4800000, guid: a9df009a214e24a5ebbf271595f8d5b6, - type: 3} - - addBrightStuffOneOneShader: {fileID: 4800000, guid: f7898d203e9b94c0dbe2bf9dd5cb32c0, - type: 3} - - screenBlendShader: {fileID: 4800000, guid: 53b3960ee3d3d4a5caa8d5473d120187, type: 3} - - hollywoodFlaresShader: {fileID: 4800000, guid: e2baf3cae8edc4daf94c9adc2154be00, - type: 3} - - brightPassFilterShader: {fileID: 4800000, guid: 186c4c0d31e314f049595dcbaf4ca129, - type: 3} - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/BloomOptimized.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/BloomOptimized.cs deleted file mode 100644 index f7d9251..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/BloomOptimized.cs +++ /dev/null @@ -1,109 +0,0 @@ -using System; -using UnityEngine; - -namespace UnityStandardAssets.ImageEffects -{ - [ExecuteInEditMode] - [RequireComponent (typeof(Camera))] - [AddComponentMenu ("Image Effects/Bloom and Glow/Bloom (Optimized)")] - public class BloomOptimized : PostEffectsBase - { - - public enum Resolution - { - Low = 0, - High = 1, - } - - public enum BlurType - { - Standard = 0, - Sgx = 1, - } - - [Range(0.0f, 1.5f)] - public float threshold = 0.25f; - [Range(0.0f, 2.5f)] - public float intensity = 0.75f; - - [Range(0.25f, 5.5f)] - public float blurSize = 1.0f; - - Resolution resolution = Resolution.Low; - [Range(1, 4)] - public int blurIterations = 1; - - public BlurType blurType= BlurType.Standard; - - public Shader fastBloomShader = null; - private Material fastBloomMaterial = null; - - - public override bool CheckResources () - { - CheckSupport (false); - - fastBloomMaterial = CheckShaderAndCreateMaterial (fastBloomShader, fastBloomMaterial); - - if (!isSupported) - ReportAutoDisable (); - return isSupported; - } - - void OnDisable () - { - if (fastBloomMaterial) - DestroyImmediate (fastBloomMaterial); - } - - void OnRenderImage (RenderTexture source, RenderTexture destination) - { - if (CheckResources() == false) - { - Graphics.Blit (source, destination); - return; - } - - int divider = resolution == Resolution.Low ? 4 : 2; - float widthMod = resolution == Resolution.Low ? 0.5f : 1.0f; - - fastBloomMaterial.SetVector ("_Parameter", new Vector4 (blurSize * widthMod, 0.0f, threshold, intensity)); - source.filterMode = FilterMode.Bilinear; - - var rtW= source.width/divider; - var rtH= source.height/divider; - - // downsample - RenderTexture rt = RenderTexture.GetTemporary (rtW, rtH, 0, source.format); - rt.filterMode = FilterMode.Bilinear; - Graphics.Blit (source, rt, fastBloomMaterial, 1); - - var passOffs= blurType == BlurType.Standard ? 0 : 2; - - for(int i = 0; i < blurIterations; i++) - { - fastBloomMaterial.SetVector ("_Parameter", new Vector4 (blurSize * widthMod + (i*1.0f), 0.0f, threshold, intensity)); - - // vertical blur - RenderTexture rt2 = RenderTexture.GetTemporary (rtW, rtH, 0, source.format); - rt2.filterMode = FilterMode.Bilinear; - Graphics.Blit (rt, rt2, fastBloomMaterial, 2 + passOffs); - RenderTexture.ReleaseTemporary (rt); - rt = rt2; - - // horizontal blur - rt2 = RenderTexture.GetTemporary (rtW, rtH, 0, source.format); - rt2.filterMode = FilterMode.Bilinear; - Graphics.Blit (rt, rt2, fastBloomMaterial, 3 + passOffs); - RenderTexture.ReleaseTemporary (rt); - rt = rt2; - } - - fastBloomMaterial.SetTexture ("_Bloom", rt); - - Graphics.Blit (source, destination, fastBloomMaterial, 0); - - RenderTexture.ReleaseTemporary (rt); - } - } -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/BloomOptimized.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/BloomOptimized.cs.meta deleted file mode 100644 index 68dcfc1..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/BloomOptimized.cs.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 4975a6e437fc3b149a8cd508ce5bdd69 -MonoImporter: - serializedVersion: 2 - defaultReferences: - - fastBloomShader: {fileID: 4800000, guid: 68a00c837b82e4c6d92e7da765dc5f1d, type: 3} - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/Blur.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/Blur.cs deleted file mode 100644 index 1db8a3f..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/Blur.cs +++ /dev/null @@ -1,108 +0,0 @@ -using System; -using UnityEngine; - -namespace UnityStandardAssets.ImageEffects -{ - [ExecuteInEditMode] - [AddComponentMenu("Image Effects/Blur/Blur")] - public class Blur : MonoBehaviour - { - /// Blur iterations - larger number means more blur. - [Range(0,10)] - public int iterations = 3; - - /// Blur spread for each iteration. Lower values - /// give better looking blur, but require more iterations to - /// get large blurs. Value is usually between 0.5 and 1.0. - [Range(0.0f,1.0f)] - public float blurSpread = 0.6f; - - - // -------------------------------------------------------- - // The blur iteration shader. - // Basically it just takes 4 texture samples and averages them. - // By applying it repeatedly and spreading out sample locations - // we get a Gaussian blur approximation. - - public Shader blurShader = null; - - static Material m_Material = null; - protected Material material { - get { - if (m_Material == null) { - m_Material = new Material(blurShader); - m_Material.hideFlags = HideFlags.DontSave; - } - return m_Material; - } - } - - protected void OnDisable() { - if ( m_Material ) { - DestroyImmediate( m_Material ); - } - } - - // -------------------------------------------------------- - - protected void Start() - { - // Disable if we don't support image effects - if (!SystemInfo.supportsImageEffects) { - enabled = false; - return; - } - // Disable if the shader can't run on the users graphics card - if (!blurShader || !material.shader.isSupported) { - enabled = false; - return; - } - } - - // Performs one blur iteration. - public void FourTapCone (RenderTexture source, RenderTexture dest, int iteration) - { - float off = 0.5f + iteration*blurSpread; - Graphics.BlitMultiTap (source, dest, material, - new Vector2(-off, -off), - new Vector2(-off, off), - new Vector2( off, off), - new Vector2( off, -off) - ); - } - - // Downsamples the texture to a quarter resolution. - private void DownSample4x (RenderTexture source, RenderTexture dest) - { - float off = 1.0f; - Graphics.BlitMultiTap (source, dest, material, - new Vector2(-off, -off), - new Vector2(-off, off), - new Vector2( off, off), - new Vector2( off, -off) - ); - } - - // Called by the camera to apply the image effect - void OnRenderImage (RenderTexture source, RenderTexture destination) { - int rtW = source.width/4; - int rtH = source.height/4; - RenderTexture buffer = RenderTexture.GetTemporary(rtW, rtH, 0); - - // Copy source to the 4x4 smaller texture. - DownSample4x (source, buffer); - - // Blur the small texture - for(int i = 0; i < iterations; i++) - { - RenderTexture buffer2 = RenderTexture.GetTemporary(rtW, rtH, 0); - FourTapCone (buffer, buffer2, i); - RenderTexture.ReleaseTemporary(buffer); - buffer = buffer2; - } - Graphics.Blit(buffer, destination); - - RenderTexture.ReleaseTemporary(buffer); - } - } -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/Blur.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/Blur.cs.meta deleted file mode 100644 index c4bb7e7..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/Blur.cs.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 34382083ad114a07d000fbfb8d76c639 -MonoImporter: - serializedVersion: 2 - defaultReferences: - - blurShader: {fileID: 4800000, guid: 57e6deea7c2924e22a5138e2b70bb4dc, type: 3} - executionOrder: 0 - icon: {instanceID: 0} - userData: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/BlurOptimized.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/BlurOptimized.cs deleted file mode 100644 index c922dbe..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/BlurOptimized.cs +++ /dev/null @@ -1,93 +0,0 @@ -using System; -using UnityEngine; - -namespace UnityStandardAssets.ImageEffects -{ - [ExecuteInEditMode] - [RequireComponent (typeof(Camera))] - [AddComponentMenu ("Image Effects/Blur/Blur (Optimized)")] - public class BlurOptimized : PostEffectsBase - { - - [Range(0, 2)] - public int downsample = 1; - - public enum BlurType { - StandardGauss = 0, - SgxGauss = 1, - } - - [Range(0.0f, 10.0f)] - public float blurSize = 3.0f; - - [Range(1, 4)] - public int blurIterations = 2; - - public BlurType blurType= BlurType.StandardGauss; - - public Shader blurShader = null; - private Material blurMaterial = null; - - - public override bool CheckResources () { - CheckSupport (false); - - blurMaterial = CheckShaderAndCreateMaterial (blurShader, blurMaterial); - - if (!isSupported) - ReportAutoDisable (); - return isSupported; - } - - public void OnDisable () { - if (blurMaterial) - DestroyImmediate (blurMaterial); - } - - public void OnRenderImage (RenderTexture source, RenderTexture destination) { - if (CheckResources() == false) { - Graphics.Blit (source, destination); - return; - } - - float widthMod = 1.0f / (1.0f * (1<> downsample; - int rtH = source.height >> downsample; - - // downsample - RenderTexture rt = RenderTexture.GetTemporary (rtW, rtH, 0, source.format); - - rt.filterMode = FilterMode.Bilinear; - Graphics.Blit (source, rt, blurMaterial, 0); - - var passOffs= blurType == BlurType.StandardGauss ? 0 : 2; - - for(int i = 0; i < blurIterations; i++) { - float iterationOffs = (i*1.0f); - blurMaterial.SetVector ("_Parameter", new Vector4 (blurSize * widthMod + iterationOffs, -blurSize * widthMod - iterationOffs, 0.0f, 0.0f)); - - // vertical blur - RenderTexture rt2 = RenderTexture.GetTemporary (rtW, rtH, 0, source.format); - rt2.filterMode = FilterMode.Bilinear; - Graphics.Blit (rt, rt2, blurMaterial, 1 + passOffs); - RenderTexture.ReleaseTemporary (rt); - rt = rt2; - - // horizontal blur - rt2 = RenderTexture.GetTemporary (rtW, rtH, 0, source.format); - rt2.filterMode = FilterMode.Bilinear; - Graphics.Blit (rt, rt2, blurMaterial, 2 + passOffs); - RenderTexture.ReleaseTemporary (rt); - rt = rt2; - } - - Graphics.Blit (rt, destination); - - RenderTexture.ReleaseTemporary (rt); - } - } -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/BlurOptimized.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/BlurOptimized.cs.meta deleted file mode 100644 index 47ca17b..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/BlurOptimized.cs.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 7fc6bde01469c7b4badee5362f191d96 -MonoImporter: - serializedVersion: 2 - defaultReferences: - - blurShader: {fileID: 4800000, guid: f9d5fa183cd6b45eeb1491f74863cd91, type: 3} - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/CameraMotionBlur.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/CameraMotionBlur.cs deleted file mode 100644 index b9cba5d..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/CameraMotionBlur.cs +++ /dev/null @@ -1,408 +0,0 @@ -using System; -using UnityEngine; - -namespace UnityStandardAssets.ImageEffects -{ - [ExecuteInEditMode] - [RequireComponent (typeof(Camera))] - [AddComponentMenu ("Image Effects/Camera/Camera Motion Blur") ] - public class CameraMotionBlur : PostEffectsBase - { - // make sure to match this to MAX_RADIUS in shader ('k' in paper) - static float MAX_RADIUS = 10.0f; - - public enum MotionBlurFilter { - CameraMotion = 0, // global screen blur based on cam motion - LocalBlur = 1, // cheap blur, no dilation or scattering - Reconstruction = 2, // advanced filter (simulates scattering) as in plausible motion blur paper - ReconstructionDX11 = 3, // advanced filter (simulates scattering) as in plausible motion blur paper - ReconstructionDisc = 4, // advanced filter using scaled poisson disc sampling - } - - // settings - public MotionBlurFilter filterType = MotionBlurFilter.Reconstruction; - public bool preview = false; // show how blur would look like in action ... - public Vector3 previewScale = Vector3.one; // ... given this movement vector - - // params - public float movementScale = 0.0f; - public float rotationScale = 1.0f; - public float maxVelocity = 8.0f; // maximum velocity in pixels - public float minVelocity = 0.1f; // minimum velocity in pixels - public float velocityScale = 0.375f; // global velocity scale - public float softZDistance = 0.005f; // for z overlap check softness (reconstruction filter only) - public int velocityDownsample = 1; // low resolution velocity buffer? (optimization) - public LayerMask excludeLayers = 0; - private GameObject tmpCam = null; - - // resources - public Shader shader; - public Shader dx11MotionBlurShader; - public Shader replacementClear; - - private Material motionBlurMaterial = null; - private Material dx11MotionBlurMaterial = null; - - public Texture2D noiseTexture = null; - public float jitter = 0.05f; - - // (internal) debug - public bool showVelocity = false; - public float showVelocityScale = 1.0f; - - // camera transforms - private Matrix4x4 currentViewProjMat; - private Matrix4x4[] currentStereoViewProjMat; - private Matrix4x4 prevViewProjMat; - private Matrix4x4[] prevStereoViewProjMat; - private int prevFrameCount; - private bool wasActive; - // shortcuts to calculate global blur direction when using 'CameraMotion' - private Vector3 prevFrameForward = Vector3.forward; - private Vector3 prevFrameUp = Vector3.up; - private Vector3 prevFramePos = Vector3.zero; - private Camera _camera; - - - private void CalculateViewProjection () { - Matrix4x4 viewMat = _camera.worldToCameraMatrix; - Matrix4x4 projMat = GL.GetGPUProjectionMatrix (_camera.projectionMatrix, true); - currentViewProjMat = projMat * viewMat; - - if(_camera.stereoEnabled) - { - for (int eye = 0; eye < 2; ++eye) - { - Matrix4x4 stereoViewMat = _camera.GetStereoViewMatrix(eye == 0 ? Camera.StereoscopicEye.Left : Camera.StereoscopicEye.Right); - Matrix4x4 stereoProjMat = _camera.GetStereoProjectionMatrix(eye == 0 ? Camera.StereoscopicEye.Left : Camera.StereoscopicEye.Right); - stereoProjMat = GL.GetGPUProjectionMatrix(stereoProjMat, true); - currentStereoViewProjMat[eye] = stereoProjMat * stereoViewMat; - } - } - } - - - new void Start () { - CheckResources (); - - if (_camera == null) - _camera = GetComponent(); - - wasActive = gameObject.activeInHierarchy; - currentStereoViewProjMat = new Matrix4x4[2]; - prevStereoViewProjMat = new Matrix4x4[2]; - CalculateViewProjection (); - Remember (); - wasActive = false; // hack to fake position/rotation update and prevent bad blurs - } - - void OnEnable () { - - if (_camera == null) - _camera = GetComponent(); - - _camera.depthTextureMode |= DepthTextureMode.Depth; - } - - void OnDisable () { - if (null != motionBlurMaterial) { - DestroyImmediate (motionBlurMaterial); - motionBlurMaterial = null; - } - if (null != dx11MotionBlurMaterial) { - DestroyImmediate (dx11MotionBlurMaterial); - dx11MotionBlurMaterial = null; - } - if (null != tmpCam) { - DestroyImmediate (tmpCam); - tmpCam = null; - } - } - - - public override bool CheckResources () { - CheckSupport (true, true); // depth & hdr needed - motionBlurMaterial = CheckShaderAndCreateMaterial (shader, motionBlurMaterial); - - if (supportDX11 && filterType == MotionBlurFilter.ReconstructionDX11) { - dx11MotionBlurMaterial = CheckShaderAndCreateMaterial (dx11MotionBlurShader, dx11MotionBlurMaterial); - } - - if (!isSupported) - ReportAutoDisable (); - - return isSupported; - } - - void OnRenderImage (RenderTexture source, RenderTexture destination) { - if (false == CheckResources ()) { - Graphics.Blit (source, destination); - return; - } - - if (filterType == MotionBlurFilter.CameraMotion) - StartFrame (); - - // use if possible new RG format ... fallback to half otherwise - var rtFormat= SystemInfo.SupportsRenderTextureFormat (RenderTextureFormat.RGHalf) ? RenderTextureFormat.RGHalf : RenderTextureFormat.ARGBHalf; - - // get temp textures - RenderTexture velBuffer = RenderTexture.GetTemporary (divRoundUp (source.width, velocityDownsample), divRoundUp (source.height, velocityDownsample), 0, rtFormat); - int tileWidth = 1; - int tileHeight = 1; - maxVelocity = Mathf.Max (2.0f, maxVelocity); - - float _maxVelocity = maxVelocity; // calculate 'k' - // note: 's' is hardcoded in shaders except for DX11 path - - // auto DX11 fallback! - bool fallbackFromDX11 = filterType == MotionBlurFilter.ReconstructionDX11 && dx11MotionBlurMaterial == null; - - if (filterType == MotionBlurFilter.Reconstruction || fallbackFromDX11 || filterType == MotionBlurFilter.ReconstructionDisc) { - maxVelocity = Mathf.Min (maxVelocity, MAX_RADIUS); - tileWidth = divRoundUp (velBuffer.width, (int) maxVelocity); - tileHeight = divRoundUp (velBuffer.height, (int) maxVelocity); - _maxVelocity = velBuffer.width/tileWidth; - } - else { - tileWidth = divRoundUp (velBuffer.width, (int) maxVelocity); - tileHeight = divRoundUp (velBuffer.height, (int) maxVelocity); - _maxVelocity = velBuffer.width/tileWidth; - } - - RenderTexture tileMax = RenderTexture.GetTemporary (tileWidth, tileHeight, 0, rtFormat); - RenderTexture neighbourMax = RenderTexture.GetTemporary (tileWidth, tileHeight, 0, rtFormat); - velBuffer.filterMode = FilterMode.Point; - tileMax.filterMode = FilterMode.Point; - neighbourMax.filterMode = FilterMode.Point; - if (noiseTexture) noiseTexture.filterMode = FilterMode.Point; - source.wrapMode = TextureWrapMode.Clamp; - velBuffer.wrapMode = TextureWrapMode.Clamp; - neighbourMax.wrapMode = TextureWrapMode.Clamp; - tileMax.wrapMode = TextureWrapMode.Clamp; - - // calc correct viewprj matrix - CalculateViewProjection (); - - // just started up? - if (gameObject.activeInHierarchy && !wasActive) { - Remember (); - } - wasActive = gameObject.activeInHierarchy; - - // matrices - Matrix4x4 invViewPrj = Matrix4x4.Inverse (currentViewProjMat); - motionBlurMaterial.SetMatrix ("_InvViewProj", invViewPrj); - motionBlurMaterial.SetMatrix ("_PrevViewProj", prevViewProjMat); - motionBlurMaterial.SetMatrix ("_ToPrevViewProjCombined", prevViewProjMat * invViewPrj); - if(_camera.stereoEnabled) - { - Matrix4x4[] invStereoViewPrj = new Matrix4x4[2]; - invStereoViewPrj[0] = Matrix4x4.Inverse(currentStereoViewProjMat[0]); - invStereoViewPrj[1] = Matrix4x4.Inverse(currentStereoViewProjMat[1]); - - Matrix4x4 combined = prevStereoViewProjMat[0] * invStereoViewPrj[0]; - motionBlurMaterial.SetMatrix("_StereoToPrevViewProjCombined0", combined); - motionBlurMaterial.SetMatrix("_StereoToPrevViewProjCombined1", prevStereoViewProjMat[1] * invStereoViewPrj[1]); - } - - motionBlurMaterial.SetFloat ("_MaxVelocity", _maxVelocity); - motionBlurMaterial.SetFloat ("_MaxRadiusOrKInPaper", _maxVelocity); - motionBlurMaterial.SetFloat ("_MinVelocity", minVelocity); - motionBlurMaterial.SetFloat ("_VelocityScale", velocityScale); - motionBlurMaterial.SetFloat ("_Jitter", jitter); - - // texture samplers - motionBlurMaterial.SetTexture ("_NoiseTex", noiseTexture); - motionBlurMaterial.SetTexture ("_VelTex", velBuffer); - motionBlurMaterial.SetTexture ("_NeighbourMaxTex", neighbourMax); - motionBlurMaterial.SetTexture ("_TileTexDebug", tileMax); - - if (preview) { - // generate an artificial 'previous' matrix to simulate blur look - Matrix4x4 viewMat = _camera.worldToCameraMatrix; - Matrix4x4 offset = Matrix4x4.identity; - offset.SetTRS(previewScale * 0.3333f, Quaternion.identity, Vector3.one); // using only translation - Matrix4x4 projMat = GL.GetGPUProjectionMatrix (_camera.projectionMatrix, true); - prevViewProjMat = projMat * offset * viewMat; - motionBlurMaterial.SetMatrix ("_PrevViewProj", prevViewProjMat); - motionBlurMaterial.SetMatrix ("_ToPrevViewProjCombined", prevViewProjMat * invViewPrj); - } - - if (filterType == MotionBlurFilter.CameraMotion) - { - // build blur vector to be used in shader to create a global blur direction - Vector4 blurVector = Vector4.zero; - - float lookUpDown = Vector3.Dot (transform.up, Vector3.up); - Vector3 distanceVector = prevFramePos-transform.position; - - float distMag = distanceVector.magnitude; - - float farHeur = 1.0f; - - // pitch (vertical) - farHeur = (Vector3.Angle (transform.up, prevFrameUp) / _camera.fieldOfView) * (source.width * 0.75f); - blurVector.x = rotationScale * farHeur;//Mathf.Clamp01((1.0ff-Vector3.Dot(transform.up, prevFrameUp))); - - // yaw #1 (horizontal, faded by pitch) - farHeur = (Vector3.Angle (transform.forward, prevFrameForward) / _camera.fieldOfView) * (source.width * 0.75f); - blurVector.y = rotationScale * lookUpDown * farHeur;//Mathf.Clamp01((1.0ff-Vector3.Dot(transform.forward, prevFrameForward))); - - // yaw #2 (when looking down, faded by 1-pitch) - farHeur = (Vector3.Angle (transform.forward, prevFrameForward) / _camera.fieldOfView) * (source.width * 0.75f); - blurVector.z = rotationScale * (1.0f- lookUpDown) * farHeur;//Mathf.Clamp01((1.0ff-Vector3.Dot(transform.forward, prevFrameForward))); - - if (distMag > Mathf.Epsilon && movementScale > Mathf.Epsilon) { - // forward (probably most important) - blurVector.w = movementScale * (Vector3.Dot (transform.forward, distanceVector) ) * (source.width * 0.5f); - // jump (maybe scale down further) - blurVector.x += movementScale * (Vector3.Dot (transform.up, distanceVector) ) * (source.width * 0.5f); - // strafe (maybe scale down further) - blurVector.y += movementScale * (Vector3.Dot (transform.right, distanceVector) ) * (source.width * 0.5f); - } - - if (preview) // crude approximation - motionBlurMaterial.SetVector ("_BlurDirectionPacked", new Vector4 (previewScale.y, previewScale.x, 0.0f, previewScale.z) * 0.5f * _camera.fieldOfView); - else - motionBlurMaterial.SetVector ("_BlurDirectionPacked", blurVector); - } - else { - // generate velocity buffer - Graphics.Blit (source, velBuffer, motionBlurMaterial, 0); - - // patch up velocity buffer: - - // exclude certain layers (e.g. skinned objects as we cant really support that atm) - - Camera cam = null; - if (excludeLayers.value != 0)// || dynamicLayers.value) - cam = GetTmpCam (); - - if (cam && excludeLayers.value != 0 && replacementClear && replacementClear.isSupported) { - cam.targetTexture = velBuffer; - cam.cullingMask = excludeLayers; - cam.RenderWithShader (replacementClear, ""); - } - } - - if (!preview && Time.frameCount != prevFrameCount) { - // remember current transformation data for next frame - prevFrameCount = Time.frameCount; - Remember (); - } - - source.filterMode = FilterMode.Bilinear; - - // debug vel buffer: - if (showVelocity) { - // generate tile max and neighbour max - //Graphics.Blit (velBuffer, tileMax, motionBlurMaterial, 2); - //Graphics.Blit (tileMax, neighbourMax, motionBlurMaterial, 3); - motionBlurMaterial.SetFloat ("_DisplayVelocityScale", showVelocityScale); - Graphics.Blit (velBuffer, destination, motionBlurMaterial, 1); - } - else { - if (filterType == MotionBlurFilter.ReconstructionDX11 && !fallbackFromDX11) { - // need to reset some parameters for dx11 shader - dx11MotionBlurMaterial.SetFloat ("_MinVelocity", minVelocity); - dx11MotionBlurMaterial.SetFloat ("_VelocityScale", velocityScale); - dx11MotionBlurMaterial.SetFloat ("_Jitter", jitter); - - // texture samplers - dx11MotionBlurMaterial.SetTexture ("_NoiseTex", noiseTexture); - dx11MotionBlurMaterial.SetTexture ("_VelTex", velBuffer); - dx11MotionBlurMaterial.SetTexture ("_NeighbourMaxTex", neighbourMax); - - dx11MotionBlurMaterial.SetFloat ("_SoftZDistance", Mathf.Max(0.00025f, softZDistance) ); - dx11MotionBlurMaterial.SetFloat ("_MaxRadiusOrKInPaper", _maxVelocity); - - // generate tile max and neighbour max - Graphics.Blit (velBuffer, tileMax, dx11MotionBlurMaterial, 0); - Graphics.Blit (tileMax, neighbourMax, dx11MotionBlurMaterial, 1); - - // final blur - Graphics.Blit (source, destination, dx11MotionBlurMaterial, 2); - } - else if (filterType == MotionBlurFilter.Reconstruction || fallbackFromDX11) { - // 'reconstructing' properly integrated color - motionBlurMaterial.SetFloat ("_SoftZDistance", Mathf.Max(0.00025f, softZDistance) ); - - // generate tile max and neighbour max - Graphics.Blit (velBuffer, tileMax, motionBlurMaterial, 2); - Graphics.Blit (tileMax, neighbourMax, motionBlurMaterial, 3); - - // final blur - Graphics.Blit (source, destination, motionBlurMaterial, 4); - } - else if (filterType == MotionBlurFilter.CameraMotion) { - // orange box style motion blur - Graphics.Blit (source, destination, motionBlurMaterial, 6); - } - else if (filterType == MotionBlurFilter.ReconstructionDisc) { - // dof style motion blur defocuing and ellipse around the princical blur direction - // 'reconstructing' properly integrated color - motionBlurMaterial.SetFloat ("_SoftZDistance", Mathf.Max(0.00025f, softZDistance) ); - - // generate tile max and neighbour max - Graphics.Blit (velBuffer, tileMax, motionBlurMaterial, 2); - Graphics.Blit (tileMax, neighbourMax, motionBlurMaterial, 3); - - Graphics.Blit (source, destination, motionBlurMaterial, 7); - } - else { - // simple & fast blur (low quality): just blurring along velocity - Graphics.Blit (source, destination, motionBlurMaterial, 5); - } - } - - // cleanup - RenderTexture.ReleaseTemporary (velBuffer); - RenderTexture.ReleaseTemporary (tileMax); - RenderTexture.ReleaseTemporary (neighbourMax); - } - - void Remember () { - prevViewProjMat = currentViewProjMat; - prevFrameForward = transform.forward; - prevFrameUp = transform.up; - prevFramePos = transform.position; - prevStereoViewProjMat[0] = currentStereoViewProjMat[0]; - prevStereoViewProjMat[1] = currentStereoViewProjMat[1]; - } - - Camera GetTmpCam () { - if (tmpCam == null) { - string name = "_" + _camera.name + "_MotionBlurTmpCam"; - GameObject go = GameObject.Find (name); - if (null == go) // couldn't find, recreate - tmpCam = new GameObject (name, typeof (Camera)); - else - tmpCam = go; - } - - tmpCam.hideFlags = HideFlags.DontSave; - tmpCam.transform.position = _camera.transform.position; - tmpCam.transform.rotation = _camera.transform.rotation; - tmpCam.transform.localScale = _camera.transform.localScale; - tmpCam.GetComponent().CopyFrom(_camera); - - tmpCam.GetComponent().enabled = false; - tmpCam.GetComponent().depthTextureMode = DepthTextureMode.None; - tmpCam.GetComponent().clearFlags = CameraClearFlags.Nothing; - - return tmpCam.GetComponent(); - } - - void StartFrame () { - // take only x% of positional changes into account (camera motion) - // TODO: possibly do the same for rotational part - prevFramePos = Vector3.Slerp(prevFramePos, transform.position, 0.75f); - } - - static int divRoundUp (int x, int d) - { - return (x + d - 1) / d; - } - } -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/CameraMotionBlur.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/CameraMotionBlur.cs.meta deleted file mode 100644 index ef18200..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/CameraMotionBlur.cs.meta +++ /dev/null @@ -1,14 +0,0 @@ -fileFormatVersion: 2 -guid: 97e9b95cf609d96409b6c40519432957 -MonoImporter: - serializedVersion: 2 - defaultReferences: - - shader: {fileID: 4800000, guid: 85a88efa8c871af4a9d17c64791b6f4f, type: 3} - - dx11MotionBlurShader: {fileID: 4800000, guid: f1b13d7a80660504a858ea24cfa418c6, - type: 3} - - replacementClear: {fileID: 4800000, guid: 7699c5fbfa27745a1abe111ab7bf9785, type: 3} - - noiseTexture: {fileID: 2800000, guid: 31f5a8611c4ed1245b18456206e798dc, type: 3} - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/ColorCorrectionCurves.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/ColorCorrectionCurves.cs deleted file mode 100644 index 0425da9..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/ColorCorrectionCurves.cs +++ /dev/null @@ -1,181 +0,0 @@ -using System; -using UnityEngine; - -namespace UnityStandardAssets.ImageEffects -{ - [ExecuteInEditMode] - [AddComponentMenu ("Image Effects/Color Adjustments/Color Correction (Curves, Saturation)")] - public class ColorCorrectionCurves : PostEffectsBase - { - public enum ColorCorrectionMode - { - Simple = 0, - Advanced = 1 - } - - public AnimationCurve redChannel = new AnimationCurve(new Keyframe(0f,0f), new Keyframe(1f,1f)); - public AnimationCurve greenChannel = new AnimationCurve(new Keyframe(0f,0f), new Keyframe(1f,1f)); - public AnimationCurve blueChannel = new AnimationCurve(new Keyframe(0f,0f), new Keyframe(1f,1f)); - - public bool useDepthCorrection = false; - - public AnimationCurve zCurve = new AnimationCurve(new Keyframe(0f,0f), new Keyframe(1f,1f)); - public AnimationCurve depthRedChannel = new AnimationCurve(new Keyframe(0f,0f), new Keyframe(1f,1f)); - public AnimationCurve depthGreenChannel = new AnimationCurve(new Keyframe(0f,0f), new Keyframe(1f,1f)); - public AnimationCurve depthBlueChannel = new AnimationCurve(new Keyframe(0f,0f), new Keyframe(1f,1f)); - - private Material ccMaterial; - private Material ccDepthMaterial; - private Material selectiveCcMaterial; - - private Texture2D rgbChannelTex; - private Texture2D rgbDepthChannelTex; - private Texture2D zCurveTex; - - public float saturation = 1.0f; - - public bool selectiveCc = false; - - public Color selectiveFromColor = Color.white; - public Color selectiveToColor = Color.white; - - public ColorCorrectionMode mode; - - public bool updateTextures = true; - - public Shader colorCorrectionCurvesShader = null; - public Shader simpleColorCorrectionCurvesShader = null; - public Shader colorCorrectionSelectiveShader = null; - - private bool updateTexturesOnStartup = true; - - - new void Start () - { - base.Start (); - updateTexturesOnStartup = true; - } - - void Awake () { } - - - public override bool CheckResources () - { - CheckSupport (mode == ColorCorrectionMode.Advanced); - - ccMaterial = CheckShaderAndCreateMaterial (simpleColorCorrectionCurvesShader, ccMaterial); - ccDepthMaterial = CheckShaderAndCreateMaterial (colorCorrectionCurvesShader, ccDepthMaterial); - selectiveCcMaterial = CheckShaderAndCreateMaterial (colorCorrectionSelectiveShader, selectiveCcMaterial); - - if (!rgbChannelTex) - rgbChannelTex = new Texture2D (256, 4, TextureFormat.ARGB32, false, true); - if (!rgbDepthChannelTex) - rgbDepthChannelTex = new Texture2D (256, 4, TextureFormat.ARGB32, false, true); - if (!zCurveTex) - zCurveTex = new Texture2D (256, 1, TextureFormat.ARGB32, false, true); - - rgbChannelTex.hideFlags = HideFlags.DontSave; - rgbDepthChannelTex.hideFlags = HideFlags.DontSave; - zCurveTex.hideFlags = HideFlags.DontSave; - - rgbChannelTex.wrapMode = TextureWrapMode.Clamp; - rgbDepthChannelTex.wrapMode = TextureWrapMode.Clamp; - zCurveTex.wrapMode = TextureWrapMode.Clamp; - - if (!isSupported) - ReportAutoDisable (); - return isSupported; - } - - public void UpdateParameters () - { - CheckResources(); // textures might not be created if we're tweaking UI while disabled - - if (redChannel != null && greenChannel != null && blueChannel != null) - { - for (float i = 0.0f; i <= 1.0f; i += 1.0f / 255.0f) - { - float rCh = Mathf.Clamp (redChannel.Evaluate(i), 0.0f, 1.0f); - float gCh = Mathf.Clamp (greenChannel.Evaluate(i), 0.0f, 1.0f); - float bCh = Mathf.Clamp (blueChannel.Evaluate(i), 0.0f, 1.0f); - - rgbChannelTex.SetPixel ((int) Mathf.Floor(i*255.0f), 0, new Color(rCh,rCh,rCh) ); - rgbChannelTex.SetPixel ((int) Mathf.Floor(i*255.0f), 1, new Color(gCh,gCh,gCh) ); - rgbChannelTex.SetPixel ((int) Mathf.Floor(i*255.0f), 2, new Color(bCh,bCh,bCh) ); - - float zC = Mathf.Clamp (zCurve.Evaluate(i), 0.0f,1.0f); - - zCurveTex.SetPixel ((int) Mathf.Floor(i*255.0f), 0, new Color(zC,zC,zC) ); - - rCh = Mathf.Clamp (depthRedChannel.Evaluate(i), 0.0f,1.0f); - gCh = Mathf.Clamp (depthGreenChannel.Evaluate(i), 0.0f,1.0f); - bCh = Mathf.Clamp (depthBlueChannel.Evaluate(i), 0.0f,1.0f); - - rgbDepthChannelTex.SetPixel ((int) Mathf.Floor(i*255.0f), 0, new Color(rCh,rCh,rCh) ); - rgbDepthChannelTex.SetPixel ((int) Mathf.Floor(i*255.0f), 1, new Color(gCh,gCh,gCh) ); - rgbDepthChannelTex.SetPixel ((int) Mathf.Floor(i*255.0f), 2, new Color(bCh,bCh,bCh) ); - } - - rgbChannelTex.Apply (); - rgbDepthChannelTex.Apply (); - zCurveTex.Apply (); - } - } - - void UpdateTextures () - { - UpdateParameters (); - } - - void OnRenderImage (RenderTexture source, RenderTexture destination) - { - if (CheckResources()==false) - { - Graphics.Blit (source, destination); - return; - } - - if (updateTexturesOnStartup) - { - UpdateParameters (); - updateTexturesOnStartup = false; - } - - if (useDepthCorrection) - GetComponent().depthTextureMode |= DepthTextureMode.Depth; - - RenderTexture renderTarget2Use = destination; - - if (selectiveCc) - { - renderTarget2Use = RenderTexture.GetTemporary (source.width, source.height); - } - - if (useDepthCorrection) - { - ccDepthMaterial.SetTexture ("_RgbTex", rgbChannelTex); - ccDepthMaterial.SetTexture ("_ZCurve", zCurveTex); - ccDepthMaterial.SetTexture ("_RgbDepthTex", rgbDepthChannelTex); - ccDepthMaterial.SetFloat ("_Saturation", saturation); - - Graphics.Blit (source, renderTarget2Use, ccDepthMaterial); - } - else - { - ccMaterial.SetTexture ("_RgbTex", rgbChannelTex); - ccMaterial.SetFloat ("_Saturation", saturation); - - Graphics.Blit (source, renderTarget2Use, ccMaterial); - } - - if (selectiveCc) - { - selectiveCcMaterial.SetColor ("selColor", selectiveFromColor); - selectiveCcMaterial.SetColor ("targetColor", selectiveToColor); - Graphics.Blit (renderTarget2Use, destination, selectiveCcMaterial); - - RenderTexture.ReleaseTemporary (renderTarget2Use); - } - } - } -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/ColorCorrectionCurves.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/ColorCorrectionCurves.cs.meta deleted file mode 100644 index e60e166..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/ColorCorrectionCurves.cs.meta +++ /dev/null @@ -1,15 +0,0 @@ -fileFormatVersion: 2 -guid: 1fd999d1b2cf94a45a5b0a47ce074bef -MonoImporter: - serializedVersion: 2 - defaultReferences: - - colorCorrectionCurvesShader: {fileID: 4800000, guid: 62bcade1028c24ca1a39760ed84b9487, - type: 3} - - simpleColorCorrectionCurvesShader: {fileID: 4800000, guid: 438ddd58d82c84d9eb1fdc56111702e1, - type: 3} - - colorCorrectionSelectiveShader: {fileID: 4800000, guid: e515e0f94cefc4c0db54b45cba621544, - type: 3} - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/ColorCorrectionLookup.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/ColorCorrectionLookup.cs deleted file mode 100644 index e85bb59..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/ColorCorrectionLookup.cs +++ /dev/null @@ -1,130 +0,0 @@ -using System; -using UnityEngine; - -namespace UnityStandardAssets.ImageEffects -{ - [ExecuteInEditMode] - [AddComponentMenu ("Image Effects/Color Adjustments/Color Correction (3D Lookup Texture)")] - public class ColorCorrectionLookup : PostEffectsBase - { - public Shader shader; - private Material material; - - // serialize this instead of having another 2d texture ref'ed - public Texture3D converted3DLut = null; - public string basedOnTempTex = ""; - - - public override bool CheckResources () { - CheckSupport (false); - - material = CheckShaderAndCreateMaterial (shader, material); - - if (!isSupported || !SystemInfo.supports3DTextures) - ReportAutoDisable (); - return isSupported; - } - - void OnDisable () { - if (material) { - DestroyImmediate (material); - material = null; - } - } - - void OnDestroy () { - if (converted3DLut) - DestroyImmediate (converted3DLut); - converted3DLut = null; - } - - public void SetIdentityLut () { - int dim = 16; - var newC = new Color[dim*dim*dim]; - float oneOverDim = 1.0f / (1.0f * dim - 1.0f); - - for(int i = 0; i < dim; i++) { - for(int j = 0; j < dim; j++) { - for(int k = 0; k < dim; k++) { - newC[i + (j*dim) + (k*dim*dim)] = new Color((i*1.0f)*oneOverDim, (j*1.0f)*oneOverDim, (k*1.0f)*oneOverDim, 1.0f); - } - } - } - - if (converted3DLut) - DestroyImmediate (converted3DLut); - converted3DLut = new Texture3D (dim, dim, dim, TextureFormat.ARGB32, false); - converted3DLut.SetPixels (newC); - converted3DLut.Apply (); - basedOnTempTex = ""; - } - - public bool ValidDimensions ( Texture2D tex2d) { - if (!tex2d) return false; - int h = tex2d.height; - if (h != Mathf.FloorToInt(Mathf.Sqrt(tex2d.width))) { - return false; - } - return true; - } - - public void Convert ( Texture2D temp2DTex, string path) { - - // conversion fun: the given 2D texture needs to be of the format - // w * h, wheras h is the 'depth' (or 3d dimension 'dim') and w = dim * dim - - if (temp2DTex) { - int dim = temp2DTex.width * temp2DTex.height; - dim = temp2DTex.height; - - if (!ValidDimensions(temp2DTex)) { - Debug.LogWarning ("The given 2D texture " + temp2DTex.name + " cannot be used as a 3D LUT."); - basedOnTempTex = ""; - return; - } - - var c = temp2DTex.GetPixels(); - var newC = new Color[c.Length]; - - for(int i = 0; i < dim; i++) { - for(int j = 0; j < dim; j++) { - for(int k = 0; k < dim; k++) { - int j_ = dim-j-1; - newC[i + (j*dim) + (k*dim*dim)] = c[k*dim+i+j_*dim*dim]; - } - } - } - - if (converted3DLut) - DestroyImmediate (converted3DLut); - converted3DLut = new Texture3D (dim, dim, dim, TextureFormat.ARGB32, false); - converted3DLut.SetPixels (newC); - converted3DLut.Apply (); - basedOnTempTex = path; - } - else { - // error, something went terribly wrong - Debug.LogError ("Couldn't color correct with 3D LUT texture. Image Effect will be disabled."); - } - } - - void OnRenderImage (RenderTexture source, RenderTexture destination) { - if (CheckResources () == false || !SystemInfo.supports3DTextures) { - Graphics.Blit (source, destination); - return; - } - - if (converted3DLut == null) { - SetIdentityLut (); - } - - int lutSize = converted3DLut.width; - converted3DLut.wrapMode = TextureWrapMode.Clamp; - material.SetFloat("_Scale", (lutSize - 1) / (1.0f*lutSize)); - material.SetFloat("_Offset", 1.0f / (2.0f * lutSize)); - material.SetTexture("_ClutTex", converted3DLut); - - Graphics.Blit (source, destination, material, QualitySettings.activeColorSpace == ColorSpace.Linear ? 1 : 0); - } - } -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/ColorCorrectionLookup.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/ColorCorrectionLookup.cs.meta deleted file mode 100644 index 82f6837..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/ColorCorrectionLookup.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 8cde8c0fd649d9b46bb403ba5e157391 -MonoImporter: - serializedVersion: 2 - defaultReferences: - - shader: {fileID: 4800000, guid: b61f0d8d8244b4b28aa66b0c8cb46a8d, type: 3} - - converted3DLut: {instanceID: 0} - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/ColorCorrectionRamp.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/ColorCorrectionRamp.cs deleted file mode 100644 index ae594f8..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/ColorCorrectionRamp.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System; -using UnityEngine; - -namespace UnityStandardAssets.ImageEffects -{ - [ExecuteInEditMode] - [AddComponentMenu("Image Effects/Color Adjustments/Color Correction (Ramp)")] - public class ColorCorrectionRamp : ImageEffectBase { - public Texture textureRamp; - - // Called by camera to apply image effect - void OnRenderImage (RenderTexture source, RenderTexture destination) { - material.SetTexture ("_RampTex", textureRamp); - Graphics.Blit (source, destination, material); - } - } -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/ColorCorrectionRamp.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/ColorCorrectionRamp.cs.meta deleted file mode 100644 index 009d841..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/ColorCorrectionRamp.cs.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: ea59781cad112c75d0008dfa8d76c639 -MonoImporter: - serializedVersion: 2 - defaultReferences: - - shader: {fileID: 4800000, guid: 67f8781cad112c75d0008dfa8d76c639, type: 3} - - textureRamp: {fileID: 2800000, guid: d440902fad11e807d00044888d76c639, type: 3} - executionOrder: 0 - icon: {instanceID: 0} - userData: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/ContrastEnhance.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/ContrastEnhance.cs deleted file mode 100644 index 00c2820..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/ContrastEnhance.cs +++ /dev/null @@ -1,80 +0,0 @@ -using System; -using UnityEngine; - -namespace UnityStandardAssets.ImageEffects -{ - [ExecuteInEditMode] - [RequireComponent(typeof(Camera))] - [AddComponentMenu("Image Effects/Color Adjustments/Contrast Enhance (Unsharp Mask)")] - public class ContrastEnhance : PostEffectsBase - { - [Range(0.0f, 1.0f)] - public float intensity = 0.5f; - [Range(0.0f,0.999f)] - public float threshold = 0.0f; - - private Material separableBlurMaterial; - private Material contrastCompositeMaterial; - - [Range(0.0f,1.0f)] - public float blurSpread = 1.0f; - - public Shader separableBlurShader = null; - public Shader contrastCompositeShader = null; - - - public override bool CheckResources () - { - CheckSupport (false); - - contrastCompositeMaterial = CheckShaderAndCreateMaterial (contrastCompositeShader, contrastCompositeMaterial); - separableBlurMaterial = CheckShaderAndCreateMaterial (separableBlurShader, separableBlurMaterial); - - if (!isSupported) - ReportAutoDisable (); - return isSupported; - } - - void OnRenderImage (RenderTexture source, RenderTexture destination) - { - if (CheckResources()==false) - { - Graphics.Blit (source, destination); - return; - } - - int rtW = source.width; - int rtH = source.height; - - RenderTexture color2 = RenderTexture.GetTemporary (rtW/2, rtH/2, 0); - - // downsample - - Graphics.Blit (source, color2); - RenderTexture color4a = RenderTexture.GetTemporary (rtW/4, rtH/4, 0); - Graphics.Blit (color2, color4a); - RenderTexture.ReleaseTemporary (color2); - - // blur - - separableBlurMaterial.SetVector ("offsets", new Vector4 (0.0f, (blurSpread * 1.0f) / color4a.height, 0.0f, 0.0f)); - RenderTexture color4b = RenderTexture.GetTemporary (rtW/4, rtH/4, 0); - Graphics.Blit (color4a, color4b, separableBlurMaterial); - RenderTexture.ReleaseTemporary (color4a); - - separableBlurMaterial.SetVector ("offsets", new Vector4 ((blurSpread * 1.0f) / color4a.width, 0.0f, 0.0f, 0.0f)); - color4a = RenderTexture.GetTemporary (rtW/4, rtH/4, 0); - Graphics.Blit (color4b, color4a, separableBlurMaterial); - RenderTexture.ReleaseTemporary (color4b); - - // composite - - contrastCompositeMaterial.SetTexture ("_MainTexBlurred", color4a); - contrastCompositeMaterial.SetFloat ("intensity", intensity); - contrastCompositeMaterial.SetFloat ("threshold", threshold); - Graphics.Blit (source, destination, contrastCompositeMaterial); - - RenderTexture.ReleaseTemporary (color4a); - } - } -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/ContrastEnhance.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/ContrastEnhance.cs.meta deleted file mode 100644 index c469a7c..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/ContrastEnhance.cs.meta +++ /dev/null @@ -1,13 +0,0 @@ -fileFormatVersion: 2 -guid: 3309686a9fbbe6e42a182d5e0257704c -MonoImporter: - serializedVersion: 2 - defaultReferences: - - separableBlurShader: {fileID: 4800000, guid: e97c14fbb5ea04c3a902cc533d7fc5d1, - type: 3} - - contrastCompositeShader: {fileID: 4800000, guid: 273404942eede4ea1883ca1fb2942507, - type: 3} - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/ContrastStretch.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/ContrastStretch.cs deleted file mode 100644 index a349d5c..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/ContrastStretch.cs +++ /dev/null @@ -1,200 +0,0 @@ -using System; -using UnityEngine; - -namespace UnityStandardAssets.ImageEffects -{ - [ExecuteInEditMode] - [AddComponentMenu("Image Effects/Color Adjustments/Contrast Stretch")] - public class ContrastStretch : MonoBehaviour - { - /// Adaptation speed - percents per frame, if playing at 30FPS. - /// Default is 0.02 (2% each 1/30s). - [Range(0.0001f, 1.0f)] - public float adaptationSpeed = 0.02f; - - /// If our scene is really dark (or really bright), we might not want to - /// stretch its contrast to the full range. - /// limitMinimum=0, limitMaximum=1 is the same as not applying the effect at all. - /// limitMinimum=1, limitMaximum=0 is always stretching colors to full range. - - /// The limit on the minimum luminance (0...1) - we won't go above this. - [Range(0.0f,1.0f)] - public float limitMinimum = 0.2f; - - /// The limit on the maximum luminance (0...1) - we won't go below this. - [Range(0.0f, 1.0f)] - public float limitMaximum = 0.6f; - - - // To maintain adaptation levels over time, we need two 1x1 render textures - // and ping-pong between them. - private RenderTexture[] adaptRenderTex = new RenderTexture[2]; - private int curAdaptIndex = 0; - - - // Computes scene luminance (grayscale) image - public Shader shaderLum; - private Material m_materialLum; - protected Material materialLum { - get { - if ( m_materialLum == null ) { - m_materialLum = new Material(shaderLum); - m_materialLum.hideFlags = HideFlags.HideAndDontSave; - } - return m_materialLum; - } - } - - // Reduces size of the image by 2x2, while computing maximum/minimum values. - // By repeatedly applying this shader, we reduce the initial luminance image - // to 1x1 image with minimum/maximum luminances found. - public Shader shaderReduce; - private Material m_materialReduce; - protected Material materialReduce { - get { - if ( m_materialReduce == null ) { - m_materialReduce = new Material(shaderReduce); - m_materialReduce.hideFlags = HideFlags.HideAndDontSave; - } - return m_materialReduce; - } - } - - // Adaptation shader - gradually "adapts" minimum/maximum luminances, - // based on currently adapted 1x1 image and the actual 1x1 image of the current scene. - public Shader shaderAdapt; - private Material m_materialAdapt; - protected Material materialAdapt { - get { - if ( m_materialAdapt == null ) { - m_materialAdapt = new Material(shaderAdapt); - m_materialAdapt.hideFlags = HideFlags.HideAndDontSave; - } - return m_materialAdapt; - } - } - - // Final pass - stretches the color values of the original scene, based on currently - // adpated minimum/maximum values. - public Shader shaderApply; - private Material m_materialApply; - protected Material materialApply { - get { - if ( m_materialApply == null ) { - m_materialApply = new Material(shaderApply); - m_materialApply.hideFlags = HideFlags.HideAndDontSave; - } - return m_materialApply; - } - } - - void Start() - { - // Disable if we don't support image effects - if (!SystemInfo.supportsImageEffects) { - enabled = false; - return; - } - - if (!shaderAdapt.isSupported || !shaderApply.isSupported || !shaderLum.isSupported || !shaderReduce.isSupported) { - enabled = false; - return; - } - } - - void OnEnable() - { - for( int i = 0; i < 2; ++i ) - { - if ( !adaptRenderTex[i] ) { - adaptRenderTex[i] = new RenderTexture(1, 1, 0); - adaptRenderTex[i].hideFlags = HideFlags.HideAndDontSave; - } - } - } - - void OnDisable() - { - for( int i = 0; i < 2; ++i ) - { - DestroyImmediate( adaptRenderTex[i] ); - adaptRenderTex[i] = null; - } - if ( m_materialLum ) - DestroyImmediate( m_materialLum ); - if ( m_materialReduce ) - DestroyImmediate( m_materialReduce ); - if ( m_materialAdapt ) - DestroyImmediate( m_materialAdapt ); - if ( m_materialApply ) - DestroyImmediate( m_materialApply ); - } - - - /// Apply the filter - void OnRenderImage (RenderTexture source, RenderTexture destination) - { - // Blit to smaller RT and convert to luminance on the way - const int TEMP_RATIO = 1; // 4x4 smaller - RenderTexture rtTempSrc = RenderTexture.GetTemporary(source.width/TEMP_RATIO, source.height/TEMP_RATIO); - Graphics.Blit (source, rtTempSrc, materialLum); - - // Repeatedly reduce this image in size, computing min/max luminance values - // In the end we'll have 1x1 image with min/max luminances found. - const int FINAL_SIZE = 1; - //const int FINAL_SIZE = 1; - while( rtTempSrc.width > FINAL_SIZE || rtTempSrc.height > FINAL_SIZE ) - { - const int REDUCE_RATIO = 2; // our shader does 2x2 reduction - int destW = rtTempSrc.width / REDUCE_RATIO; - if ( destW < FINAL_SIZE ) destW = FINAL_SIZE; - int destH = rtTempSrc.height / REDUCE_RATIO; - if ( destH < FINAL_SIZE ) destH = FINAL_SIZE; - RenderTexture rtTempDst = RenderTexture.GetTemporary(destW,destH); - Graphics.Blit (rtTempSrc, rtTempDst, materialReduce); - - // Release old src temporary, and make new temporary the source - RenderTexture.ReleaseTemporary( rtTempSrc ); - rtTempSrc = rtTempDst; - } - - // Update viewer's adaptation level - CalculateAdaptation( rtTempSrc ); - - // Apply contrast strech to the original scene, using currently adapted parameters - materialApply.SetTexture("_AdaptTex", adaptRenderTex[curAdaptIndex] ); - Graphics.Blit (source, destination, materialApply); - - RenderTexture.ReleaseTemporary( rtTempSrc ); - } - - - /// Helper function to do gradual adaptation to min/max luminances - private void CalculateAdaptation( Texture curTexture ) - { - int prevAdaptIndex = curAdaptIndex; - curAdaptIndex = (curAdaptIndex+1) % 2; - - // Adaptation speed is expressed in percents/frame, based on 30FPS. - // Calculate the adaptation lerp, based on current FPS. - float adaptLerp = 1.0f - Mathf.Pow( 1.0f - adaptationSpeed, 30.0f * Time.deltaTime ); - const float kMinAdaptLerp = 0.01f; - adaptLerp = Mathf.Clamp( adaptLerp, kMinAdaptLerp, 1 ); - - materialAdapt.SetTexture("_CurTex", curTexture ); - materialAdapt.SetVector("_AdaptParams", new Vector4( - adaptLerp, - limitMinimum, - limitMaximum, - 0.0f - )); - // clear destination RT so its contents don't need to be restored - Graphics.SetRenderTarget(adaptRenderTex[curAdaptIndex]); - GL.Clear(false, true, Color.black); - Graphics.Blit ( - adaptRenderTex[prevAdaptIndex], - adaptRenderTex[curAdaptIndex], - materialAdapt); - } - } -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/ContrastStretch.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/ContrastStretch.cs.meta deleted file mode 100644 index a9285bb..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/ContrastStretch.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: ec92b071d2d424aecb3e46f28eb63174 -MonoImporter: - serializedVersion: 2 - defaultReferences: - - shaderLum: {fileID: 4800000, guid: befbb4b9c320b4b18a08ef7afb93b6c9, type: 3} - - shaderReduce: {fileID: 4800000, guid: 57b33a14b6d5347c5a85c36f6cb3b280, type: 3} - - shaderAdapt: {fileID: 4800000, guid: 257bc83cbeb544540bd0e558aa9b1383, type: 3} - - shaderApply: {fileID: 4800000, guid: f4901f25d4e1542589348bbb89563d8e, type: 3} - executionOrder: 0 - icon: {instanceID: 0} - userData: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/CreaseShading.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/CreaseShading.cs deleted file mode 100644 index a26d007..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/CreaseShading.cs +++ /dev/null @@ -1,82 +0,0 @@ -using System; -using UnityEngine; - -namespace UnityStandardAssets.ImageEffects -{ - [ExecuteInEditMode] - [RequireComponent (typeof(Camera))] - [AddComponentMenu ("Image Effects/Edge Detection/Crease Shading")] - public class CreaseShading : PostEffectsBase - { - public float intensity = 0.5f; - public int softness = 1; - public float spread = 1.0f; - - public Shader blurShader = null; - private Material blurMaterial = null; - - public Shader depthFetchShader = null; - private Material depthFetchMaterial = null; - - public Shader creaseApplyShader = null; - private Material creaseApplyMaterial = null; - - - public override bool CheckResources () - { - CheckSupport (true); - - blurMaterial = CheckShaderAndCreateMaterial (blurShader, blurMaterial); - depthFetchMaterial = CheckShaderAndCreateMaterial (depthFetchShader, depthFetchMaterial); - creaseApplyMaterial = CheckShaderAndCreateMaterial (creaseApplyShader, creaseApplyMaterial); - - if (!isSupported) - ReportAutoDisable (); - return isSupported; - } - - void OnRenderImage (RenderTexture source, RenderTexture destination) - { - if (CheckResources()==false) - { - Graphics.Blit (source, destination); - return; - } - - int rtW = source.width; - int rtH = source.height; - - float widthOverHeight = (1.0f * rtW) / (1.0f * rtH); - float oneOverBaseSize = 1.0f / 512.0f; - - RenderTexture hrTex = RenderTexture.GetTemporary (rtW, rtH, 0); - RenderTexture lrTex1 = RenderTexture.GetTemporary (rtW/2, rtH/2, 0); - - Graphics.Blit (source,hrTex, depthFetchMaterial); - Graphics.Blit (hrTex, lrTex1); - - for(int i = 0; i < softness; i++) - { - RenderTexture lrTex2 = RenderTexture.GetTemporary (rtW/2, rtH/2, 0); - blurMaterial.SetVector ("offsets", new Vector4 (0.0f, spread * oneOverBaseSize, 0.0f, 0.0f)); - Graphics.Blit (lrTex1, lrTex2, blurMaterial); - RenderTexture.ReleaseTemporary (lrTex1); - lrTex1 = lrTex2; - - lrTex2 = RenderTexture.GetTemporary (rtW/2, rtH/2, 0); - blurMaterial.SetVector ("offsets", new Vector4 (spread * oneOverBaseSize / widthOverHeight, 0.0f, 0.0f, 0.0f)); - Graphics.Blit (lrTex1, lrTex2, blurMaterial); - RenderTexture.ReleaseTemporary (lrTex1); - lrTex1 = lrTex2; - } - - creaseApplyMaterial.SetTexture ("_HrDepthTex", hrTex); - creaseApplyMaterial.SetTexture ("_LrDepthTex", lrTex1); - creaseApplyMaterial.SetFloat ("intensity", intensity); - Graphics.Blit (source,destination, creaseApplyMaterial); - - RenderTexture.ReleaseTemporary (hrTex); - RenderTexture.ReleaseTemporary (lrTex1); - } - } -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/CreaseShading.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/CreaseShading.cs.meta deleted file mode 100644 index c6ebebe..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/CreaseShading.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: d64b4f3a592f28b44bf19223ac8b6cd2 -MonoImporter: - serializedVersion: 2 - defaultReferences: - - blurShader: {fileID: 4800000, guid: e97c14fbb5ea04c3a902cc533d7fc5d1, type: 3} - - depthFetchShader: {fileID: 4800000, guid: 14768d3865b1342e3a861fbe19ba2db2, type: 3} - - creaseApplyShader: {fileID: 4800000, guid: b59984d82af624bd3b0c777f038276f2, type: 3} - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/DepthOfField.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/DepthOfField.cs deleted file mode 100644 index 59aee65..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/DepthOfField.cs +++ /dev/null @@ -1,387 +0,0 @@ -using System; -using UnityEngine; - -namespace UnityStandardAssets.ImageEffects -{ - [ExecuteInEditMode] - [RequireComponent (typeof(Camera))] - [AddComponentMenu ("Image Effects/Camera/Depth of Field (Lens Blur, Scatter, DX11)") ] - public class DepthOfField : PostEffectsBase { - - public bool visualizeFocus = false; - public float focalLength = 10.0f; - public float focalSize = 0.05f; - public float aperture = 0.5f; - public Transform focalTransform = null; - public float maxBlurSize = 2.0f; - public bool highResolution = false; - - public enum BlurType { - DiscBlur = 0, - DX11 = 1, - } - - public enum BlurSampleCount { - Low = 0, - Medium = 1, - High = 2, - } - - public BlurType blurType = BlurType.DiscBlur; - public BlurSampleCount blurSampleCount = BlurSampleCount.High; - - public bool nearBlur = false; - public float foregroundOverlap = 1.0f; - - public Shader dofHdrShader; - private Material dofHdrMaterial = null; - - public Shader dx11BokehShader; - private Material dx11bokehMaterial; - - public float dx11BokehThreshold = 0.5f; - public float dx11SpawnHeuristic = 0.0875f; - public Texture2D dx11BokehTexture = null; - public float dx11BokehScale = 1.2f; - public float dx11BokehIntensity = 2.5f; - - private float focalDistance01 = 10.0f; - private ComputeBuffer cbDrawArgs; - private ComputeBuffer cbPoints; - private float internalBlurWidth = 1.0f; - - private Camera cachedCamera; - - public override bool CheckResources () { - CheckSupport (true); // only requires depth, not HDR - - dofHdrMaterial = CheckShaderAndCreateMaterial (dofHdrShader, dofHdrMaterial); - if (supportDX11 && blurType == BlurType.DX11) { - dx11bokehMaterial = CheckShaderAndCreateMaterial(dx11BokehShader, dx11bokehMaterial); - CreateComputeResources (); - } - - if (!isSupported) - ReportAutoDisable (); - - return isSupported; - } - - void OnEnable () { - cachedCamera = GetComponent(); - cachedCamera.depthTextureMode |= DepthTextureMode.Depth; - } - - void OnDisable () { - ReleaseComputeResources (); - - if (dofHdrMaterial) DestroyImmediate(dofHdrMaterial); - dofHdrMaterial = null; - if (dx11bokehMaterial) DestroyImmediate(dx11bokehMaterial); - dx11bokehMaterial = null; - } - - void ReleaseComputeResources () { - if (cbDrawArgs != null) cbDrawArgs.Release(); - cbDrawArgs = null; - if (cbPoints != null) cbPoints.Release(); - cbPoints = null; - } - - void CreateComputeResources () { - if (cbDrawArgs == null) - { - cbDrawArgs = new ComputeBuffer (1, 16, ComputeBufferType.IndirectArguments); - var args= new int[4]; - args[0] = 0; args[1] = 1; args[2] = 0; args[3] = 0; - cbDrawArgs.SetData (args); - } - if (cbPoints == null) - { - cbPoints = new ComputeBuffer (90000, 12+16, ComputeBufferType.Append); - } - } - - float FocalDistance01 ( float worldDist) { - return cachedCamera.WorldToViewportPoint((worldDist-cachedCamera.nearClipPlane) * cachedCamera.transform.forward + cachedCamera.transform.position).z / (cachedCamera.farClipPlane-cachedCamera.nearClipPlane); - } - - private void WriteCoc ( RenderTexture fromTo, bool fgDilate) { - dofHdrMaterial.SetTexture("_FgOverlap", null); - - if (nearBlur && fgDilate) { - - int rtW = fromTo.width/2; - int rtH = fromTo.height/2; - - // capture fg coc - RenderTexture temp2 = RenderTexture.GetTemporary (rtW, rtH, 0, fromTo.format); - Graphics.Blit (fromTo, temp2, dofHdrMaterial, 4); - - // special blur - float fgAdjustment = internalBlurWidth * foregroundOverlap; - - dofHdrMaterial.SetVector ("_Offsets", new Vector4 (0.0f, fgAdjustment , 0.0f, fgAdjustment)); - RenderTexture temp1 = RenderTexture.GetTemporary (rtW, rtH, 0, fromTo.format); - Graphics.Blit (temp2, temp1, dofHdrMaterial, 2); - RenderTexture.ReleaseTemporary(temp2); - - dofHdrMaterial.SetVector ("_Offsets", new Vector4 (fgAdjustment, 0.0f, 0.0f, fgAdjustment)); - temp2 = RenderTexture.GetTemporary (rtW, rtH, 0, fromTo.format); - Graphics.Blit (temp1, temp2, dofHdrMaterial, 2); - RenderTexture.ReleaseTemporary(temp1); - - // "merge up" with background COC - dofHdrMaterial.SetTexture("_FgOverlap", temp2); - fromTo.MarkRestoreExpected(); // only touching alpha channel, RT restore expected - Graphics.Blit (fromTo, fromTo, dofHdrMaterial, 13); - RenderTexture.ReleaseTemporary(temp2); - } - else { - // capture full coc in alpha channel (fromTo is not read, but bound to detect screen flip) - fromTo.MarkRestoreExpected(); // only touching alpha channel, RT restore expected - Graphics.Blit (fromTo, fromTo, dofHdrMaterial, 0); - } - } - - void OnRenderImage (RenderTexture source, RenderTexture destination) { - if (!CheckResources ()) { - Graphics.Blit (source, destination); - return; - } - - // clamp & prepare values so they make sense - - if (aperture < 0.0f) aperture = 0.0f; - if (maxBlurSize < 0.1f) maxBlurSize = 0.1f; - focalSize = Mathf.Clamp(focalSize, 0.0f, 2.0f); - internalBlurWidth = Mathf.Max(maxBlurSize, 0.0f); - - // focal & coc calculations - - focalDistance01 = (focalTransform) ? (cachedCamera.WorldToViewportPoint (focalTransform.position)).z / (cachedCamera.farClipPlane) : FocalDistance01 (focalLength); - dofHdrMaterial.SetVector("_CurveParams", new Vector4(1.0f, focalSize, (1.0f / (1.0f - aperture) - 1.0f), focalDistance01)); - - // possible render texture helpers - - RenderTexture rtLow = null; - RenderTexture rtLow2 = null; - RenderTexture rtSuperLow1 = null; - RenderTexture rtSuperLow2 = null; - float fgBlurDist = internalBlurWidth * foregroundOverlap; - - if (visualizeFocus) - { - - // - // 2. - // visualize coc - // - // - - WriteCoc (source, true); - Graphics.Blit (source, destination, dofHdrMaterial, 16); - } - else if ((blurType == BlurType.DX11) && dx11bokehMaterial) - { - - // - // 1. - // optimized dx11 bokeh scatter - // - // - - - if (highResolution) { - - internalBlurWidth = internalBlurWidth < 0.1f ? 0.1f : internalBlurWidth; - fgBlurDist = internalBlurWidth * foregroundOverlap; - - rtLow = RenderTexture.GetTemporary (source.width, source.height, 0, source.format); - - var dest2= RenderTexture.GetTemporary (source.width, source.height, 0, source.format); - - // capture COC - WriteCoc (source, false); - - // blur a bit so we can do a frequency check - rtSuperLow1 = RenderTexture.GetTemporary(source.width>>1, source.height>>1, 0, source.format); - rtSuperLow2 = RenderTexture.GetTemporary(source.width>>1, source.height>>1, 0, source.format); - - Graphics.Blit(source, rtSuperLow1, dofHdrMaterial, 15); - dofHdrMaterial.SetVector ("_Offsets", new Vector4 (0.0f, 1.5f , 0.0f, 1.5f)); - Graphics.Blit (rtSuperLow1, rtSuperLow2, dofHdrMaterial, 19); - dofHdrMaterial.SetVector ("_Offsets", new Vector4 (1.5f, 0.0f, 0.0f, 1.5f)); - Graphics.Blit (rtSuperLow2, rtSuperLow1, dofHdrMaterial, 19); - - // capture fg coc - if (nearBlur) - Graphics.Blit (source, rtSuperLow2, dofHdrMaterial, 4); - - dx11bokehMaterial.SetTexture ("_BlurredColor", rtSuperLow1); - dx11bokehMaterial.SetFloat ("_SpawnHeuristic", dx11SpawnHeuristic); - dx11bokehMaterial.SetVector ("_BokehParams", new Vector4(dx11BokehScale, dx11BokehIntensity, Mathf.Clamp(dx11BokehThreshold, 0.005f, 4.0f), internalBlurWidth)); - dx11bokehMaterial.SetTexture ("_FgCocMask", nearBlur ? rtSuperLow2 : null); - - // collect bokeh candidates and replace with a darker pixel - Graphics.SetRandomWriteTarget (1, cbPoints); - Graphics.Blit (source, rtLow, dx11bokehMaterial, 0); - Graphics.ClearRandomWriteTargets (); - - // fg coc blur happens here (after collect!) - if (nearBlur) { - dofHdrMaterial.SetVector ("_Offsets", new Vector4 (0.0f, fgBlurDist , 0.0f, fgBlurDist)); - Graphics.Blit (rtSuperLow2, rtSuperLow1, dofHdrMaterial, 2); - dofHdrMaterial.SetVector ("_Offsets", new Vector4 (fgBlurDist, 0.0f, 0.0f, fgBlurDist)); - Graphics.Blit (rtSuperLow1, rtSuperLow2, dofHdrMaterial, 2); - - // merge fg coc with bg coc - Graphics.Blit (rtSuperLow2, rtLow, dofHdrMaterial, 3); - } - - // NEW: LAY OUT ALPHA on destination target so we get nicer outlines for the high rez version - Graphics.Blit (rtLow, dest2, dofHdrMaterial, 20); - - // box blur (easier to merge with bokeh buffer) - dofHdrMaterial.SetVector ("_Offsets", new Vector4 (internalBlurWidth, 0.0f , 0.0f, internalBlurWidth)); - Graphics.Blit (rtLow, source, dofHdrMaterial, 5); - dofHdrMaterial.SetVector ("_Offsets", new Vector4 (0.0f, internalBlurWidth, 0.0f, internalBlurWidth)); - Graphics.Blit (source, dest2, dofHdrMaterial, 21); - - // apply bokeh candidates - Graphics.SetRenderTarget (dest2); - ComputeBuffer.CopyCount (cbPoints, cbDrawArgs, 0); - dx11bokehMaterial.SetBuffer ("pointBuffer", cbPoints); - dx11bokehMaterial.SetTexture ("_MainTex", dx11BokehTexture); - dx11bokehMaterial.SetVector ("_Screen", new Vector3(1.0f/(1.0f*source.width), 1.0f/(1.0f*source.height), internalBlurWidth)); - dx11bokehMaterial.SetPass (2); - - Graphics.DrawProceduralIndirect (MeshTopology.Points, cbDrawArgs, 0); - - Graphics.Blit (dest2, destination); // hackaround for DX11 high resolution flipfun (OPTIMIZEME) - - RenderTexture.ReleaseTemporary(dest2); - RenderTexture.ReleaseTemporary(rtSuperLow1); - RenderTexture.ReleaseTemporary(rtSuperLow2); - } - else { - rtLow = RenderTexture.GetTemporary (source.width>>1, source.height>>1, 0, source.format); - rtLow2 = RenderTexture.GetTemporary (source.width>>1, source.height>>1, 0, source.format); - - fgBlurDist = internalBlurWidth * foregroundOverlap; - - // capture COC & color in low resolution - WriteCoc (source, false); - source.filterMode = FilterMode.Bilinear; - Graphics.Blit (source, rtLow, dofHdrMaterial, 6); - - // blur a bit so we can do a frequency check - rtSuperLow1 = RenderTexture.GetTemporary(rtLow.width>>1, rtLow.height>>1, 0, rtLow.format); - rtSuperLow2 = RenderTexture.GetTemporary(rtLow.width>>1, rtLow.height>>1, 0, rtLow.format); - - Graphics.Blit(rtLow, rtSuperLow1, dofHdrMaterial, 15); - dofHdrMaterial.SetVector ("_Offsets", new Vector4 (0.0f, 1.5f , 0.0f, 1.5f)); - Graphics.Blit (rtSuperLow1, rtSuperLow2, dofHdrMaterial, 19); - dofHdrMaterial.SetVector ("_Offsets", new Vector4 (1.5f, 0.0f, 0.0f, 1.5f)); - Graphics.Blit (rtSuperLow2, rtSuperLow1, dofHdrMaterial, 19); - - RenderTexture rtLow3 = null; - - if (nearBlur) { - // capture fg coc - rtLow3 = RenderTexture.GetTemporary (source.width>>1, source.height>>1, 0, source.format); - Graphics.Blit (source, rtLow3, dofHdrMaterial, 4); - } - - dx11bokehMaterial.SetTexture ("_BlurredColor", rtSuperLow1); - dx11bokehMaterial.SetFloat ("_SpawnHeuristic", dx11SpawnHeuristic); - dx11bokehMaterial.SetVector ("_BokehParams", new Vector4(dx11BokehScale, dx11BokehIntensity, Mathf.Clamp(dx11BokehThreshold, 0.005f, 4.0f), internalBlurWidth)); - dx11bokehMaterial.SetTexture ("_FgCocMask", rtLow3); - - // collect bokeh candidates and replace with a darker pixel - Graphics.SetRandomWriteTarget (1, cbPoints); - Graphics.Blit (rtLow, rtLow2, dx11bokehMaterial, 0); - Graphics.ClearRandomWriteTargets (); - - RenderTexture.ReleaseTemporary(rtSuperLow1); - RenderTexture.ReleaseTemporary(rtSuperLow2); - - // fg coc blur happens here (after collect!) - if (nearBlur) { - dofHdrMaterial.SetVector ("_Offsets", new Vector4 (0.0f, fgBlurDist , 0.0f, fgBlurDist)); - Graphics.Blit (rtLow3, rtLow, dofHdrMaterial, 2); - dofHdrMaterial.SetVector ("_Offsets", new Vector4 (fgBlurDist, 0.0f, 0.0f, fgBlurDist)); - Graphics.Blit (rtLow, rtLow3, dofHdrMaterial, 2); - - // merge fg coc with bg coc - Graphics.Blit (rtLow3, rtLow2, dofHdrMaterial, 3); - } - - // box blur (easier to merge with bokeh buffer) - dofHdrMaterial.SetVector ("_Offsets", new Vector4 (internalBlurWidth, 0.0f , 0.0f, internalBlurWidth)); - Graphics.Blit (rtLow2, rtLow, dofHdrMaterial, 5); - dofHdrMaterial.SetVector ("_Offsets", new Vector4 (0.0f, internalBlurWidth, 0.0f, internalBlurWidth)); - Graphics.Blit (rtLow, rtLow2, dofHdrMaterial, 5); - - // apply bokeh candidates - Graphics.SetRenderTarget (rtLow2); - ComputeBuffer.CopyCount (cbPoints, cbDrawArgs, 0); - dx11bokehMaterial.SetBuffer ("pointBuffer", cbPoints); - dx11bokehMaterial.SetTexture ("_MainTex", dx11BokehTexture); - dx11bokehMaterial.SetVector ("_Screen", new Vector3(1.0f/(1.0f*rtLow2.width), 1.0f/(1.0f*rtLow2.height), internalBlurWidth)); - dx11bokehMaterial.SetPass (1); - Graphics.DrawProceduralIndirect (MeshTopology.Points, cbDrawArgs, 0); - - // upsample & combine - dofHdrMaterial.SetTexture ("_LowRez", rtLow2); - dofHdrMaterial.SetTexture ("_FgOverlap", rtLow3); - dofHdrMaterial.SetVector ("_Offsets", ((1.0f*source.width)/(1.0f*rtLow2.width)) * internalBlurWidth * Vector4.one); - Graphics.Blit (source, destination, dofHdrMaterial, 9); - - if (rtLow3) RenderTexture.ReleaseTemporary(rtLow3); - } - } - else - { - - // - // 2. - // poisson disc style blur in low resolution - // - // - - source.filterMode = FilterMode.Bilinear; - - if (highResolution) internalBlurWidth *= 2.0f; - - WriteCoc (source, true); - - rtLow = RenderTexture.GetTemporary (source.width >> 1, source.height >> 1, 0, source.format); - rtLow2 = RenderTexture.GetTemporary (source.width >> 1, source.height >> 1, 0, source.format); - - int blurPass = (blurSampleCount == BlurSampleCount.High || blurSampleCount == BlurSampleCount.Medium) ? 17 : 11; - - if (highResolution) { - dofHdrMaterial.SetVector ("_Offsets", new Vector4 (0.0f, internalBlurWidth, 0.025f, internalBlurWidth)); - Graphics.Blit (source, destination, dofHdrMaterial, blurPass); - } - else { - dofHdrMaterial.SetVector ("_Offsets", new Vector4 (0.0f, internalBlurWidth, 0.1f, internalBlurWidth)); - - // blur - Graphics.Blit (source, rtLow, dofHdrMaterial, 6); - Graphics.Blit (rtLow, rtLow2, dofHdrMaterial, blurPass); - - // cheaper blur in high resolution, upsample and combine - dofHdrMaterial.SetTexture("_LowRez", rtLow2); - dofHdrMaterial.SetTexture("_FgOverlap", null); - dofHdrMaterial.SetVector ("_Offsets", Vector4.one * ((1.0f*source.width)/(1.0f*rtLow2.width)) * internalBlurWidth); - Graphics.Blit (source, destination, dofHdrMaterial, blurSampleCount == BlurSampleCount.High ? 18 : 12); - } - } - - if (rtLow) RenderTexture.ReleaseTemporary(rtLow); - if (rtLow2) RenderTexture.ReleaseTemporary(rtLow2); - } - } -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/DepthOfField.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/DepthOfField.cs.meta deleted file mode 100644 index 82a4f57..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/DepthOfField.cs.meta +++ /dev/null @@ -1,13 +0,0 @@ -fileFormatVersion: 2 -guid: bd70d448b18cfbc46af26466f752332c -MonoImporter: - serializedVersion: 2 - defaultReferences: - - focalTransform: {instanceID: 0} - - dofHdrShader: {fileID: 4800000, guid: acd613035ff3e455e8abf23fdc8c8c24, type: 3} - - dx11BokehShader: {fileID: 4800000, guid: d8e82664aa8686642a424c88ab10164a, type: 3} - - dx11BokehTexture: {fileID: 2800000, guid: a4cdca73d61814d33ac1587f6c163bca, type: 3} - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/EdgeDetection.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/EdgeDetection.cs deleted file mode 100644 index 9f95aa0..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/EdgeDetection.cs +++ /dev/null @@ -1,89 +0,0 @@ -using System; -using UnityEngine; - -namespace UnityStandardAssets.ImageEffects -{ - [ExecuteInEditMode] - [RequireComponent (typeof (Camera))] - [AddComponentMenu ("Image Effects/Edge Detection/Edge Detection")] - public class EdgeDetection : PostEffectsBase - { - public enum EdgeDetectMode - { - TriangleDepthNormals = 0, - RobertsCrossDepthNormals = 1, - SobelDepth = 2, - SobelDepthThin = 3, - TriangleLuminance = 4, - } - - - public EdgeDetectMode mode = EdgeDetectMode.SobelDepthThin; - public float sensitivityDepth = 1.0f; - public float sensitivityNormals = 1.0f; - public float lumThreshold = 0.2f; - public float edgeExp = 1.0f; - public float sampleDist = 1.0f; - public float edgesOnly = 0.0f; - public Color edgesOnlyBgColor = Color.white; - - public Shader edgeDetectShader; - private Material edgeDetectMaterial = null; - private EdgeDetectMode oldMode = EdgeDetectMode.SobelDepthThin; - - - public override bool CheckResources () - { - CheckSupport (true); - - edgeDetectMaterial = CheckShaderAndCreateMaterial (edgeDetectShader,edgeDetectMaterial); - if (mode != oldMode) - SetCameraFlag (); - - oldMode = mode; - - if (!isSupported) - ReportAutoDisable (); - return isSupported; - } - - - new void Start () - { - oldMode = mode; - } - - void SetCameraFlag () - { - if (mode == EdgeDetectMode.SobelDepth || mode == EdgeDetectMode.SobelDepthThin) - GetComponent().depthTextureMode |= DepthTextureMode.Depth; - else if (mode == EdgeDetectMode.TriangleDepthNormals || mode == EdgeDetectMode.RobertsCrossDepthNormals) - GetComponent().depthTextureMode |= DepthTextureMode.DepthNormals; - } - - void OnEnable () - { - SetCameraFlag(); - } - - [ImageEffectOpaque] - void OnRenderImage (RenderTexture source, RenderTexture destination) - { - if (CheckResources () == false) - { - Graphics.Blit (source, destination); - return; - } - - Vector2 sensitivity = new Vector2 (sensitivityDepth, sensitivityNormals); - edgeDetectMaterial.SetVector ("_Sensitivity", new Vector4 (sensitivity.x, sensitivity.y, 1.0f, sensitivity.y)); - edgeDetectMaterial.SetFloat ("_BgFade", edgesOnly); - edgeDetectMaterial.SetFloat ("_SampleDistance", sampleDist); - edgeDetectMaterial.SetVector ("_BgColor", edgesOnlyBgColor); - edgeDetectMaterial.SetFloat ("_Exponent", edgeExp); - edgeDetectMaterial.SetFloat ("_Threshold", lumThreshold); - - Graphics.Blit (source, destination, edgeDetectMaterial, (int) mode); - } - } -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/EdgeDetection.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/EdgeDetection.cs.meta deleted file mode 100644 index 22ad6e8..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/EdgeDetection.cs.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 730475ee64f9a894bbac0d9e6f22e813 -MonoImporter: - serializedVersion: 2 - defaultReferences: - - edgeDetectShader: {fileID: 4800000, guid: 0d1644bdf064147baa97f235fc5b4903, type: 3} - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/Fisheye.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/Fisheye.cs deleted file mode 100644 index 069affa..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/Fisheye.cs +++ /dev/null @@ -1,46 +0,0 @@ -using System; -using UnityEngine; - -namespace UnityStandardAssets.ImageEffects -{ - [ExecuteInEditMode] - [RequireComponent (typeof(Camera))] - [AddComponentMenu ("Image Effects/Displacement/Fisheye")] - public class Fisheye : PostEffectsBase - { - [Range(0.0f, 1.5f)] - public float strengthX = 0.05f; - [Range(0.0f, 1.5f)] - public float strengthY = 0.05f; - - public Shader fishEyeShader = null; - private Material fisheyeMaterial = null; - - - public override bool CheckResources () - { - CheckSupport (false); - fisheyeMaterial = CheckShaderAndCreateMaterial(fishEyeShader,fisheyeMaterial); - - if (!isSupported) - ReportAutoDisable (); - return isSupported; - } - - void OnRenderImage (RenderTexture source, RenderTexture destination) - { - if (CheckResources()==false) - { - Graphics.Blit (source, destination); - return; - } - - float oneOverBaseSize = 80.0f / 512.0f; // to keep values more like in the old version of fisheye - - float ar = (source.width * 1.0f) / (source.height * 1.0f); - - fisheyeMaterial.SetVector ("intensity", new Vector4 (strengthX * ar * oneOverBaseSize, strengthY * oneOverBaseSize, strengthX * ar * oneOverBaseSize, strengthY * oneOverBaseSize)); - Graphics.Blit (source, destination, fisheyeMaterial); - } - } -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/Fisheye.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/Fisheye.cs.meta deleted file mode 100644 index deb7976..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/Fisheye.cs.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 4739c22ef73ad62488fe344c8fe9addd -MonoImporter: - serializedVersion: 2 - defaultReferences: - - fishEyeShader: {fileID: 4800000, guid: 874ceab4425f64bccb1d14032f4452b1, type: 3} - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/GlobalFog.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/GlobalFog.cs deleted file mode 100644 index 3d17fc2..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/GlobalFog.cs +++ /dev/null @@ -1,100 +0,0 @@ -using System; -using UnityEngine; - -namespace UnityStandardAssets.ImageEffects -{ - [ExecuteInEditMode] - [RequireComponent (typeof(Camera))] - [AddComponentMenu ("Image Effects/Rendering/Global Fog")] - class GlobalFog : PostEffectsBase - { - [Tooltip("Apply distance-based fog?")] - public bool distanceFog = true; - [Tooltip("Exclude far plane pixels from distance-based fog? (Skybox or clear color)")] - public bool excludeFarPixels = true; - [Tooltip("Distance fog is based on radial distance from camera when checked")] - public bool useRadialDistance = false; - [Tooltip("Apply height-based fog?")] - public bool heightFog = true; - [Tooltip("Fog top Y coordinate")] - public float height = 1.0f; - [Range(0.001f,10.0f)] - public float heightDensity = 2.0f; - [Tooltip("Push fog away from the camera by this amount")] - public float startDistance = 0.0f; - - public Shader fogShader = null; - private Material fogMaterial = null; - - - public override bool CheckResources () - { - CheckSupport (true); - - fogMaterial = CheckShaderAndCreateMaterial (fogShader, fogMaterial); - - if (!isSupported) - ReportAutoDisable (); - return isSupported; - } - - [ImageEffectOpaque] - void OnRenderImage(RenderTexture source, RenderTexture destination) - { - if (CheckResources() == false || (!distanceFog && !heightFog)) - { - Graphics.Blit(source, destination); - return; - } - - Camera cam = GetComponent(); - Transform camtr = cam.transform; - - Vector3[] frustumCorners = new Vector3[4]; - cam.CalculateFrustumCorners(new Rect(0, 0, 1, 1), cam.farClipPlane, cam.stereoActiveEye, frustumCorners); - var bottomLeft = camtr.TransformVector(frustumCorners[0]); - var topLeft = camtr.TransformVector(frustumCorners[1]); - var topRight = camtr.TransformVector(frustumCorners[2]); - var bottomRight = camtr.TransformVector(frustumCorners[3]); - - Matrix4x4 frustumCornersArray = Matrix4x4.identity; - frustumCornersArray.SetRow(0, bottomLeft); - frustumCornersArray.SetRow(1, bottomRight); - frustumCornersArray.SetRow(2, topLeft); - frustumCornersArray.SetRow(3, topRight); - - var camPos = camtr.position; - float FdotC = camPos.y - height; - float paramK = (FdotC <= 0.0f ? 1.0f : 0.0f); - float excludeDepth = (excludeFarPixels ? 1.0f : 2.0f); - fogMaterial.SetMatrix("_FrustumCornersWS", frustumCornersArray); - fogMaterial.SetVector("_CameraWS", camPos); - fogMaterial.SetVector("_HeightParams", new Vector4(height, FdotC, paramK, heightDensity * 0.5f)); - fogMaterial.SetVector("_DistanceParams", new Vector4(-Mathf.Max(startDistance, 0.0f), excludeDepth, 0, 0)); - - var sceneMode = RenderSettings.fogMode; - var sceneDensity = RenderSettings.fogDensity; - var sceneStart = RenderSettings.fogStartDistance; - var sceneEnd = RenderSettings.fogEndDistance; - Vector4 sceneParams; - bool linear = (sceneMode == FogMode.Linear); - float diff = linear ? sceneEnd - sceneStart : 0.0f; - float invDiff = Mathf.Abs(diff) > 0.0001f ? 1.0f / diff : 0.0f; - sceneParams.x = sceneDensity * 1.2011224087f; // density / sqrt(ln(2)), used by Exp2 fog mode - sceneParams.y = sceneDensity * 1.4426950408f; // density / ln(2), used by Exp fog mode - sceneParams.z = linear ? -invDiff : 0.0f; - sceneParams.w = linear ? sceneEnd * invDiff : 0.0f; - fogMaterial.SetVector("_SceneFogParams", sceneParams); - fogMaterial.SetVector("_SceneFogMode", new Vector4((int)sceneMode, useRadialDistance ? 1 : 0, 0, 0)); - - int pass = 0; - if (distanceFog && heightFog) - pass = 0; // distance + height - else if (distanceFog) - pass = 1; // distance only - else - pass = 2; // height only - Graphics.Blit(source, destination, fogMaterial, pass); - } - } -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/GlobalFog.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/GlobalFog.cs.meta deleted file mode 100644 index fa21d25..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/GlobalFog.cs.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 76b5ec6153a1d55438228df10fe66844 -MonoImporter: - serializedVersion: 2 - defaultReferences: - - fogShader: {fileID: 4800000, guid: 70d8568987ac0499f952b54c7c13e265, type: 3} - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/Grayscale.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/Grayscale.cs deleted file mode 100644 index 369d5cd..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/Grayscale.cs +++ /dev/null @@ -1,21 +0,0 @@ -using System; -using UnityEngine; - -namespace UnityStandardAssets.ImageEffects -{ - [ExecuteInEditMode] - [AddComponentMenu("Image Effects/Color Adjustments/Grayscale")] - public class Grayscale : ImageEffectBase { - public Texture textureRamp; - - [Range(-1.0f,1.0f)] - public float rampOffset; - - // Called by camera to apply image effect - void OnRenderImage (RenderTexture source, RenderTexture destination) { - material.SetTexture("_RampTex", textureRamp); - material.SetFloat("_RampOffset", rampOffset); - Graphics.Blit (source, destination, material); - } - } -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/Grayscale.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/Grayscale.cs.meta deleted file mode 100644 index b23db62..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/Grayscale.cs.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 243a781cad112c75d0008dfa8d76c639 -MonoImporter: - serializedVersion: 2 - defaultReferences: - - shader: {fileID: 4800000, guid: daf9781cad112c75d0008dfa8d76c639, type: 3} - executionOrder: 0 - icon: {instanceID: 0} - userData: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/ImageEffectBase.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/ImageEffectBase.cs deleted file mode 100644 index 0158215..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/ImageEffectBase.cs +++ /dev/null @@ -1,55 +0,0 @@ -using System; -using UnityEngine; - -namespace UnityStandardAssets.ImageEffects -{ - [RequireComponent(typeof (Camera))] - [AddComponentMenu("")] - public class ImageEffectBase : MonoBehaviour - { - /// Provides a shader property that is set in the inspector - /// and a material instantiated from the shader - public Shader shader; - - private Material m_Material; - - - protected virtual void Start() - { - // Disable if we don't support image effects - if (!SystemInfo.supportsImageEffects) - { - enabled = false; - return; - } - - // Disable the image effect if the shader can't - // run on the users graphics card - if (!shader || !shader.isSupported) - enabled = false; - } - - - protected Material material - { - get - { - if (m_Material == null) - { - m_Material = new Material(shader); - m_Material.hideFlags = HideFlags.HideAndDontSave; - } - return m_Material; - } - } - - - protected virtual void OnDisable() - { - if (m_Material) - { - DestroyImmediate(m_Material); - } - } - } -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/ImageEffectBase.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/ImageEffectBase.cs.meta deleted file mode 100644 index f3c0025..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/ImageEffectBase.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: f6469eb0ad1119d6d00011d98d76c639 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/ImageEffects.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/ImageEffects.cs deleted file mode 100644 index c8d4afc..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/ImageEffects.cs +++ /dev/null @@ -1,42 +0,0 @@ -using System; -using UnityEngine; - -namespace UnityStandardAssets.ImageEffects -{ - /// A Utility class for performing various image based rendering tasks. - [AddComponentMenu("")] - public class ImageEffects - { - public static void RenderDistortion(Material material, RenderTexture source, RenderTexture destination, float angle, Vector2 center, Vector2 radius) - { - bool invertY = source.texelSize.y < 0.0f; - if (invertY) - { - center.y = 1.0f - center.y; - angle = -angle; - } - - Matrix4x4 rotationMatrix = Matrix4x4.TRS(Vector3.zero, Quaternion.Euler(0, 0, angle), Vector3.one); - - material.SetMatrix("_RotationMatrix", rotationMatrix); - material.SetVector("_CenterRadius", new Vector4(center.x, center.y, radius.x, radius.y)); - material.SetFloat("_Angle", angle*Mathf.Deg2Rad); - - Graphics.Blit(source, destination, material); - } - - - [Obsolete("Use Graphics.Blit(source,dest) instead")] - public static void Blit(RenderTexture source, RenderTexture dest) - { - Graphics.Blit(source, dest); - } - - - [Obsolete("Use Graphics.Blit(source, destination, material) instead")] - public static void BlitWithMaterial(Material material, RenderTexture source, RenderTexture dest) - { - Graphics.Blit(source, dest, material); - } - } -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/ImageEffects.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/ImageEffects.cs.meta deleted file mode 100644 index 9d82a11..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/ImageEffects.cs.meta +++ /dev/null @@ -1,17 +0,0 @@ -fileFormatVersion: 2 -guid: 89a037199d11087f1100e2b844295342 -MonoImporter: - serializedVersion: 2 - defaultReferences: - - blitCopyShader: {fileID: 4800000, guid: 3338b5ea2f3cb594698fae65cf060346, type: 3} - - blitMultiplyShader: {fileID: 4800000, guid: 7034c801b78acab448cdcf845f7c352d, - type: 3} - - blitMultiply2XShader: {fileID: 4800000, guid: cde82987e0a884c4788c65f7b54390e8, - type: 3} - - blitAddShader: {fileID: 4800000, guid: c7515f214a63bdb42b6ae6335a00a8a4, type: 3} - - blitAddSmoothShader: {fileID: 4800000, guid: 7741a77a7c455d0418bc429bd508dc87, - type: 3} - - blitBlendShader: {fileID: 4800000, guid: f1cf7e9c98754c4429ff0f7cc1d9dd7b, type: 3} - executionOrder: 0 - icon: {instanceID: 0} - userData: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/MotionBlur.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/MotionBlur.cs deleted file mode 100644 index 2b7968b..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/MotionBlur.cs +++ /dev/null @@ -1,71 +0,0 @@ -using System; -using UnityEngine; - -// This class implements simple ghosting type Motion Blur. -// If Extra Blur is selected, the scene will allways be a little blurred, -// as it is scaled to a smaller resolution. -// The effect works by accumulating the previous frames in an accumulation -// texture. -namespace UnityStandardAssets.ImageEffects -{ - [ExecuteInEditMode] - [AddComponentMenu("Image Effects/Blur/Motion Blur (Color Accumulation)")] - [RequireComponent(typeof(Camera))] - public class MotionBlur : ImageEffectBase - { - [Range(0.0f, 0.92f)] - public float blurAmount = 0.8f; - public bool extraBlur = false; - - private RenderTexture accumTexture; - - override protected void Start() - { - base.Start(); - } - - override protected void OnDisable() - { - base.OnDisable(); - DestroyImmediate(accumTexture); - } - - // Called by camera to apply image effect - void OnRenderImage (RenderTexture source, RenderTexture destination) - { - // Create the accumulation texture - if (accumTexture == null || accumTexture.width != source.width || accumTexture.height != source.height) - { - DestroyImmediate(accumTexture); - accumTexture = new RenderTexture(source.width, source.height, 0); - accumTexture.hideFlags = HideFlags.HideAndDontSave; - Graphics.Blit( source, accumTexture ); - } - - // If Extra Blur is selected, downscale the texture to 4x4 smaller resolution. - if (extraBlur) - { - RenderTexture blurbuffer = RenderTexture.GetTemporary(source.width/4, source.height/4, 0); - accumTexture.MarkRestoreExpected(); - Graphics.Blit(accumTexture, blurbuffer); - Graphics.Blit(blurbuffer,accumTexture); - RenderTexture.ReleaseTemporary(blurbuffer); - } - - // Clamp the motion blur variable, so it can never leave permanent trails in the image - blurAmount = Mathf.Clamp( blurAmount, 0.0f, 0.92f ); - - // Setup the texture and floating point values in the shader - material.SetTexture("_MainTex", accumTexture); - material.SetFloat("_AccumOrig", 1.0F-blurAmount); - - // We are accumulating motion over frames without clear/discard - // by design, so silence any performance warnings from Unity - accumTexture.MarkRestoreExpected(); - - // Render the image using the motion blur shader - Graphics.Blit (source, accumTexture, material); - Graphics.Blit (accumTexture, destination); - } - } -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/MotionBlur.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/MotionBlur.cs.meta deleted file mode 100644 index 5fe9ed8..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/MotionBlur.cs.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 478a2083ad114a07d000fbfb8d76c639 -MonoImporter: - serializedVersion: 2 - defaultReferences: - - shader: {fileID: 4800000, guid: e9ba2083ad114a07d000fbfb8d76c639, type: 3} - executionOrder: 0 - icon: {instanceID: 0} - userData: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/NoiseAndGrain.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/NoiseAndGrain.cs deleted file mode 100644 index 3230bdb..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/NoiseAndGrain.cs +++ /dev/null @@ -1,181 +0,0 @@ -using System; -using UnityEngine; -using Random = UnityEngine.Random; - -namespace UnityStandardAssets.ImageEffects -{ - [ExecuteInEditMode] - [RequireComponent (typeof(Camera))] - [AddComponentMenu ("Image Effects/Noise/Noise And Grain (Filmic)")] - public class NoiseAndGrain : PostEffectsBase - { - - public float intensityMultiplier = 0.25f; - - public float generalIntensity = 0.5f; - public float blackIntensity = 1.0f; - public float whiteIntensity = 1.0f; - public float midGrey = 0.2f; - - public bool dx11Grain = false; - public float softness = 0.0f; - public bool monochrome = false; - - public Vector3 intensities = new Vector3(1.0f, 1.0f, 1.0f); - public Vector3 tiling = new Vector3(64.0f, 64.0f, 64.0f); - public float monochromeTiling = 64.0f; - - public FilterMode filterMode = FilterMode.Bilinear; - - public Texture2D noiseTexture; - - public Shader noiseShader; - private Material noiseMaterial = null; - - public Shader dx11NoiseShader; - private Material dx11NoiseMaterial = null; - - private static float TILE_AMOUNT = 64.0f; - - - public override bool CheckResources () - { - CheckSupport (false); - - noiseMaterial = CheckShaderAndCreateMaterial (noiseShader, noiseMaterial); - - if (dx11Grain && supportDX11) - { -#if UNITY_EDITOR - dx11NoiseShader = Shader.Find("Hidden/NoiseAndGrainDX11"); -#endif - dx11NoiseMaterial = CheckShaderAndCreateMaterial (dx11NoiseShader, dx11NoiseMaterial); - } - - if (!isSupported) - ReportAutoDisable (); - return isSupported; - } - - void OnRenderImage (RenderTexture source, RenderTexture destination) - { - if (CheckResources()==false || (null==noiseTexture)) - { - Graphics.Blit (source, destination); - if (null==noiseTexture) { - Debug.LogWarning("Noise & Grain effect failing as noise texture is not assigned. please assign.", transform); - } - return; - } - - softness = Mathf.Clamp(softness, 0.0f, 0.99f); - - if (dx11Grain && supportDX11) - { - // We have a fancy, procedural noise pattern in this version, so no texture needed - - dx11NoiseMaterial.SetFloat("_DX11NoiseTime", Time.frameCount); - dx11NoiseMaterial.SetTexture ("_NoiseTex", noiseTexture); - dx11NoiseMaterial.SetVector ("_NoisePerChannel", monochrome ? Vector3.one : intensities); - dx11NoiseMaterial.SetVector ("_MidGrey", new Vector3(midGrey, 1.0f/(1.0f-midGrey), -1.0f/midGrey)); - dx11NoiseMaterial.SetVector ("_NoiseAmount", new Vector3(generalIntensity, blackIntensity, whiteIntensity) * intensityMultiplier); - - if (softness > Mathf.Epsilon) - { - RenderTexture rt = RenderTexture.GetTemporary((int) (source.width * (1.0f-softness)), (int) (source.height * (1.0f-softness))); - DrawNoiseQuadGrid (source, rt, dx11NoiseMaterial, noiseTexture, monochrome ? 3 : 2); - dx11NoiseMaterial.SetTexture("_NoiseTex", rt); - Graphics.Blit(source, destination, dx11NoiseMaterial, 4); - RenderTexture.ReleaseTemporary(rt); - } - else - DrawNoiseQuadGrid (source, destination, dx11NoiseMaterial, noiseTexture, (monochrome ? 1 : 0)); - } - else - { - // normal noise (DX9 style) - - if (noiseTexture) { - noiseTexture.wrapMode = TextureWrapMode.Repeat; - noiseTexture.filterMode = filterMode; - } - - noiseMaterial.SetTexture ("_NoiseTex", noiseTexture); - noiseMaterial.SetVector ("_NoisePerChannel", monochrome ? Vector3.one : intensities); - noiseMaterial.SetVector ("_NoiseTilingPerChannel", monochrome ? Vector3.one * monochromeTiling : tiling); - noiseMaterial.SetVector ("_MidGrey", new Vector3(midGrey, 1.0f/(1.0f-midGrey), -1.0f/midGrey)); - noiseMaterial.SetVector ("_NoiseAmount", new Vector3(generalIntensity, blackIntensity, whiteIntensity) * intensityMultiplier); - - if (softness > Mathf.Epsilon) - { - RenderTexture rt2 = RenderTexture.GetTemporary((int) (source.width * (1.0f-softness)), (int) (source.height * (1.0f-softness))); - DrawNoiseQuadGrid (source, rt2, noiseMaterial, noiseTexture, 2); - noiseMaterial.SetTexture("_NoiseTex", rt2); - Graphics.Blit(source, destination, noiseMaterial, 1); - RenderTexture.ReleaseTemporary(rt2); - } - else - DrawNoiseQuadGrid (source, destination, noiseMaterial, noiseTexture, 0); - } - } - - static void DrawNoiseQuadGrid (RenderTexture source, RenderTexture dest, Material fxMaterial, Texture2D noise, int passNr) - { - RenderTexture.active = dest; - - float noiseSize = (noise.width * 1.0f); - float subDs = (1.0f * source.width) / TILE_AMOUNT; - - fxMaterial.SetTexture ("_MainTex", source); - - GL.PushMatrix (); - GL.LoadOrtho (); - - float aspectCorrection = (1.0f * source.width) / (1.0f * source.height); - float stepSizeX = 1.0f / subDs; - float stepSizeY = stepSizeX * aspectCorrection; - float texTile = noiseSize / (noise.width * 1.0f); - - fxMaterial.SetPass (passNr); - - GL.Begin (GL.QUADS); - - for (float x1 = 0.0f; x1 < 1.0f; x1 += stepSizeX) - { - for (float y1 = 0.0f; y1 < 1.0f; y1 += stepSizeY) - { - float tcXStart = Random.Range (0.0f, 1.0f); - float tcYStart = Random.Range (0.0f, 1.0f); - - //Vector3 v3 = Random.insideUnitSphere; - //Color c = new Color(v3.x, v3.y, v3.z); - - tcXStart = Mathf.Floor(tcXStart*noiseSize) / noiseSize; - tcYStart = Mathf.Floor(tcYStart*noiseSize) / noiseSize; - - float texTileMod = 1.0f / noiseSize; - - GL.MultiTexCoord2 (0, tcXStart, tcYStart); - GL.MultiTexCoord2 (1, 0.0f, 0.0f); - //GL.Color( c ); - GL.Vertex3 (x1, y1, 0.1f); - GL.MultiTexCoord2 (0, tcXStart + texTile * texTileMod, tcYStart); - GL.MultiTexCoord2 (1, 1.0f, 0.0f); - //GL.Color( c ); - GL.Vertex3 (x1 + stepSizeX, y1, 0.1f); - GL.MultiTexCoord2 (0, tcXStart + texTile * texTileMod, tcYStart + texTile * texTileMod); - GL.MultiTexCoord2 (1, 1.0f, 1.0f); - //GL.Color( c ); - GL.Vertex3 (x1 + stepSizeX, y1 + stepSizeY, 0.1f); - GL.MultiTexCoord2 (0, tcXStart, tcYStart + texTile * texTileMod); - GL.MultiTexCoord2 (1, 0.0f, 1.0f); - //GL.Color( c ); - GL.Vertex3 (x1, y1 + stepSizeY, 0.1f); - } - } - - GL.End (); - GL.PopMatrix (); - } - } -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/NoiseAndGrain.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/NoiseAndGrain.cs.meta deleted file mode 100644 index 6d740fc..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/NoiseAndGrain.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 9191284b058eef549b7108b5f04e1117 -MonoImporter: - serializedVersion: 2 - defaultReferences: - - noiseTexture: {fileID: 2800000, guid: 7a632f967e8ad42f5bd275898151ab6a, type: 3} - - noiseShader: {fileID: 4800000, guid: b0249d8c935344451aa4de6db76f0688, type: 3} - - dx11NoiseShader: {fileID: 4800000, guid: 8b30686bb4322ab42ad5eb50a0210b58, type: 3} - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/NoiseAndScratches.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/NoiseAndScratches.cs deleted file mode 100644 index 4f894a9..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/NoiseAndScratches.cs +++ /dev/null @@ -1,142 +0,0 @@ -using System; -using UnityEngine; -using Random = UnityEngine.Random; - -namespace UnityStandardAssets.ImageEffects -{ - [ExecuteInEditMode] - [RequireComponent (typeof(Camera))] - [AddComponentMenu("Image Effects/Noise/Noise and Scratches")] - public class NoiseAndScratches : MonoBehaviour - { - /// Monochrome noise just adds grain. Non-monochrome noise - /// more resembles VCR as it adds noise in YUV color space, - /// thus introducing magenta/green colors. - public bool monochrome = true; - private bool rgbFallback = false; - - // Noise grain takes random intensity from Min to Max. - [Range(0.0f,5.0f)] - public float grainIntensityMin = 0.1f; - [Range(0.0f, 5.0f)] - public float grainIntensityMax = 0.2f; - - /// The size of the noise grains (1 = one pixel). - [Range(0.1f, 50.0f)] - public float grainSize = 2.0f; - - // Scratches take random intensity from Min to Max. - [Range(0.0f, 5.0f)] - public float scratchIntensityMin = 0.05f; - [Range(0.0f, 5.0f)] - public float scratchIntensityMax = 0.25f; - - /// Scratches jump to another locations at this times per second. - [Range(1.0f, 30.0f)] - public float scratchFPS = 10.0f; - /// While scratches are in the same location, they jitter a bit. - [Range(0.0f, 1.0f)] - public float scratchJitter = 0.01f; - - public Texture grainTexture; - public Texture scratchTexture; - public Shader shaderRGB; - public Shader shaderYUV; - private Material m_MaterialRGB; - private Material m_MaterialYUV; - - private float scratchTimeLeft = 0.0f; - private float scratchX, scratchY; - - protected void Start () - { - // Disable if we don't support image effects - if (!SystemInfo.supportsImageEffects) { - enabled = false; - return; - } - - if ( shaderRGB == null || shaderYUV == null ) - { - Debug.Log( "Noise shaders are not set up! Disabling noise effect." ); - enabled = false; - } - else - { - if ( !shaderRGB.isSupported ) // disable effect if RGB shader is not supported - enabled = false; - else if ( !shaderYUV.isSupported ) // fallback to RGB if YUV is not supported - rgbFallback = true; - } - } - - protected Material material { - get { - if ( m_MaterialRGB == null ) { - m_MaterialRGB = new Material( shaderRGB ); - m_MaterialRGB.hideFlags = HideFlags.HideAndDontSave; - } - if ( m_MaterialYUV == null && !rgbFallback ) { - m_MaterialYUV = new Material( shaderYUV ); - m_MaterialYUV.hideFlags = HideFlags.HideAndDontSave; - } - return (!rgbFallback && !monochrome) ? m_MaterialYUV : m_MaterialRGB; - } - } - - protected void OnDisable() { - if ( m_MaterialRGB ) - DestroyImmediate( m_MaterialRGB ); - if ( m_MaterialYUV ) - DestroyImmediate( m_MaterialYUV ); - } - - private void SanitizeParameters() - { - grainIntensityMin = Mathf.Clamp( grainIntensityMin, 0.0f, 5.0f ); - grainIntensityMax = Mathf.Clamp( grainIntensityMax, 0.0f, 5.0f ); - scratchIntensityMin = Mathf.Clamp( scratchIntensityMin, 0.0f, 5.0f ); - scratchIntensityMax = Mathf.Clamp( scratchIntensityMax, 0.0f, 5.0f ); - scratchFPS = Mathf.Clamp( scratchFPS, 1, 30 ); - scratchJitter = Mathf.Clamp( scratchJitter, 0.0f, 1.0f ); - grainSize = Mathf.Clamp( grainSize, 0.1f, 50.0f ); - } - - // Called by the camera to apply the image effect - void OnRenderImage (RenderTexture source, RenderTexture destination) - { - SanitizeParameters(); - - if ( scratchTimeLeft <= 0.0f ) - { - scratchTimeLeft = Random.value * 2 / scratchFPS; // we have sanitized it earlier, won't be zero - scratchX = Random.value; - scratchY = Random.value; - } - scratchTimeLeft -= Time.deltaTime; - - Material mat = material; - - mat.SetTexture("_GrainTex", grainTexture); - mat.SetTexture("_ScratchTex", scratchTexture); - float grainScale = 1.0f / grainSize; // we have sanitized it earlier, won't be zero - mat.SetVector("_GrainOffsetScale", new Vector4( - Random.value, - Random.value, - (float)Screen.width / (float)grainTexture.width * grainScale, - (float)Screen.height / (float)grainTexture.height * grainScale - )); - mat.SetVector("_ScratchOffsetScale", new Vector4( - scratchX + Random.value*scratchJitter, - scratchY + Random.value*scratchJitter, - (float)Screen.width / (float) scratchTexture.width, - (float)Screen.height / (float) scratchTexture.height - )); - mat.SetVector("_Intensity", new Vector4( - Random.Range(grainIntensityMin, grainIntensityMax), - Random.Range(scratchIntensityMin, scratchIntensityMax), - 0, 0 )); - Graphics.Blit (source, destination, mat); - } - } -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/NoiseAndScratches.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/NoiseAndScratches.cs.meta deleted file mode 100644 index 6d5b821..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/NoiseAndScratches.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: a88a26a276b4e47619ce2c5adad33fab -MonoImporter: - serializedVersion: 2 - defaultReferences: - - grainTexture: {fileID: 2800000, guid: ffa9c02760c2b4e8eb9814ec06c4b05b, type: 3} - - scratchTexture: {fileID: 2800000, guid: 6205c27cc031f4e66b8ea90d1bfaa158, type: 3} - - shaderRGB: {fileID: 4800000, guid: 5d7f4c401ae8946bcb0d6ff68a9e7466, type: 3} - - shaderYUV: {fileID: 4800000, guid: 0e447868506ba49f0a73235b8a8b647a, type: 3} - executionOrder: 0 - icon: {instanceID: 0} - userData: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/PostEffectsBase.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/PostEffectsBase.cs deleted file mode 100644 index 9dc4be9..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/PostEffectsBase.cs +++ /dev/null @@ -1,261 +0,0 @@ -using System; -using System.Collections.Generic; -using UnityEngine; - -namespace UnityStandardAssets.ImageEffects -{ - [ExecuteInEditMode] - [RequireComponent (typeof(Camera))] - public class PostEffectsBase : MonoBehaviour - { - protected bool supportHDRTextures = true; - protected bool supportDX11 = false; - protected bool isSupported = true; - - private List createdMaterials = new List (); - - protected Material CheckShaderAndCreateMaterial ( Shader s, Material m2Create) - { - if (!s) - { - Debug.Log("Missing shader in " + ToString ()); - enabled = false; - return null; - } - - if (s.isSupported && m2Create && m2Create.shader == s) - return m2Create; - - if (!s.isSupported) - { - NotSupported (); - Debug.Log("The shader " + s.ToString() + " on effect "+ToString()+" is not supported on this platform!"); - return null; - } - - m2Create = new Material (s); - createdMaterials.Add (m2Create); - m2Create.hideFlags = HideFlags.DontSave; - - return m2Create; - } - - - protected Material CreateMaterial (Shader s, Material m2Create) - { - if (!s) - { - Debug.Log ("Missing shader in " + ToString ()); - return null; - } - - if (m2Create && (m2Create.shader == s) && (s.isSupported)) - return m2Create; - - if (!s.isSupported) - { - return null; - } - - m2Create = new Material (s); - createdMaterials.Add (m2Create); - m2Create.hideFlags = HideFlags.DontSave; - - return m2Create; - } - - void OnEnable () - { - isSupported = true; - } - - void OnDestroy () - { - RemoveCreatedMaterials (); - } - - private void RemoveCreatedMaterials () - { - while (createdMaterials.Count > 0) - { - Material mat = createdMaterials[0]; - createdMaterials.RemoveAt (0); -#if UNITY_EDITOR - DestroyImmediate (mat); -#else - Destroy(mat); -#endif - } - } - - protected bool CheckSupport () - { - return CheckSupport (false); - } - - - public virtual bool CheckResources () - { - Debug.LogWarning ("CheckResources () for " + ToString() + " should be overwritten."); - return isSupported; - } - - - protected void Start () - { - CheckResources (); - } - - protected bool CheckSupport (bool needDepth) - { - isSupported = true; - supportHDRTextures = SystemInfo.SupportsRenderTextureFormat(RenderTextureFormat.ARGBHalf); - supportDX11 = SystemInfo.graphicsShaderLevel >= 50 && SystemInfo.supportsComputeShaders; - - if (!SystemInfo.supportsImageEffects) - { - NotSupported (); - return false; - } - - if (needDepth && !SystemInfo.SupportsRenderTextureFormat (RenderTextureFormat.Depth)) - { - NotSupported (); - return false; - } - - if (needDepth) - GetComponent().depthTextureMode |= DepthTextureMode.Depth; - - return true; - } - - protected bool CheckSupport (bool needDepth, bool needHdr) - { - if (!CheckSupport(needDepth)) - return false; - - if (needHdr && !supportHDRTextures) - { - NotSupported (); - return false; - } - - return true; - } - - - public bool Dx11Support () - { - return supportDX11; - } - - - protected void ReportAutoDisable () - { - Debug.LogWarning ("The image effect " + ToString() + " has been disabled as it's not supported on the current platform."); - } - - // deprecated but needed for old effects to survive upgrading - bool CheckShader (Shader s) - { - Debug.Log("The shader " + s.ToString () + " on effect "+ ToString () + " is not part of the Unity 3.2+ effects suite anymore. For best performance and quality, please ensure you are using the latest Standard Assets Image Effects (Pro only) package."); - if (!s.isSupported) - { - NotSupported (); - return false; - } - else - { - return false; - } - } - - - protected void NotSupported () - { - enabled = false; - isSupported = false; - return; - } - - - protected void DrawBorder (RenderTexture dest, Material material) - { - float x1; - float x2; - float y1; - float y2; - - RenderTexture.active = dest; - bool invertY = true; // source.texelSize.y < 0.0ff; - // Set up the simple Matrix - GL.PushMatrix(); - GL.LoadOrtho(); - - for (int i = 0; i < material.passCount; i++) - { - material.SetPass(i); - - float y1_; float y2_; - if (invertY) - { - y1_ = 1.0f; y2_ = 0.0f; - } - else - { - y1_ = 0.0f; y2_ = 1.0f; - } - - // left - x1 = 0.0f; - x2 = 0.0f + 1.0f/(dest.width*1.0f); - y1 = 0.0f; - y2 = 1.0f; - GL.Begin(GL.QUADS); - - GL.TexCoord2(0.0f, y1_); GL.Vertex3(x1, y1, 0.1f); - GL.TexCoord2(1.0f, y1_); GL.Vertex3(x2, y1, 0.1f); - GL.TexCoord2(1.0f, y2_); GL.Vertex3(x2, y2, 0.1f); - GL.TexCoord2(0.0f, y2_); GL.Vertex3(x1, y2, 0.1f); - - // right - x1 = 1.0f - 1.0f/(dest.width*1.0f); - x2 = 1.0f; - y1 = 0.0f; - y2 = 1.0f; - - GL.TexCoord2(0.0f, y1_); GL.Vertex3(x1, y1, 0.1f); - GL.TexCoord2(1.0f, y1_); GL.Vertex3(x2, y1, 0.1f); - GL.TexCoord2(1.0f, y2_); GL.Vertex3(x2, y2, 0.1f); - GL.TexCoord2(0.0f, y2_); GL.Vertex3(x1, y2, 0.1f); - - // top - x1 = 0.0f; - x2 = 1.0f; - y1 = 0.0f; - y2 = 0.0f + 1.0f/(dest.height*1.0f); - - GL.TexCoord2(0.0f, y1_); GL.Vertex3(x1, y1, 0.1f); - GL.TexCoord2(1.0f, y1_); GL.Vertex3(x2, y1, 0.1f); - GL.TexCoord2(1.0f, y2_); GL.Vertex3(x2, y2, 0.1f); - GL.TexCoord2(0.0f, y2_); GL.Vertex3(x1, y2, 0.1f); - - // bottom - x1 = 0.0f; - x2 = 1.0f; - y1 = 1.0f - 1.0f/(dest.height*1.0f); - y2 = 1.0f; - - GL.TexCoord2(0.0f, y1_); GL.Vertex3(x1, y1, 0.1f); - GL.TexCoord2(1.0f, y1_); GL.Vertex3(x2, y1, 0.1f); - GL.TexCoord2(1.0f, y2_); GL.Vertex3(x2, y2, 0.1f); - GL.TexCoord2(0.0f, y2_); GL.Vertex3(x1, y2, 0.1f); - - GL.End(); - } - - GL.PopMatrix(); - } - } -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/PostEffectsBase.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/PostEffectsBase.cs.meta deleted file mode 100644 index a310534..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/PostEffectsBase.cs.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: b6f4318ec6c2bf643a0f9edfeeaba0ec -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/PostEffectsHelper.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/PostEffectsHelper.cs deleted file mode 100644 index 156370f..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/PostEffectsHelper.cs +++ /dev/null @@ -1,188 +0,0 @@ -using System; -using UnityEngine; - -namespace UnityStandardAssets.ImageEffects -{ - [ExecuteInEditMode] - [RequireComponent (typeof(Camera))] - class PostEffectsHelper : MonoBehaviour - { - void OnRenderImage (RenderTexture source, RenderTexture destination) - { - Debug.Log("OnRenderImage in Helper called ..."); - } - - static void DrawLowLevelPlaneAlignedWithCamera ( - float dist , - RenderTexture source, RenderTexture dest , - Material material , - Camera cameraForProjectionMatrix ) - { - // Make the destination texture the target for all rendering - RenderTexture.active = dest; - // Assign the source texture to a property from a shader - material.SetTexture("_MainTex", source); - bool invertY = true; // source.texelSize.y < 0.0f; - // Set up the simple Matrix - GL.PushMatrix(); - GL.LoadIdentity(); - GL.LoadProjectionMatrix(cameraForProjectionMatrix.projectionMatrix); - - float fovYHalfRad = cameraForProjectionMatrix.fieldOfView * 0.5f * Mathf.Deg2Rad; - float cotangent = Mathf.Cos(fovYHalfRad) / Mathf.Sin(fovYHalfRad); - float asp = cameraForProjectionMatrix.aspect; - - float x1 = asp/-cotangent; - float x2 = asp/cotangent; - float y1 = 1.0f/-cotangent; - float y2 = 1.0f/cotangent; - - float sc = 1.0f; // magic constant (for now) - - x1 *= dist * sc; - x2 *= dist * sc; - y1 *= dist * sc; - y2 *= dist * sc; - - float z1 = -dist; - - for (int i = 0; i < material.passCount; i++) - { - material.SetPass(i); - - GL.Begin(GL.QUADS); - float y1_; float y2_; - if (invertY) - { - y1_ = 1.0f; y2_ = 0.0f; - } - else - { - y1_ = 0.0f; y2_ = 1.0f; - } - GL.TexCoord2(0.0f, y1_); GL.Vertex3(x1, y1, z1); - GL.TexCoord2(1.0f, y1_); GL.Vertex3(x2, y1, z1); - GL.TexCoord2(1.0f, y2_); GL.Vertex3(x2, y2, z1); - GL.TexCoord2(0.0f, y2_); GL.Vertex3(x1, y2, z1); - GL.End(); - } - - GL.PopMatrix(); - } - - static void DrawBorder ( - RenderTexture dest , - Material material ) - { - float x1; - float x2; - float y1; - float y2; - - RenderTexture.active = dest; - bool invertY = true; // source.texelSize.y < 0.0ff; - // Set up the simple Matrix - GL.PushMatrix(); - GL.LoadOrtho(); - - for (int i = 0; i < material.passCount; i++) - { - material.SetPass(i); - - float y1_; float y2_; - if (invertY) - { - y1_ = 1.0f; y2_ = 0.0f; - } - else - { - y1_ = 0.0f; y2_ = 1.0f; - } - - // left - x1 = 0.0f; - x2 = 0.0f + 1.0f/(dest.width*1.0f); - y1 = 0.0f; - y2 = 1.0f; - GL.Begin(GL.QUADS); - - GL.TexCoord2(0.0f, y1_); GL.Vertex3(x1, y1, 0.1f); - GL.TexCoord2(1.0f, y1_); GL.Vertex3(x2, y1, 0.1f); - GL.TexCoord2(1.0f, y2_); GL.Vertex3(x2, y2, 0.1f); - GL.TexCoord2(0.0f, y2_); GL.Vertex3(x1, y2, 0.1f); - - // right - x1 = 1.0f - 1.0f/(dest.width*1.0f); - x2 = 1.0f; - y1 = 0.0f; - y2 = 1.0f; - - GL.TexCoord2(0.0f, y1_); GL.Vertex3(x1, y1, 0.1f); - GL.TexCoord2(1.0f, y1_); GL.Vertex3(x2, y1, 0.1f); - GL.TexCoord2(1.0f, y2_); GL.Vertex3(x2, y2, 0.1f); - GL.TexCoord2(0.0f, y2_); GL.Vertex3(x1, y2, 0.1f); - - // top - x1 = 0.0f; - x2 = 1.0f; - y1 = 0.0f; - y2 = 0.0f + 1.0f/(dest.height*1.0f); - - GL.TexCoord2(0.0f, y1_); GL.Vertex3(x1, y1, 0.1f); - GL.TexCoord2(1.0f, y1_); GL.Vertex3(x2, y1, 0.1f); - GL.TexCoord2(1.0f, y2_); GL.Vertex3(x2, y2, 0.1f); - GL.TexCoord2(0.0f, y2_); GL.Vertex3(x1, y2, 0.1f); - - // bottom - x1 = 0.0f; - x2 = 1.0f; - y1 = 1.0f - 1.0f/(dest.height*1.0f); - y2 = 1.0f; - - GL.TexCoord2(0.0f, y1_); GL.Vertex3(x1, y1, 0.1f); - GL.TexCoord2(1.0f, y1_); GL.Vertex3(x2, y1, 0.1f); - GL.TexCoord2(1.0f, y2_); GL.Vertex3(x2, y2, 0.1f); - GL.TexCoord2(0.0f, y2_); GL.Vertex3(x1, y2, 0.1f); - - GL.End(); - } - - GL.PopMatrix(); - } - - static void DrawLowLevelQuad ( float x1, float x2, float y1, float y2, RenderTexture source, RenderTexture dest, Material material ) - { - // Make the destination texture the target for all rendering - RenderTexture.active = dest; - // Assign the source texture to a property from a shader - material.SetTexture("_MainTex", source); - bool invertY = true; // source.texelSize.y < 0.0f; - // Set up the simple Matrix - GL.PushMatrix(); - GL.LoadOrtho(); - - for (int i = 0; i < material.passCount; i++) - { - material.SetPass(i); - - GL.Begin(GL.QUADS); - float y1_; float y2_; - if (invertY) - { - y1_ = 1.0f; y2_ = 0.0f; - } - else - { - y1_ = 0.0f; y2_ = 1.0f; - } - GL.TexCoord2(0.0f, y1_); GL.Vertex3(x1, y1, 0.1f); - GL.TexCoord2(1.0f, y1_); GL.Vertex3(x2, y1, 0.1f); - GL.TexCoord2(1.0f, y2_); GL.Vertex3(x2, y2, 0.1f); - GL.TexCoord2(0.0f, y2_); GL.Vertex3(x1, y2, 0.1f); - GL.End(); - } - - GL.PopMatrix(); - } - } -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/PostEffectsHelper.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/PostEffectsHelper.cs.meta deleted file mode 100644 index 4ccd033..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/PostEffectsHelper.cs.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 50b03df8f04b5c441aaac5b7fccb4734 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/Quads.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/Quads.cs deleted file mode 100644 index 3d2caca..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/Quads.cs +++ /dev/null @@ -1,125 +0,0 @@ -using System; -using UnityEngine; -using Object = UnityEngine.Object; - -// same as Triangles but creates quads instead which generally -// saves fillrate at the expense for more triangles to issue -namespace UnityStandardAssets.ImageEffects -{ - class Quads - { - static Mesh[] meshes; - static int currentQuads = 0; - - static bool HasMeshes () - { - if (meshes == null) - return false; - foreach (Mesh m in meshes) - if (null == m) - return false; - return true; - } - - - public static void Cleanup () - { - if (meshes == null) - return; - - for (int i = 0; i < meshes.Length; i++) - { - if (null != meshes[i]) - { - Object.DestroyImmediate (meshes[i]); - meshes[i] = null; - } - } - meshes = null; - } - - - public static Mesh[] GetMeshes ( int totalWidth, int totalHeight) - { - if (HasMeshes () && (currentQuads == (totalWidth * totalHeight))) { - return meshes; - } - - int maxQuads = 65000 / 6; - int totalQuads = totalWidth * totalHeight; - currentQuads = totalQuads; - - int meshCount = Mathf.CeilToInt ((1.0f * totalQuads) / (1.0f * maxQuads)); - - meshes = new Mesh [meshCount]; - - int i = 0; - int index = 0; - for (i = 0; i < totalQuads; i += maxQuads) - { - int quads = Mathf.FloorToInt (Mathf.Clamp ((totalQuads-i), 0, maxQuads)); - - meshes[index] = GetMesh (quads, i, totalWidth, totalHeight); - index++; - } - - return meshes; - } - - static Mesh GetMesh (int triCount, int triOffset, int totalWidth, int totalHeight) - { - var mesh = new Mesh (); - mesh.hideFlags = HideFlags.DontSave; - - var verts = new Vector3[triCount * 4]; - var uvs = new Vector2[triCount * 4]; - var uvs2 = new Vector2[triCount * 4]; - var tris = new int[triCount * 6]; - - for (int i = 0; i < triCount; i++) - { - int i4 = i * 4; - int i6 = i * 6; - - int vertexWithOffset = triOffset + i; - - float x = Mathf.Floor (vertexWithOffset % totalWidth) / totalWidth; - float y = Mathf.Floor (vertexWithOffset / totalWidth) / totalHeight; - - Vector3 position = new Vector3 (x * 2 - 1, y * 2 - 1, 1.0f); - - verts[i4 + 0] = position; - verts[i4 + 1] = position; - verts[i4 + 2] = position; - verts[i4 + 3] = position; - - uvs[i4 + 0] = new Vector2 (0.0f, 0.0f); - uvs[i4 + 1] = new Vector2 (1.0f, 0.0f); - uvs[i4 + 2] = new Vector2 (0.0f, 1.0f); - uvs[i4 + 3] = new Vector2 (1.0f, 1.0f); - - uvs2[i4 + 0] = new Vector2 (x, y); - uvs2[i4 + 1] = new Vector2 (x, y); - uvs2[i4 + 2] = new Vector2 (x, y); - uvs2[i4 + 3] = new Vector2 (x, y); - - tris[i6 + 0] = i4 + 0; - tris[i6 + 1] = i4 + 1; - tris[i6 + 2] = i4 + 2; - - tris[i6 + 3] = i4 + 1; - tris[i6 + 4] = i4 + 2; - tris[i6 + 5] = i4 + 3; - - } - - mesh.vertices = verts; - mesh.triangles = tris; - mesh.uv = uvs; - mesh.uv2 = uvs2; - - return mesh; - } - - } -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/Quads.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/Quads.cs.meta deleted file mode 100644 index 14c9d59..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/Quads.cs.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: a20852ce049f64e4695a48b6a354be83 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/ScreenOverlay.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/ScreenOverlay.cs deleted file mode 100644 index 790593c..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/ScreenOverlay.cs +++ /dev/null @@ -1,69 +0,0 @@ -using System; -using UnityEngine; - -namespace UnityStandardAssets.ImageEffects -{ - [ExecuteInEditMode] - [RequireComponent (typeof(Camera))] - [AddComponentMenu ("Image Effects/Other/Screen Overlay")] - public class ScreenOverlay : PostEffectsBase - { - public enum OverlayBlendMode - { - Additive = 0, - ScreenBlend = 1, - Multiply = 2, - Overlay = 3, - AlphaBlend = 4, - } - - public OverlayBlendMode blendMode = OverlayBlendMode.Overlay; - public float intensity = 1.0f; - public Texture2D texture = null; - - public Shader overlayShader = null; - private Material overlayMaterial = null; - - - public override bool CheckResources () - { - CheckSupport (false); - - overlayMaterial = CheckShaderAndCreateMaterial (overlayShader, overlayMaterial); - - if (!isSupported) - ReportAutoDisable (); - return isSupported; - } - - void OnRenderImage (RenderTexture source, RenderTexture destination) - { - if (CheckResources() == false) - { - Graphics.Blit (source, destination); - return; - } - - Vector4 UV_Transform = new Vector4(1, 0, 0, 1); - - #if UNITY_WP8 - // WP8 has no OS support for rotating screen with device orientation, - // so we do those transformations ourselves. - if (Screen.orientation == ScreenOrientation.LandscapeLeft) { - UV_Transform = new Vector4(0, -1, 1, 0); - } - if (Screen.orientation == ScreenOrientation.LandscapeRight) { - UV_Transform = new Vector4(0, 1, -1, 0); - } - if (Screen.orientation == ScreenOrientation.PortraitUpsideDown) { - UV_Transform = new Vector4(-1, 0, 0, -1); - } - #endif - - overlayMaterial.SetVector("_UV_Transform", UV_Transform); - overlayMaterial.SetFloat ("_Intensity", intensity); - overlayMaterial.SetTexture ("_Overlay", texture); - Graphics.Blit (source, destination, overlayMaterial, (int) blendMode); - } - } -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/ScreenOverlay.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/ScreenOverlay.cs.meta deleted file mode 100644 index 75c03f9..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/ScreenOverlay.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 6f19108706fdce9469603d07980eb8ad -MonoImporter: - serializedVersion: 2 - defaultReferences: - - texture: {instanceID: 0} - - overlayShader: {fileID: 4800000, guid: 8c81db0e527d24acc9bcec04e87781bd, type: 3} - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/ScreenSpaceAmbientObscurance.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/ScreenSpaceAmbientObscurance.cs deleted file mode 100644 index c6b7949..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/ScreenSpaceAmbientObscurance.cs +++ /dev/null @@ -1,123 +0,0 @@ -using System; -using UnityEngine; - -namespace UnityStandardAssets.ImageEffects -{ - [ ExecuteInEditMode] - [RequireComponent (typeof(Camera))] - [AddComponentMenu ("Image Effects/Rendering/Screen Space Ambient Obscurance")] - class ScreenSpaceAmbientObscurance : PostEffectsBase { - [Range (0,3)] - public float intensity = 0.5f; - [Range (0.1f,3)] - public float radius = 0.2f; - [Range (0,3)] - public int blurIterations = 1; - [Range (0,5)] - public float blurFilterDistance = 1.25f; - [Range (0,1)] - public int downsample = 0; - - public Texture2D rand = null; - public Shader aoShader= null; - - private Material aoMaterial = null; - - public override bool CheckResources () { - CheckSupport (true); - - aoMaterial = CheckShaderAndCreateMaterial (aoShader, aoMaterial); - - if (!isSupported) - ReportAutoDisable (); - return isSupported; - } - - void OnDisable () { - if (aoMaterial) - DestroyImmediate (aoMaterial); - aoMaterial = null; - } - - [ImageEffectOpaque] - void OnRenderImage (RenderTexture source, RenderTexture destination) { - if (CheckResources () == false) { - Graphics.Blit (source, destination); - return; - } - Camera camera = GetComponent(); - - Matrix4x4 P = camera.projectionMatrix; - var invP= P.inverse; - Vector4 projInfo = new Vector4 - ((-2.0f / P[0,0]), - (-2.0f / P[1,1]), - ((1.0f - P[0,2]) / P[0,0]), - ((1.0f + P[1,2]) / P[1,1])); - - if (camera.stereoEnabled) - { - Matrix4x4 P0 = camera.GetStereoProjectionMatrix(Camera.StereoscopicEye.Left); - Matrix4x4 P1 = camera.GetStereoProjectionMatrix(Camera.StereoscopicEye.Right); - - Vector4 projInfo0 = new Vector4 - ((-2.0f / (P0[0, 0])), - (-2.0f / (P0[1, 1])), - ((1.0f - P0[0, 2]) / P0[0, 0]), - ((1.0f + P0[1, 2]) / P0[1, 1])); - - Vector4 projInfo1 = new Vector4 - ((-2.0f / (P1[0, 0])), - (-2.0f / (P1[1, 1])), - ((1.0f - P1[0, 2]) / P1[0, 0]), - ((1.0f + P1[1, 2]) / P1[1, 1])); - - aoMaterial.SetVector("_ProjInfoLeft", projInfo0); // used for unprojection - aoMaterial.SetVector("_ProjInfoRight", projInfo1); // used for unprojection - } - - aoMaterial.SetVector ("_ProjInfo", projInfo); // used for unprojection - aoMaterial.SetMatrix ("_ProjectionInv", invP); // only used for reference - aoMaterial.SetTexture ("_Rand", rand); // not needed for DX11 :) - aoMaterial.SetFloat ("_Radius", radius); - aoMaterial.SetFloat ("_Radius2", radius*radius); - aoMaterial.SetFloat ("_Intensity", intensity); - aoMaterial.SetFloat ("_BlurFilterDistance", blurFilterDistance); - - int rtW = source.width; - int rtH = source.height; - - RenderTexture tmpRt = RenderTexture.GetTemporary (rtW>>downsample, rtH>>downsample); - RenderTexture tmpRt2; - - Graphics.Blit (source, tmpRt, aoMaterial, 0); - - if (downsample > 0) { - tmpRt2 = RenderTexture.GetTemporary (rtW, rtH); - Graphics.Blit(tmpRt, tmpRt2, aoMaterial, 4); - RenderTexture.ReleaseTemporary (tmpRt); - tmpRt = tmpRt2; - - // @NOTE: it's probably worth a shot to blur in low resolution - // instead with a bilat-upsample afterwards ... - } - - for (int i = 0; i < blurIterations; i++) { - aoMaterial.SetVector("_Axis", new Vector2(1.0f,0.0f)); - tmpRt2 = RenderTexture.GetTemporary (rtW, rtH); - Graphics.Blit (tmpRt, tmpRt2, aoMaterial, 1); - RenderTexture.ReleaseTemporary (tmpRt); - - aoMaterial.SetVector("_Axis", new Vector2(0.0f,1.0f)); - tmpRt = RenderTexture.GetTemporary (rtW, rtH); - Graphics.Blit (tmpRt2, tmpRt, aoMaterial, 1); - RenderTexture.ReleaseTemporary (tmpRt2); - } - - aoMaterial.SetTexture ("_AOTex", tmpRt); - Graphics.Blit (source, destination, aoMaterial, 2); - - RenderTexture.ReleaseTemporary (tmpRt); - } - } -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/ScreenSpaceAmbientObscurance.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/ScreenSpaceAmbientObscurance.cs.meta deleted file mode 100644 index 99d4452..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/ScreenSpaceAmbientObscurance.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 75febd242c999f04d9654522a10c006b -MonoImporter: - serializedVersion: 2 - defaultReferences: - - rand: {fileID: 2800000, guid: a181ca8e3c62f3e4b8f183f6c586b032, type: 3} - - aoShader: {fileID: 4800000, guid: 95616c020c5604dda96cf76afbbc0272, type: 3} - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/ScreenSpaceAmbientOcclusion.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/ScreenSpaceAmbientOcclusion.cs deleted file mode 100644 index 7981ff8..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/ScreenSpaceAmbientOcclusion.cs +++ /dev/null @@ -1,205 +0,0 @@ -using System; -using UnityEngine; - -namespace UnityStandardAssets.ImageEffects -{ - [ExecuteInEditMode] - [RequireComponent (typeof(Camera))] - [AddComponentMenu("Image Effects/Rendering/Screen Space Ambient Occlusion")] - public class ScreenSpaceAmbientOcclusion : MonoBehaviour - { - public enum SSAOSamples - { - Low = 0, - Medium = 1, - High = 2, - } - - [Range(0.05f, 1.0f)] - public float m_Radius = 0.4f; - public SSAOSamples m_SampleCount = SSAOSamples.Medium; - [Range(0.5f, 4.0f)] - public float m_OcclusionIntensity = 1.5f; - [Range(0, 4)] - public int m_Blur = 2; - [Range(1,6)] - public int m_Downsampling = 2; - [Range(0.2f, 2.0f)] - public float m_OcclusionAttenuation = 1.0f; - [Range(0.00001f, 0.5f)] - public float m_MinZ = 0.01f; - - public Shader m_SSAOShader; - private Material m_SSAOMaterial; - - public Texture2D m_RandomTexture; - - private bool m_Supported; - - private static Material CreateMaterial (Shader shader) - { - if (!shader) - return null; - Material m = new Material (shader); - m.hideFlags = HideFlags.HideAndDontSave; - return m; - } - private static void DestroyMaterial (Material mat) - { - if (mat) - { - DestroyImmediate (mat); - mat = null; - } - } - - - void OnDisable() - { - DestroyMaterial (m_SSAOMaterial); - } - - void Start() - { - if (!SystemInfo.supportsImageEffects || !SystemInfo.SupportsRenderTextureFormat (RenderTextureFormat.Depth)) - { - m_Supported = false; - enabled = false; - return; - } - - CreateMaterials (); - if (!m_SSAOMaterial || m_SSAOMaterial.passCount != 5) - { - m_Supported = false; - enabled = false; - return; - } - - //CreateRandomTable (26, 0.2f); - - m_Supported = true; - } - - void OnEnable () { - GetComponent().depthTextureMode |= DepthTextureMode.DepthNormals; - } - - private void CreateMaterials () - { - if (!m_SSAOMaterial && m_SSAOShader.isSupported) - { - m_SSAOMaterial = CreateMaterial (m_SSAOShader); - m_SSAOMaterial.SetTexture ("_RandomTexture", m_RandomTexture); - } - } - - [ImageEffectOpaque] - void OnRenderImage (RenderTexture source, RenderTexture destination) - { - if (!m_Supported || !m_SSAOShader.isSupported) { - enabled = false; - return; - } - CreateMaterials (); - - m_Downsampling = Mathf.Clamp (m_Downsampling, 1, 6); - m_Radius = Mathf.Clamp (m_Radius, 0.05f, 1.0f); - m_MinZ = Mathf.Clamp (m_MinZ, 0.00001f, 0.5f); - m_OcclusionIntensity = Mathf.Clamp (m_OcclusionIntensity, 0.5f, 4.0f); - m_OcclusionAttenuation = Mathf.Clamp (m_OcclusionAttenuation, 0.2f, 2.0f); - m_Blur = Mathf.Clamp (m_Blur, 0, 4); - - // Render SSAO term into a smaller texture - RenderTexture rtAO = RenderTexture.GetTemporary (source.width / m_Downsampling, source.height / m_Downsampling, 0); - float fovY = GetComponent().fieldOfView; - float far = GetComponent().farClipPlane; - float y = Mathf.Tan (fovY * Mathf.Deg2Rad * 0.5f) * far; - float x = y * GetComponent().aspect; - m_SSAOMaterial.SetVector ("_FarCorner", new Vector3(x,y,far)); - int noiseWidth, noiseHeight; - if (m_RandomTexture) { - noiseWidth = m_RandomTexture.width; - noiseHeight = m_RandomTexture.height; - } else { - noiseWidth = 1; noiseHeight = 1; - } - m_SSAOMaterial.SetVector ("_NoiseScale", new Vector3 ((float)rtAO.width / noiseWidth, (float)rtAO.height / noiseHeight, 0.0f)); - m_SSAOMaterial.SetVector ("_Params", new Vector4( - m_Radius, - m_MinZ, - 1.0f / m_OcclusionAttenuation, - m_OcclusionIntensity)); - - bool doBlur = m_Blur > 0; - Graphics.Blit (doBlur ? null : source, rtAO, m_SSAOMaterial, (int)m_SampleCount); - - if (doBlur) - { - // Blur SSAO horizontally - RenderTexture rtBlurX = RenderTexture.GetTemporary (source.width, source.height, 0); - m_SSAOMaterial.SetVector ("_TexelOffsetScale", - new Vector4 ((float)m_Blur / source.width, 0,0,0)); - m_SSAOMaterial.SetTexture ("_SSAO", rtAO); - Graphics.Blit (null, rtBlurX, m_SSAOMaterial, 3); - RenderTexture.ReleaseTemporary (rtAO); // original rtAO not needed anymore - - // Blur SSAO vertically - RenderTexture rtBlurY = RenderTexture.GetTemporary (source.width, source.height, 0); - m_SSAOMaterial.SetVector ("_TexelOffsetScale", - new Vector4 (0, (float)m_Blur/source.height, 0,0)); - m_SSAOMaterial.SetTexture ("_SSAO", rtBlurX); - Graphics.Blit (source, rtBlurY, m_SSAOMaterial, 3); - RenderTexture.ReleaseTemporary (rtBlurX); // blurX RT not needed anymore - - rtAO = rtBlurY; // AO is the blurred one now - } - - // Modulate scene rendering with SSAO - m_SSAOMaterial.SetTexture ("_SSAO", rtAO); - Graphics.Blit (source, destination, m_SSAOMaterial, 4); - - RenderTexture.ReleaseTemporary (rtAO); - } - - /* - private void CreateRandomTable (int count, float minLength) - { - Random.seed = 1337; - Vector3[] samples = new Vector3[count]; - // initial samples - for (int i = 0; i < count; ++i) - samples[i] = Random.onUnitSphere; - // energy minimization: push samples away from others - int iterations = 100; - while (iterations-- > 0) { - for (int i = 0; i < count; ++i) { - Vector3 vec = samples[i]; - Vector3 res = Vector3.zero; - // minimize with other samples - for (int j = 0; j < count; ++j) { - Vector3 force = vec - samples[j]; - float fac = Vector3.Dot (force, force); - if (fac > 0.00001f) - res += force * (1.0f / fac); - } - samples[i] = (samples[i] + res * 0.5f).normalized; - } - } - // now scale samples between minLength and 1.0 - for (int i = 0; i < count; ++i) { - samples[i] = samples[i] * Random.Range (minLength, 1.0f); - } - - string table = string.Format ("#define SAMPLE_COUNT {0}\n", count); - table += "const float3 RAND_SAMPLES[SAMPLE_COUNT] = {\n"; - for (int i = 0; i < count; ++i) { - Vector3 v = samples[i]; - table += string.Format("\tfloat3({0},{1},{2}),\n", v.x, v.y, v.z); - } - table += "};\n"; - Debug.Log (table); - } - */ - } -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/ScreenSpaceAmbientOcclusion.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/ScreenSpaceAmbientOcclusion.cs.meta deleted file mode 100644 index 8fda23b..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/ScreenSpaceAmbientOcclusion.cs.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: b0923359e9e352a4b9b11c7b7161ad67 -MonoImporter: - serializedVersion: 2 - defaultReferences: - - m_SSAOShader: {fileID: 4800000, guid: 43ca18288c424f645aaa1e9e07f04c50, type: 3} - - m_RandomTexture: {fileID: 2800000, guid: a181ca8e3c62f3e4b8f183f6c586b032, type: 3} - executionOrder: 0 - icon: {instanceID: 0} - userData: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/SepiaTone.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/SepiaTone.cs deleted file mode 100644 index 86ac0c1..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/SepiaTone.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System; -using UnityEngine; - -namespace UnityStandardAssets.ImageEffects -{ - [ExecuteInEditMode] - [AddComponentMenu("Image Effects/Color Adjustments/Sepia Tone")] - public class SepiaTone : ImageEffectBase - { - // Called by camera to apply image effect - void OnRenderImage (RenderTexture source, RenderTexture destination) - { - Graphics.Blit (source, destination, material); - } - } -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/SepiaTone.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/SepiaTone.cs.meta deleted file mode 100644 index 94ff94c..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/SepiaTone.cs.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: a07a781cad112c75d0008dfa8d76c639 -MonoImporter: - serializedVersion: 2 - defaultReferences: - - shader: {fileID: 4800000, guid: b6aa781cad112c75d0008dfa8d76c639, type: 3} - executionOrder: 0 - icon: {instanceID: 0} - userData: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/SunShafts.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/SunShafts.cs deleted file mode 100644 index d9ce6bb..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/SunShafts.cs +++ /dev/null @@ -1,151 +0,0 @@ -using System; -using UnityEngine; - -namespace UnityStandardAssets.ImageEffects -{ - [ExecuteInEditMode] - [RequireComponent (typeof(Camera))] - [AddComponentMenu ("Image Effects/Rendering/Sun Shafts")] - public class SunShafts : PostEffectsBase - { - public enum SunShaftsResolution - { - Low = 0, - Normal = 1, - High = 2, - } - - public enum ShaftsScreenBlendMode - { - Screen = 0, - Add = 1, - } - - - public SunShaftsResolution resolution = SunShaftsResolution.Normal; - public ShaftsScreenBlendMode screenBlendMode = ShaftsScreenBlendMode.Screen; - - public Transform sunTransform; - public int radialBlurIterations = 2; - public Color sunColor = Color.white; - public Color sunThreshold = new Color(0.87f,0.74f,0.65f); - public float sunShaftBlurRadius = 2.5f; - public float sunShaftIntensity = 1.15f; - - public float maxRadius = 0.75f; - - public bool useDepthTexture = true; - - public Shader sunShaftsShader; - private Material sunShaftsMaterial; - - public Shader simpleClearShader; - private Material simpleClearMaterial; - - - public override bool CheckResources () { - CheckSupport (useDepthTexture); - - sunShaftsMaterial = CheckShaderAndCreateMaterial (sunShaftsShader, sunShaftsMaterial); - simpleClearMaterial = CheckShaderAndCreateMaterial (simpleClearShader, simpleClearMaterial); - - if (!isSupported) - ReportAutoDisable (); - return isSupported; - } - - void OnRenderImage (RenderTexture source, RenderTexture destination) { - if (CheckResources()==false) { - Graphics.Blit (source, destination); - return; - } - - // we actually need to check this every frame - if (useDepthTexture) - GetComponent().depthTextureMode |= DepthTextureMode.Depth; - - int divider = 4; - if (resolution == SunShaftsResolution.Normal) - divider = 2; - else if (resolution == SunShaftsResolution.High) - divider = 1; - - Vector3 v = Vector3.one * 0.5f; - if (sunTransform) - v = GetComponent().WorldToViewportPoint (sunTransform.position); - else - v = new Vector3(0.5f, 0.5f, 0.0f); - - int rtW = source.width / divider; - int rtH = source.height / divider; - - RenderTexture lrColorB; - RenderTexture lrDepthBuffer = RenderTexture.GetTemporary (rtW, rtH, 0); - - // mask out everything except the skybox - // we have 2 methods, one of which requires depth buffer support, the other one is just comparing images - - sunShaftsMaterial.SetVector ("_BlurRadius4", new Vector4 (1.0f, 1.0f, 0.0f, 0.0f) * sunShaftBlurRadius ); - sunShaftsMaterial.SetVector ("_SunPosition", new Vector4 (v.x, v.y, v.z, maxRadius)); - sunShaftsMaterial.SetVector ("_SunThreshold", sunThreshold); - - if (!useDepthTexture) { -#if UNITY_5_6_OR_NEWER - var format= GetComponent().allowHDR ? RenderTextureFormat.DefaultHDR: RenderTextureFormat.Default; -#else - var format = GetComponent().hdr ? RenderTextureFormat.DefaultHDR : RenderTextureFormat.Default; -#endif - RenderTexture tmpBuffer = RenderTexture.GetTemporary (source.width, source.height, 0, format); - RenderTexture.active = tmpBuffer; - GL.ClearWithSkybox (false, GetComponent()); - - sunShaftsMaterial.SetTexture ("_Skybox", tmpBuffer); - Graphics.Blit (source, lrDepthBuffer, sunShaftsMaterial, 3); - RenderTexture.ReleaseTemporary (tmpBuffer); - } - else { - Graphics.Blit (source, lrDepthBuffer, sunShaftsMaterial, 2); - } - - // paint a small black small border to get rid of clamping problems - DrawBorder (lrDepthBuffer, simpleClearMaterial); - - // radial blur: - - radialBlurIterations = Mathf.Clamp (radialBlurIterations, 1, 4); - - float ofs = sunShaftBlurRadius * (1.0f / 768.0f); - - sunShaftsMaterial.SetVector ("_BlurRadius4", new Vector4 (ofs, ofs, 0.0f, 0.0f)); - sunShaftsMaterial.SetVector ("_SunPosition", new Vector4 (v.x, v.y, v.z, maxRadius)); - - for (int it2 = 0; it2 < radialBlurIterations; it2++ ) { - // each iteration takes 2 * 6 samples - // we update _BlurRadius each time to cheaply get a very smooth look - - lrColorB = RenderTexture.GetTemporary (rtW, rtH, 0); - Graphics.Blit (lrDepthBuffer, lrColorB, sunShaftsMaterial, 1); - RenderTexture.ReleaseTemporary (lrDepthBuffer); - ofs = sunShaftBlurRadius * (((it2 * 2.0f + 1.0f) * 6.0f)) / 768.0f; - sunShaftsMaterial.SetVector ("_BlurRadius4", new Vector4 (ofs, ofs, 0.0f, 0.0f) ); - - lrDepthBuffer = RenderTexture.GetTemporary (rtW, rtH, 0); - Graphics.Blit (lrColorB, lrDepthBuffer, sunShaftsMaterial, 1); - RenderTexture.ReleaseTemporary (lrColorB); - ofs = sunShaftBlurRadius * (((it2 * 2.0f + 2.0f) * 6.0f)) / 768.0f; - sunShaftsMaterial.SetVector ("_BlurRadius4", new Vector4 (ofs, ofs, 0.0f, 0.0f) ); - } - - // put together: - - if (v.z >= 0.0f) - sunShaftsMaterial.SetVector ("_SunColor", new Vector4 (sunColor.r, sunColor.g, sunColor.b, sunColor.a) * sunShaftIntensity); - else - sunShaftsMaterial.SetVector ("_SunColor", Vector4.zero); // no backprojection ! - sunShaftsMaterial.SetTexture ("_ColorBuffer", lrDepthBuffer); - Graphics.Blit (source, destination, sunShaftsMaterial, (screenBlendMode == ShaftsScreenBlendMode.Screen) ? 0 : 4); - - RenderTexture.ReleaseTemporary (lrDepthBuffer); - } - } -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/SunShafts.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/SunShafts.cs.meta deleted file mode 100644 index acf1863..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/SunShafts.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 60e318a6043c1cb4a8ce1c8805bab930 -MonoImporter: - serializedVersion: 2 - defaultReferences: - - sunTransform: {instanceID: 0} - - sunShaftsShader: {fileID: 4800000, guid: d3b1c8c1036784176946f5cfbfb7fe4c, type: 3} - - simpleClearShader: {fileID: 4800000, guid: f688f89ed5eb847c5b19c934a0f1e772, type: 3} - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/TiltShift.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/TiltShift.cs deleted file mode 100644 index c5a23c9..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/TiltShift.cs +++ /dev/null @@ -1,76 +0,0 @@ -using System; -using UnityEngine; - -namespace UnityStandardAssets.ImageEffects -{ - [RequireComponent (typeof(Camera))] - [AddComponentMenu ("Image Effects/Camera/Tilt Shift (Lens Blur)")] - class TiltShift : PostEffectsBase { - public enum TiltShiftMode - { - TiltShiftMode, - IrisMode, - } - public enum TiltShiftQuality - { - Preview, - Low, - Normal, - High, - } - - public TiltShiftMode mode = TiltShiftMode.TiltShiftMode; - public TiltShiftQuality quality = TiltShiftQuality.Normal; - - [Range(0.0f, 15.0f)] - public float blurArea = 1.0f; - - [Range(0.0f, 25.0f)] - public float maxBlurSize = 5.0f; - - [Range(0, 1)] - public int downsample = 0; - - public Shader tiltShiftShader = null; - private Material tiltShiftMaterial = null; - - - public override bool CheckResources () { - CheckSupport (false); - - tiltShiftMaterial = CheckShaderAndCreateMaterial (tiltShiftShader, tiltShiftMaterial); - - if (!isSupported) - ReportAutoDisable (); - return isSupported; - } - - void OnRenderImage (RenderTexture source, RenderTexture destination) { - if (CheckResources() == false) { - Graphics.Blit (source, destination); - return; - } - - tiltShiftMaterial.SetFloat("_BlurSize", maxBlurSize < 0.0f ? 0.0f : maxBlurSize); - tiltShiftMaterial.SetFloat("_BlurArea", blurArea); - source.filterMode = FilterMode.Bilinear; - - RenderTexture rt = destination; - if (downsample > 0f) { - rt = RenderTexture.GetTemporary (source.width>>downsample, source.height>>downsample, 0, source.format); - rt.filterMode = FilterMode.Bilinear; - } - - int basePassNr = (int) quality; basePassNr *= 2; - Graphics.Blit (source, rt, tiltShiftMaterial, mode == TiltShiftMode.TiltShiftMode ? basePassNr : basePassNr + 1); - - if (downsample > 0) { - tiltShiftMaterial.SetTexture ("_Blurred", rt); - Graphics.Blit (source, destination, tiltShiftMaterial, 8); - } - - if (rt != destination) - RenderTexture.ReleaseTemporary (rt); - } - } -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/TiltShift.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/TiltShift.cs.meta deleted file mode 100644 index 6fb44f4..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/TiltShift.cs.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: a22b3a7095a744a428c134b5e26ad68e -MonoImporter: - serializedVersion: 2 - defaultReferences: - - tiltShiftShader: {fileID: 4800000, guid: bf34d2a25450349699e8ae6456fa7ca9, type: 3} - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/Tonemapping.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/Tonemapping.cs deleted file mode 100644 index 665ee98..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/Tonemapping.cs +++ /dev/null @@ -1,274 +0,0 @@ -using System; -using UnityEngine; - -namespace UnityStandardAssets.ImageEffects -{ - [ExecuteInEditMode] - [RequireComponent(typeof (Camera))] - [AddComponentMenu("Image Effects/Color Adjustments/Tonemapping")] - public class Tonemapping : PostEffectsBase - { - public enum TonemapperType - { - SimpleReinhard, - UserCurve, - Hable, - Photographic, - OptimizedHejiDawson, - AdaptiveReinhard, - AdaptiveReinhardAutoWhite, - }; - - public enum AdaptiveTexSize - { - Square16 = 16, - Square32 = 32, - Square64 = 64, - Square128 = 128, - Square256 = 256, - Square512 = 512, - Square1024 = 1024, - }; - - public TonemapperType type = TonemapperType.Photographic; - public AdaptiveTexSize adaptiveTextureSize = AdaptiveTexSize.Square256; - - // CURVE parameter - public AnimationCurve remapCurve; - private Texture2D curveTex = null; - - // UNCHARTED parameter - public float exposureAdjustment = 1.5f; - - // REINHARD parameter - public float middleGrey = 0.4f; - public float white = 2.0f; - public float adaptionSpeed = 1.5f; - - // usual & internal stuff - public Shader tonemapper = null; - public bool validRenderTextureFormat = true; - private Material tonemapMaterial = null; - private RenderTexture rt = null; - private RenderTextureFormat rtFormat = RenderTextureFormat.ARGBHalf; - - - public override bool CheckResources() - { - CheckSupport(false, true); - - tonemapMaterial = CheckShaderAndCreateMaterial(tonemapper, tonemapMaterial); - if (!curveTex && type == TonemapperType.UserCurve) - { - curveTex = new Texture2D(256, 1, TextureFormat.ARGB32, false, true); - curveTex.filterMode = FilterMode.Bilinear; - curveTex.wrapMode = TextureWrapMode.Clamp; - curveTex.hideFlags = HideFlags.DontSave; - } - - if (!isSupported) - ReportAutoDisable(); - return isSupported; - } - - - public float UpdateCurve() - { - float range = 1.0f; - if (remapCurve.keys.Length < 1) - remapCurve = new AnimationCurve(new Keyframe(0, 0), new Keyframe(2, 1)); - if (remapCurve != null) - { - if (remapCurve.length > 0) - range = remapCurve[remapCurve.length - 1].time; - for (float i = 0.0f; i <= 1.0f; i += 1.0f/255.0f) - { - float c = remapCurve.Evaluate(i*1.0f*range); - curveTex.SetPixel((int) Mathf.Floor(i*255.0f), 0, new Color(c, c, c)); - } - curveTex.Apply(); - } - return 1.0f/range; - } - - - private void OnDisable() - { - if (rt) - { - DestroyImmediate(rt); - rt = null; - } - if (tonemapMaterial) - { - DestroyImmediate(tonemapMaterial); - tonemapMaterial = null; - } - if (curveTex) - { - DestroyImmediate(curveTex); - curveTex = null; - } - } - - - private bool CreateInternalRenderTexture() - { - if (rt) - { - return false; - } - rtFormat = SystemInfo.SupportsRenderTextureFormat(RenderTextureFormat.RGHalf) ? RenderTextureFormat.RGHalf : RenderTextureFormat.ARGBHalf; - rt = new RenderTexture(1, 1, 0, rtFormat); - rt.hideFlags = HideFlags.DontSave; - return true; - } - - - // attribute indicates that the image filter chain will continue in LDR - [ImageEffectTransformsToLDR] - private void OnRenderImage(RenderTexture source, RenderTexture destination) - { - if (CheckResources() == false) - { - Graphics.Blit(source, destination); - return; - } - -#if UNITY_EDITOR - validRenderTextureFormat = true; - if (source.format != RenderTextureFormat.ARGBHalf) - { - validRenderTextureFormat = false; - } -#endif - - // clamp some values to not go out of a valid range - - exposureAdjustment = exposureAdjustment < 0.001f ? 0.001f : exposureAdjustment; - - // SimpleReinhard tonemappers (local, non adaptive) - - if (type == TonemapperType.UserCurve) - { - float rangeScale = UpdateCurve(); - tonemapMaterial.SetFloat("_RangeScale", rangeScale); - tonemapMaterial.SetTexture("_Curve", curveTex); - Graphics.Blit(source, destination, tonemapMaterial, 4); - return; - } - - if (type == TonemapperType.SimpleReinhard) - { - tonemapMaterial.SetFloat("_ExposureAdjustment", exposureAdjustment); - Graphics.Blit(source, destination, tonemapMaterial, 6); - return; - } - - if (type == TonemapperType.Hable) - { - tonemapMaterial.SetFloat("_ExposureAdjustment", exposureAdjustment); - Graphics.Blit(source, destination, tonemapMaterial, 5); - return; - } - - if (type == TonemapperType.Photographic) - { - tonemapMaterial.SetFloat("_ExposureAdjustment", exposureAdjustment); - Graphics.Blit(source, destination, tonemapMaterial, 8); - return; - } - - if (type == TonemapperType.OptimizedHejiDawson) - { - tonemapMaterial.SetFloat("_ExposureAdjustment", 0.5f*exposureAdjustment); - Graphics.Blit(source, destination, tonemapMaterial, 7); - return; - } - - // still here? - // => adaptive tone mapping: - // builds an average log luminance, tonemaps according to - // middle grey and white values (user controlled) - - // AdaptiveReinhardAutoWhite will calculate white value automagically - - bool freshlyBrewedInternalRt = CreateInternalRenderTexture(); // this retrieves rtFormat, so should happen before rt allocations - - RenderTexture rtSquared = RenderTexture.GetTemporary((int) adaptiveTextureSize, (int) adaptiveTextureSize, 0, rtFormat); - Graphics.Blit(source, rtSquared); - - int downsample = (int) Mathf.Log(rtSquared.width*1.0f, 2); - - int div = 2; - var rts = new RenderTexture[downsample]; - for (int i = 0; i < downsample; i++) - { - rts[i] = RenderTexture.GetTemporary(rtSquared.width/div, rtSquared.width/div, 0, rtFormat); - div *= 2; - } - - // downsample pyramid - - var lumRt = rts[downsample - 1]; - Graphics.Blit(rtSquared, rts[0], tonemapMaterial, 1); - if (type == TonemapperType.AdaptiveReinhardAutoWhite) - { - for (int i = 0; i < downsample - 1; i++) - { - Graphics.Blit(rts[i], rts[i + 1], tonemapMaterial, 9); - lumRt = rts[i + 1]; - } - } - else if (type == TonemapperType.AdaptiveReinhard) - { - for (int i = 0; i < downsample - 1; i++) - { - Graphics.Blit(rts[i], rts[i + 1]); - lumRt = rts[i + 1]; - } - } - - // we have the needed values, let's apply adaptive tonemapping - - adaptionSpeed = adaptionSpeed < 0.001f ? 0.001f : adaptionSpeed; - tonemapMaterial.SetFloat("_AdaptionSpeed", adaptionSpeed); - - rt.MarkRestoreExpected(); // keeping luminance values between frames, RT restore expected - -#if UNITY_EDITOR - if (Application.isPlaying && !freshlyBrewedInternalRt) - Graphics.Blit(lumRt, rt, tonemapMaterial, 2); - else - Graphics.Blit(lumRt, rt, tonemapMaterial, 3); -#else - Graphics.Blit (lumRt, rt, tonemapMaterial, freshlyBrewedInternalRt ? 3 : 2); -#endif - - middleGrey = middleGrey < 0.001f ? 0.001f : middleGrey; - tonemapMaterial.SetVector("_HdrParams", new Vector4(middleGrey, middleGrey, middleGrey, white*white)); - tonemapMaterial.SetTexture("_SmallTex", rt); - if (type == TonemapperType.AdaptiveReinhard) - { - Graphics.Blit(source, destination, tonemapMaterial, 0); - } - else if (type == TonemapperType.AdaptiveReinhardAutoWhite) - { - Graphics.Blit(source, destination, tonemapMaterial, 10); - } - else - { - Debug.LogError("No valid adaptive tonemapper type found!"); - Graphics.Blit(source, destination); // at least we get the TransformToLDR effect - } - - // cleanup for adaptive - - for (int i = 0; i < downsample; i++) - { - RenderTexture.ReleaseTemporary(rts[i]); - } - RenderTexture.ReleaseTemporary(rtSquared); - } - } -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/Tonemapping.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/Tonemapping.cs.meta deleted file mode 100644 index 4443b42..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/Tonemapping.cs.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: e50e925fb93c78246bf995d9dc3a2330 -MonoImporter: - serializedVersion: 2 - defaultReferences: - - tonemapper: {fileID: 4800000, guid: 003377fc2620a44939dadde6fe3f8190, type: 3} - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/Triangles.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/Triangles.cs deleted file mode 100644 index 516bded..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/Triangles.cs +++ /dev/null @@ -1,112 +0,0 @@ -using System; -using UnityEngine; -using Object = UnityEngine.Object; - -namespace UnityStandardAssets.ImageEffects -{ - class Triangles - { - private static Mesh[] meshes; - private static int currentTris = 0; - - static bool HasMeshes() - { - if (meshes == null) - return false; - for (int i = 0; i < meshes.Length; i++) - if (null == meshes[i]) - return false; - - return true; - } - - static void Cleanup() - { - if (meshes == null) - return; - - for (int i = 0; i < meshes.Length; i++) - { - if (null != meshes[i]) - { - Object.DestroyImmediate(meshes[i]); - meshes[i] = null; - } - } - meshes = null; - } - - static Mesh[] GetMeshes(int totalWidth, int totalHeight) - { - if (HasMeshes() && (currentTris == (totalWidth * totalHeight))) - { - return meshes; - } - - int maxTris = 65000 / 3; - int totalTris = totalWidth * totalHeight; - currentTris = totalTris; - - int meshCount = Mathf.CeilToInt((1.0f * totalTris) / (1.0f * maxTris)); - - meshes = new Mesh[meshCount]; - - int i = 0; - int index = 0; - for (i = 0; i < totalTris; i += maxTris) - { - int tris = Mathf.FloorToInt(Mathf.Clamp((totalTris - i), 0, maxTris)); - - meshes[index] = GetMesh(tris, i, totalWidth, totalHeight); - index++; - } - - return meshes; - } - - static Mesh GetMesh(int triCount, int triOffset, int totalWidth, int totalHeight) - { - var mesh = new Mesh(); - mesh.hideFlags = HideFlags.DontSave; - - var verts = new Vector3[triCount * 3]; - var uvs = new Vector2[triCount * 3]; - var uvs2 = new Vector2[triCount * 3]; - var tris = new int[triCount * 3]; - - for (int i = 0; i < triCount; i++) - { - int i3 = i * 3; - int vertexWithOffset = triOffset + i; - - float x = Mathf.Floor(vertexWithOffset % totalWidth) / totalWidth; - float y = Mathf.Floor(vertexWithOffset / totalWidth) / totalHeight; - - Vector3 position = new Vector3(x * 2 - 1, y * 2 - 1, 1.0f); - - verts[i3 + 0] = position; - verts[i3 + 1] = position; - verts[i3 + 2] = position; - - uvs[i3 + 0] = new Vector2(0.0f, 0.0f); - uvs[i3 + 1] = new Vector2(1.0f, 0.0f); - uvs[i3 + 2] = new Vector2(0.0f, 1.0f); - - uvs2[i3 + 0] = new Vector2(x, y); - uvs2[i3 + 1] = new Vector2(x, y); - uvs2[i3 + 2] = new Vector2(x, y); - - tris[i3 + 0] = i3 + 0; - tris[i3 + 1] = i3 + 1; - tris[i3 + 2] = i3 + 2; - } - - mesh.vertices = verts; - mesh.triangles = tris; - mesh.uv = uvs; - mesh.uv2 = uvs2; - - return mesh; - } - } -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/Triangles.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/Triangles.cs.meta deleted file mode 100644 index 2ea56f0..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/Triangles.cs.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 18b91636de2ba3445913e4cf38528dc8 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/Twirl.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/Twirl.cs deleted file mode 100644 index a7b57e9..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/Twirl.cs +++ /dev/null @@ -1,22 +0,0 @@ -using System; -using UnityEngine; - -namespace UnityStandardAssets.ImageEffects -{ - [ExecuteInEditMode] - [AddComponentMenu("Image Effects/Displacement/Twirl")] - public class Twirl : ImageEffectBase - { - public Vector2 radius = new Vector2(0.3F,0.3F); - [Range(0.0f,360.0f)] - public float angle = 50; - public Vector2 center = new Vector2 (0.5F, 0.5F); - - - // Called by camera to apply image effect - void OnRenderImage (RenderTexture source, RenderTexture destination) - { - ImageEffects.RenderDistortion (material, source, destination, angle, center, radius); - } - } -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/Twirl.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/Twirl.cs.meta deleted file mode 100644 index 4b0b6c8..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/Twirl.cs.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: bdda781cad112c75d0008dfa8d76c639 -MonoImporter: - serializedVersion: 2 - defaultReferences: - - shader: {fileID: 4800000, guid: 641b781cad112c75d0008dfa8d76c639, type: 3} - executionOrder: 0 - icon: {instanceID: 0} - userData: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/VignetteAndChromaticAberration.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/VignetteAndChromaticAberration.cs deleted file mode 100644 index e34321b..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/VignetteAndChromaticAberration.cs +++ /dev/null @@ -1,114 +0,0 @@ -using System; -using UnityEngine; - -namespace UnityStandardAssets.ImageEffects -{ - [ExecuteInEditMode] - [RequireComponent (typeof(Camera))] - [AddComponentMenu ("Image Effects/Camera/Vignette and Chromatic Aberration")] - public class VignetteAndChromaticAberration : PostEffectsBase - { - public enum AberrationMode - { - Simple = 0, - Advanced = 1, - } - - - public AberrationMode mode = AberrationMode.Simple; - public float intensity = 0.036f; // intensity == 0 disables pre pass (optimization) - public float chromaticAberration = 0.2f; - public float axialAberration = 0.5f; - public float blur = 0.0f; // blur == 0 disables blur pass (optimization) - public float blurSpread = 0.75f; - public float luminanceDependency = 0.25f; - public float blurDistance = 2.5f; - public Shader vignetteShader; - public Shader separableBlurShader; - public Shader chromAberrationShader; - - - private Material m_VignetteMaterial; - private Material m_SeparableBlurMaterial; - private Material m_ChromAberrationMaterial; - - - public override bool CheckResources () - { - CheckSupport (false); - - m_VignetteMaterial = CheckShaderAndCreateMaterial (vignetteShader, m_VignetteMaterial); - m_SeparableBlurMaterial = CheckShaderAndCreateMaterial (separableBlurShader, m_SeparableBlurMaterial); - m_ChromAberrationMaterial = CheckShaderAndCreateMaterial (chromAberrationShader, m_ChromAberrationMaterial); - - if (!isSupported) - ReportAutoDisable (); - return isSupported; - } - - - void OnRenderImage (RenderTexture source, RenderTexture destination) - { - if ( CheckResources () == false) - { - Graphics.Blit (source, destination); - return; - } - - int rtW = source.width; - int rtH = source.height; - - bool doPrepass = (Mathf.Abs(blur)>0.0f || Mathf.Abs(intensity)>0.0f); - - float widthOverHeight = (1.0f * rtW) / (1.0f * rtH); - const float oneOverBaseSize = 1.0f / 512.0f; - - RenderTexture color = null; - RenderTexture color2A = null; - - if (doPrepass) - { - color = RenderTexture.GetTemporary (rtW, rtH, 0, source.format); - - // Blur corners - if (Mathf.Abs (blur)>0.0f) - { - color2A = RenderTexture.GetTemporary (rtW / 2, rtH / 2, 0, source.format); - - Graphics.Blit (source, color2A, m_ChromAberrationMaterial, 0); - - for(int i = 0; i < 2; i++) - { // maybe make iteration count tweakable - m_SeparableBlurMaterial.SetVector ("offsets",new Vector4 (0.0f, blurSpread * oneOverBaseSize, 0.0f, 0.0f)); - RenderTexture color2B = RenderTexture.GetTemporary (rtW / 2, rtH / 2, 0, source.format); - Graphics.Blit (color2A, color2B, m_SeparableBlurMaterial); - RenderTexture.ReleaseTemporary (color2A); - - m_SeparableBlurMaterial.SetVector ("offsets",new Vector4 (blurSpread * oneOverBaseSize / widthOverHeight, 0.0f, 0.0f, 0.0f)); - color2A = RenderTexture.GetTemporary (rtW / 2, rtH / 2, 0, source.format); - Graphics.Blit (color2B, color2A, m_SeparableBlurMaterial); - RenderTexture.ReleaseTemporary (color2B); - } - } - - m_VignetteMaterial.SetFloat("_Intensity", (1.0f / (1.0f - intensity) - 1.0f)); // intensity for vignette - m_VignetteMaterial.SetFloat("_Blur", (1.0f / (1.0f - blur)) - 1.0f); // blur intensity - m_VignetteMaterial.SetTexture ("_VignetteTex", color2A); // blurred texture - - Graphics.Blit (source, color, m_VignetteMaterial, 0); // prepass blit: darken & blur corners - } - - m_ChromAberrationMaterial.SetFloat ("_ChromaticAberration", chromaticAberration); - m_ChromAberrationMaterial.SetFloat ("_AxialAberration", axialAberration); - m_ChromAberrationMaterial.SetVector ("_BlurDistance", new Vector2 (-blurDistance, blurDistance)); - m_ChromAberrationMaterial.SetFloat ("_Luminance", 1.0f/Mathf.Max(Mathf.Epsilon, luminanceDependency)); - - if (doPrepass) color.wrapMode = TextureWrapMode.Clamp; - else source.wrapMode = TextureWrapMode.Clamp; - Graphics.Blit (doPrepass ? color : source, destination, m_ChromAberrationMaterial, mode == AberrationMode.Advanced ? 2 : 1); - - RenderTexture.ReleaseTemporary (color); - RenderTexture.ReleaseTemporary (color2A); - } - } -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/VignetteAndChromaticAberration.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/VignetteAndChromaticAberration.cs.meta deleted file mode 100644 index 6b6a813..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/VignetteAndChromaticAberration.cs.meta +++ /dev/null @@ -1,14 +0,0 @@ -fileFormatVersion: 2 -guid: dd6d4281e5d7cd44d8c6e38bc2c1b8d8 -MonoImporter: - serializedVersion: 2 - defaultReferences: - - vignetteShader: {fileID: 4800000, guid: 627943dc7a9a74286b70a4f694a0acd5, type: 3} - - separableBlurShader: {fileID: 4800000, guid: e97c14fbb5ea04c3a902cc533d7fc5d1, - type: 3} - - chromAberrationShader: {fileID: 4800000, guid: 2b4f29398d9484ccfa9fd220449f5eee, - type: 3} - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/Vortex.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/Vortex.cs deleted file mode 100644 index 8a2d866..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/Vortex.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System; -using UnityEngine; - -namespace UnityStandardAssets.ImageEffects -{ - [ExecuteInEditMode] - [AddComponentMenu("Image Effects/Displacement/Vortex")] - public class Vortex : ImageEffectBase - { - public Vector2 radius = new Vector2(0.4F,0.4F); - public float angle = 50; - public Vector2 center = new Vector2(0.5F, 0.5F); - - // Called by camera to apply image effect - void OnRenderImage (RenderTexture source, RenderTexture destination) - { - ImageEffects.RenderDistortion (material, source, destination, angle, center, radius); - } - } -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/Vortex.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/Vortex.cs.meta deleted file mode 100644 index f6b8089..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Scripts/Vortex.cs.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: a94b781cad112c75d0008dfa8d76c639 -MonoImporter: - serializedVersion: 2 - defaultReferences: - - shader: {fileID: 4800000, guid: 708b781cad112c75d0008dfa8d76c639, type: 3} - executionOrder: 0 - icon: {instanceID: 0} - userData: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders.meta deleted file mode 100644 index b68c7f9..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders.meta +++ /dev/null @@ -1,6 +0,0 @@ -fileFormatVersion: 2 -guid: b2145489f7c704db8acb14a52bddeee9 -folderAsset: yes -DefaultImporter: - userData: - assetBundleName: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/BlendModesOverlay.shader b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/BlendModesOverlay.shader deleted file mode 100644 index 1910244..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/BlendModesOverlay.shader +++ /dev/null @@ -1,138 +0,0 @@ -// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' - -Shader "Hidden/BlendModesOverlay" { - Properties { - _MainTex ("Screen Blended", 2D) = "" {} - _Overlay ("Color", 2D) = "grey" {} - } - - CGINCLUDE - - #include "UnityCG.cginc" - - struct v2f { - float4 pos : SV_POSITION; - float2 uv[2] : TEXCOORD0; - }; - - sampler2D _Overlay; - half4 _Overlay_ST; - - sampler2D _MainTex; - half4 _MainTex_ST; - - half _Intensity; - half4 _MainTex_TexelSize; - half4 _UV_Transform = half4(1, 0, 0, 1); - - v2f vert( appdata_img v ) { - v2f o; - o.pos = UnityObjectToClipPos(v.vertex); - - o.uv[0] = UnityStereoScreenSpaceUVAdjust(float2( - dot(v.texcoord.xy, _UV_Transform.xy), - dot(v.texcoord.xy, _UV_Transform.zw) - ), _Overlay_ST); - - #if UNITY_UV_STARTS_AT_TOP - if(_MainTex_TexelSize.y<0.0) - o.uv[0].y = 1.0-o.uv[0].y; - #endif - - o.uv[1] = UnityStereoScreenSpaceUVAdjust(v.texcoord.xy, _MainTex_ST); - return o; - } - - half4 fragAddSub (v2f i) : SV_Target { - half4 toAdd = tex2D(_Overlay, i.uv[0]) * _Intensity; - return tex2D(_MainTex, i.uv[1]) + toAdd; - } - - half4 fragMultiply (v2f i) : SV_Target { - half4 toBlend = tex2D(_Overlay, i.uv[0]) * _Intensity; - return tex2D(_MainTex, i.uv[1]) * toBlend; - } - - half4 fragScreen (v2f i) : SV_Target { - half4 toBlend = (tex2D(_Overlay, i.uv[0]) * _Intensity); - return 1-(1-toBlend)*(1-(tex2D(_MainTex, i.uv[1]))); - } - - half4 fragOverlay (v2f i) : SV_Target { - half4 m = (tex2D(_Overlay, i.uv[0]));// * 255.0; - half4 color = (tex2D(_MainTex, i.uv[1]));//* 255.0; - - // overlay blend mode - //color.rgb = (color.rgb/255.0) * (color.rgb + ((2*m.rgb)/( 255.0 )) * (255.0-color.rgb)); - //color.rgb /= 255.0; - - /* -if (Target > ½) R = 1 - (1-2x(Target-½)) x (1-Blend) -if (Target <= ½) R = (2xTarget) x Blend - */ - - float3 check = step(half3(0.5,0.5,0.5), color.rgb); - float3 result = 0; - - result = check * (half3(1,1,1) - ( (half3(1,1,1) - 2*(color.rgb-0.5)) * (1-m.rgb))); - result += (1-check) * (2*color.rgb) * m.rgb; - - return half4(lerp(color.rgb, result.rgb, (_Intensity)), color.a); - } - - half4 fragAlphaBlend (v2f i) : SV_Target { - half4 toAdd = tex2D(_Overlay, i.uv[0]) ; - return lerp(tex2D(_MainTex, i.uv[1]), toAdd, toAdd.a * _Intensity); - } - - - ENDCG - -Subshader { - ZTest Always Cull Off ZWrite Off - ColorMask RGB - - Pass { - - CGPROGRAM - #pragma vertex vert - #pragma fragment fragAddSub - ENDCG - } - - Pass { - - CGPROGRAM - #pragma vertex vert - #pragma fragment fragScreen - ENDCG - } - - Pass { - - CGPROGRAM - #pragma vertex vert - #pragma fragment fragMultiply - ENDCG - } - - Pass { - - CGPROGRAM - #pragma vertex vert - #pragma fragment fragOverlay - ENDCG - } - - Pass { - - CGPROGRAM - #pragma vertex vert - #pragma fragment fragAlphaBlend - ENDCG - } -} - -Fallback off - -} // shader diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/BlendModesOverlay.shader.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/BlendModesOverlay.shader.meta deleted file mode 100644 index ebf8628..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/BlendModesOverlay.shader.meta +++ /dev/null @@ -1,4 +0,0 @@ -fileFormatVersion: 2 -guid: 8c81db0e527d24acc9bcec04e87781bd -ShaderImporter: - userData: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/BlurEffectConeTaps.shader b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/BlurEffectConeTaps.shader deleted file mode 100644 index 743667d..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/BlurEffectConeTaps.shader +++ /dev/null @@ -1,54 +0,0 @@ -// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' - -Shader "Hidden/BlurEffectConeTap" { - Properties { _MainTex ("", any) = "" {} } - CGINCLUDE - #include "UnityCG.cginc" - struct v2f { - float4 pos : SV_POSITION; - half2 uv : TEXCOORD0; - half2 taps[4] : TEXCOORD1; - }; - sampler2D _MainTex; - half4 _MainTex_TexelSize; - half4 _MainTex_ST; - half4 _BlurOffsets; - v2f vert( appdata_img v ) { - v2f o; - o.pos = UnityObjectToClipPos(v.vertex); - - o.uv = v.texcoord - _BlurOffsets.xy * _MainTex_TexelSize.xy; // hack, see BlurEffect.cs for the reason for this. let's make a new blur effect soon -#ifdef UNITY_SINGLE_PASS_STEREO - // we need to keep texel size correct after the uv adjustment. - o.taps[0] = UnityStereoScreenSpaceUVAdjust(o.uv + _MainTex_TexelSize * _BlurOffsets.xy * (1.0f / _MainTex_ST.xy), _MainTex_ST); - o.taps[1] = UnityStereoScreenSpaceUVAdjust(o.uv - _MainTex_TexelSize * _BlurOffsets.xy * (1.0f / _MainTex_ST.xy), _MainTex_ST); - o.taps[2] = UnityStereoScreenSpaceUVAdjust(o.uv + _MainTex_TexelSize * _BlurOffsets.xy * half2(1, -1) * (1.0f / _MainTex_ST.xy), _MainTex_ST); - o.taps[3] = UnityStereoScreenSpaceUVAdjust(o.uv - _MainTex_TexelSize * _BlurOffsets.xy * half2(1, -1) * (1.0f / _MainTex_ST.xy), _MainTex_ST); -#else - o.taps[0] = o.uv + _MainTex_TexelSize * _BlurOffsets.xy; - o.taps[1] = o.uv - _MainTex_TexelSize * _BlurOffsets.xy; - o.taps[2] = o.uv + _MainTex_TexelSize * _BlurOffsets.xy * half2(1,-1); - o.taps[3] = o.uv - _MainTex_TexelSize * _BlurOffsets.xy * half2(1,-1); -#endif - return o; - } - half4 frag(v2f i) : SV_Target { - half4 color = tex2D(_MainTex, i.taps[0]); - color += tex2D(_MainTex, i.taps[1]); - color += tex2D(_MainTex, i.taps[2]); - color += tex2D(_MainTex, i.taps[3]); - return color * 0.25; - } - ENDCG - SubShader { - Pass { - ZTest Always Cull Off ZWrite Off - - CGPROGRAM - #pragma vertex vert - #pragma fragment frag - ENDCG - } - } - Fallback off -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/BlurEffectConeTaps.shader.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/BlurEffectConeTaps.shader.meta deleted file mode 100644 index 5d9fd5e..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/BlurEffectConeTaps.shader.meta +++ /dev/null @@ -1,4 +0,0 @@ -fileFormatVersion: 2 -guid: 57e6deea7c2924e22a5138e2b70bb4dc -ShaderImporter: - userData: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/CameraMotionBlur.shader b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/CameraMotionBlur.shader deleted file mode 100644 index c9afc63..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/CameraMotionBlur.shader +++ /dev/null @@ -1,534 +0,0 @@ -// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' - - /* - CAMERA MOTION BLUR IMAGE EFFECTS - - Reconstruction Filter: - Based on "Plausible Motion Blur" - http://graphics.cs.williams.edu/papers/MotionBlurI3D12/ - - CameraMotion: - Based on Alex Vlacho's technique in - http://www.valvesoftware.com/publications/2008/GDC2008_PostProcessingInTheOrangeBox.pdf - - SimpleBlur: - Straightforward sampling along velocities - - ScatterFromGather: - Combines Reconstruction with depth of field type defocus - */ - - Shader "Hidden/CameraMotionBlur" { - Properties { - _MainTex ("-", 2D) = "" {} - _NoiseTex ("-", 2D) = "grey" {} - _VelTex ("-", 2D) = "black" {} - _NeighbourMaxTex ("-", 2D) = "black" {} - _TileTexDebug ("-", 2D) = "" {} - } - - CGINCLUDE - - #include "UnityCG.cginc" - - // 's' in paper (# of samples for reconstruction) - #define NUM_SAMPLES (11) - // # samples for valve style blur - #define MOTION_SAMPLES (16) - // 'k' in paper - float _MaxRadiusOrKInPaper; - - static const int SmallDiscKernelSamples = 12; - static const float2 SmallDiscKernel[SmallDiscKernelSamples] = - { - float2(-0.326212,-0.40581), - float2(-0.840144,-0.07358), - float2(-0.695914,0.457137), - float2(-0.203345,0.620716), - float2(0.96234,-0.194983), - float2(0.473434,-0.480026), - float2(0.519456,0.767022), - float2(0.185461,-0.893124), - float2(0.507431,0.064425), - float2(0.89642,0.412458), - float2(-0.32194,-0.932615), - float2(-0.791559,-0.59771) - }; - - struct v2f - { - float4 pos : SV_POSITION; - float2 uv : TEXCOORD0; - }; - - sampler2D _MainTex; - sampler2D_float _CameraDepthTexture; - sampler2D _VelTex; - sampler2D _NeighbourMaxTex; - sampler2D _NoiseTex; - sampler2D _TileTexDebug; - - float4 _MainTex_TexelSize; - float4 _CameraDepthTexture_TexelSize; - float4 _VelTex_TexelSize; - - half4 _MainTex_ST; - half4 _CameraDepthTexture_ST; - half4 _VelTex_ST; - - float4x4 _InvViewProj; // inverse view-projection matrix - float4x4 _PrevViewProj; // previous view-projection matrix - float4x4 _ToPrevViewProjCombined; // combined - float4x4 _StereoToPrevViewProjCombined0; // combined stereo versions. - float4x4 _StereoToPrevViewProjCombined1; // combined stereo versions. - - float _Jitter; - - float _VelocityScale; - float _DisplayVelocityScale; - - float _MaxVelocity; - float _MinVelocity; - - float4 _BlurDirectionPacked; - - float _SoftZDistance; - - v2f vert(appdata_img v) - { - v2f o; - o.pos = UnityObjectToClipPos(v.vertex); - o.uv = UnityStereoScreenSpaceUVAdjust(v.texcoord.xy, _MainTex_ST); - return o; - } - - float4x4 GetPrevViewProjCombined() - { -#ifdef UNITY_SINGLE_PASS_STEREO - return unity_StereoEyeIndex == 0 ? _StereoToPrevViewProjCombined0 : _StereoToPrevViewProjCombined1; -#else - return _ToPrevViewProjCombined; -#endif - } - - float4 CameraVelocity(v2f i) : SV_Target - { - float2 depth_uv = i.uv; - - #if UNITY_UV_STARTS_AT_TOP - if (_MainTex_TexelSize.y < 0) - depth_uv.y = 1 - depth_uv.y; - #endif - - // read depth - float d = SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture, depth_uv); - - // calculate position from pixel from depth - float3 clipPos = float3(i.uv.x*2.0-1.0, (i.uv.y)*2.0-1.0, d); - - // only 1 matrix mul: - float4 prevClipPos = mul(GetPrevViewProjCombined(), float4(clipPos, 1.0)); - prevClipPos.xyz /= prevClipPos.w; - - /* - float4 ws = mul(_InvViewProj, float4(clipPos, 1.0)); - ws /= ws.w; - prevClipPos = mul(_PrevViewProj,ws); - prevClipPos.xyz /= prevClipPos.w; - */ - - /* - float2 vel = _VelocityScale *(clipPos.xy - prevClipPos.xy) / 2.f; - // clamp to maximum velocity (in pixels) - float maxVel = length(_MainTex_TexelSize.xy*_MaxVelocity); - if (length(vel) > maxVel) { - vel = normalize(vel) * maxVel; - } - return float4(vel, 0.0, 0.0); - */ - - float2 vel = _MainTex_TexelSize.zw * _VelocityScale * (clipPos.xy - prevClipPos.xy) / 2.f; - float vellen = length(vel); - float maxVel = _MaxVelocity; - float2 velOut = vel * max(0.5, min(vellen, maxVel)) / (vellen + 1e-2f); - velOut *= _MainTex_TexelSize.xy; - return float4(velOut, 0.0, 0.0); - - } - - // vector with largest magnitude - float2 vmax(float2 a, float2 b) - { - float ma = dot(a, a); - float mb = dot(b, b); - return (ma > mb) ? a : b; - } - - // find dominant velocity for each tile - float4 TileMax(v2f i) : SV_Target - { - float2 uvCorner = i.uv - _MainTex_TexelSize.xy * (_MaxRadiusOrKInPaper * 0.5); - float2 maxvel = float2(0,0); - float4 baseUv = float4(uvCorner,0,0); - float4 uvScale = float4(_MainTex_TexelSize.xy, 0, 0); - - for(int l=0; l<(int)_MaxRadiusOrKInPaper; l++) - { - for(int k=0; k<(int)_MaxRadiusOrKInPaper; k++) - { - maxvel = vmax(maxvel, tex2Dlod(_MainTex, baseUv + float4(l,k,0,0) * uvScale).xy); - } - } - return float4(maxvel, 0, 1); - } - - // find maximum velocity in any adjacent tile - float4 NeighbourMax(v2f i) : SV_Target - { - float2 x_ = i.uv; - - // to fetch all neighbours, we need 3x3 point filtered samples - - float2 nx = tex2D(_MainTex, x_+float2(1.0, 1.0)*_MainTex_TexelSize.xy).xy; - nx = vmax(nx, tex2D(_MainTex, x_+float2(1.0, 0.0)*_MainTex_TexelSize.xy).xy); - nx = vmax(nx, tex2D(_MainTex, x_+float2(1.0,-1.0)*_MainTex_TexelSize.xy).xy); - nx = vmax(nx, tex2D(_MainTex, x_+float2(0.0, 1.0)*_MainTex_TexelSize.xy).xy); - nx = vmax(nx, tex2D(_MainTex, x_+float2(0.0, 0.0)*_MainTex_TexelSize.xy).xy); - nx = vmax(nx, tex2D(_MainTex, x_+float2(0.0,-1.0)*_MainTex_TexelSize.xy).xy); - nx = vmax(nx, tex2D(_MainTex, x_+float2(-1.0, 1.0)*_MainTex_TexelSize.xy).xy); - nx = vmax(nx, tex2D(_MainTex, x_+float2(-1.0, 0.0)*_MainTex_TexelSize.xy).xy); - nx = vmax(nx, tex2D(_MainTex, x_+float2(-1.0,-1.0)*_MainTex_TexelSize.xy).xy); - - return float4(nx, 0, 0); - } - - float4 Debug(v2f i) : SV_Target - { - return saturate( float4(tex2D(_MainTex, i.uv).x,abs(tex2D(_MainTex, i.uv).y),-tex2D(_MainTex, i.uv).xy) * _DisplayVelocityScale); - } - - // classification filters - float cone(float2 px, float2 py, float2 v) - { - return clamp(1.0 - (length(px - py) / length(v)), 0.0, 1.0); - } - - float cylinder(float2 x, float2 y, float2 v) - { - float lv = length(v); - return 1.0 - smoothstep(0.95*lv, 1.05*lv, length(x - y)); - } - - // is zb closer than za? - float softDepthCompare(float za, float zb) - { - return clamp(1.0 - (za - zb) / _SoftZDistance, 0.0, 1.0); - } - - float4 SimpleBlur (v2f i) : SV_Target - { - float2 x = i.uv; - float2 xf = x; - - #if UNITY_UV_STARTS_AT_TOP - if (_MainTex_TexelSize.y < 0) - xf.y = 1 - xf.y; - #endif - - float2 vx = tex2D(_VelTex, xf).xy; // vel at x - - float4 sum = float4(0, 0, 0, 0); - for(int l=0; l _MaxVelocity) { - blurDir *= (_MaxVelocity / velMag); - velMag = _MaxVelocity; - } - - float4 centerTap = tex2D(_MainTex, x); - float4 sum = centerTap; - - blurDir *= smoothstep(_MinVelocity * 0.25f, _MinVelocity * 2.5, velMag); - - blurDir *= _MainTex_TexelSize.xy; - blurDir /= MOTION_SAMPLES; - - for(int i=0; i mb) ? a : b; - } - - // find dominant velocity in each tile - float4 TileMax(v2f i) : SV_Target - { - float2 tilemax = float2(0.0, 0.0); - float2 srcPos = i.uv - _MainTex_TexelSize.xy * _MaxRadiusOrKInPaper * 0.5; - - for(int y=0; y<(int)_MaxRadiusOrKInPaper; y++) { - for(int x=0; x<(int)_MaxRadiusOrKInPaper; x++) { - float2 v = tex2D(_MainTex, srcPos + float2(x,y) * _MainTex_TexelSize.xy).xy; - tilemax = vmax(tilemax, v); - } - } - return float4(tilemax, 0, 1); - } - - // find maximum velocity in any adjacent tile - float4 NeighbourMax(v2f i) : SV_Target - { - float2 maxvel = float2(0.0, 0.0); - for(int y=-1; y<=1; y++) { - for(int x=-1; x<=1; x++) { - float2 v = tex2D(_MainTex, i.uv + float2(x,y) * _MainTex_TexelSize.xy).xy; - maxvel = vmax(maxvel, v); - } - } - return float4(maxvel, 0, 1); - } - - float cone(float2 px, float2 py, float2 v) - { - return clamp(1.0 - (length(px - py) / length(v)), 0.0, 1.0); - } - - float cylinder(float2 x, float2 y, float2 v) - { - float lv = length(v); - return 1.0 - smoothstep(0.95*lv, 1.05*lv, length(x - y)); - } - - float softDepthCompare(float za, float zb) - { - return clamp(1.0 - (za - zb) / _SoftZDistance, 0.0, 1.0); - } - - float4 ReconstructFilterBlur(v2f i) : SV_Target - { - float2 x = i.uv; - float2 xf = x; - - #if UNITY_UV_STARTS_AT_TOP - if (_MainTex_TexelSize.y < 0) - xf.y = 1-xf.y; - #endif - - float2 x2 = xf; - - float2 vn = tex2D(_NeighbourMaxTex, x2).xy; // largest velocity in neighbourhood - float4 cx = tex2D(_MainTex, x); // color at x - - float zx = SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture, x); - zx = -Linear01Depth(zx); // depth at x - float2 vx = tex2D(_VelTex, xf).xy; // vel at x - - // random offset [-0.5, 0.5] - float j = (tex2D(_NoiseTex, i.uv * 11.0f ).r*2-1) * _Jitter; - - // sample current pixel - float weight = 1.0; - float4 sum = cx * weight; - - int centerSample = (int)(NUM_SAMPLES-1) / 2; - - // in DX11 county we take more samples and interleave with sampling along vx direction to break up "patternized" look - - for(int l=0; l0.99999) - return half4(1,1,1,1); - else - return EncodeFloatRGBA(d); - } - - ENDCG - -Subshader { - - Pass { - ZTest Always Cull Off ZWrite Off - - CGPROGRAM - #pragma vertex vert - #pragma fragment frag - ENDCG - } -} - -Fallback off - -} // shader diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/ConvertDepth.shader.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/ConvertDepth.shader.meta deleted file mode 100644 index 8b325fa..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/ConvertDepth.shader.meta +++ /dev/null @@ -1,4 +0,0 @@ -fileFormatVersion: 2 -guid: 14768d3865b1342e3a861fbe19ba2db2 -ShaderImporter: - userData: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/CreaseApply.shader b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/CreaseApply.shader deleted file mode 100644 index bc61eab..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/CreaseApply.shader +++ /dev/null @@ -1,65 +0,0 @@ -// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' - - - -Shader "Hidden/CreaseApply" { -Properties { - _MainTex ("Base (RGB)", 2D) = "white" {} - _HrDepthTex ("Base (RGB)", 2D) = "white" {} - _LrDepthTex ("Base (RGB)", 2D) = "white" {} -} - -SubShader { - Pass { - ZTest Always Cull Off ZWrite Off - -CGPROGRAM -#pragma vertex vert -#pragma fragment frag -#include "UnityCG.cginc" - -sampler2D _MainTex; -sampler2D _HrDepthTex; -sampler2D _LrDepthTex; - -uniform float4 _MainTex_TexelSize; -half4 _MainTex_ST; -half4 _HrDepthTex_ST; -half4 _LrDepthTex_ST; -uniform float intensity; - -struct v2f { - float4 pos : SV_POSITION; - float2 uv : TEXCOORD0; -}; - -v2f vert( appdata_img v ) -{ - v2f o; - o.pos = UnityObjectToClipPos (v.vertex); - o.uv.xy = v.texcoord.xy; - return o; -} - -half4 frag (v2f i) : SV_Target -{ - float4 hrDepth = tex2D(_HrDepthTex, UnityStereoScreenSpaceUVAdjust(i.uv, _HrDepthTex_ST)); - float4 lrDepth = tex2D(_LrDepthTex, UnityStereoScreenSpaceUVAdjust(i.uv, _LrDepthTex_ST)); - - hrDepth.a = DecodeFloatRGBA(hrDepth); - lrDepth.a = DecodeFloatRGBA(lrDepth); - - float4 color = tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv, _MainTex_ST)); - - return color * (1.0-abs(hrDepth.a-lrDepth.a)*intensity); -} - -ENDCG - - - } -} - -Fallback off - -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/CreaseApply.shader.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/CreaseApply.shader.meta deleted file mode 100644 index 648c60a..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/CreaseApply.shader.meta +++ /dev/null @@ -1,4 +0,0 @@ -fileFormatVersion: 2 -guid: b59984d82af624bd3b0c777f038276f2 -ShaderImporter: - userData: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/EdgeDetectNormals.shader b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/EdgeDetectNormals.shader deleted file mode 100644 index 2954499..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/EdgeDetectNormals.shader +++ /dev/null @@ -1,331 +0,0 @@ -// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' - - -Shader "Hidden/EdgeDetect" { - Properties { - _MainTex ("Base (RGB)", 2D) = "" {} - } - - CGINCLUDE - - #include "UnityCG.cginc" - - struct v2f { - float4 pos : SV_POSITION; - float2 uv[5] : TEXCOORD0; - }; - - struct v2fd { - float4 pos : SV_POSITION; - float2 uv[2] : TEXCOORD0; - }; - - sampler2D _MainTex; - uniform float4 _MainTex_TexelSize; - half4 _MainTex_ST; - - sampler2D _CameraDepthNormalsTexture; - half4 _CameraDepthNormalsTexture_ST; - - sampler2D_float _CameraDepthTexture; - half4 _CameraDepthTexture_ST; - - uniform half4 _Sensitivity; - uniform half4 _BgColor; - uniform half _BgFade; - uniform half _SampleDistance; - uniform float _Exponent; - - uniform float _Threshold; - - struct v2flum { - float4 pos : SV_POSITION; - float2 uv[3] : TEXCOORD0; - }; - - v2flum vertLum (appdata_img v) - { - v2flum o; - o.pos = UnityObjectToClipPos (v.vertex); - float2 uv = MultiplyUV( UNITY_MATRIX_TEXTURE0, v.texcoord ); - o.uv[0] = UnityStereoScreenSpaceUVAdjust(uv, _MainTex_ST); - o.uv[1] = UnityStereoScreenSpaceUVAdjust(uv + float2(-_MainTex_TexelSize.x, -_MainTex_TexelSize.y) * _SampleDistance, _MainTex_ST); - o.uv[2] = UnityStereoScreenSpaceUVAdjust(uv + float2(+_MainTex_TexelSize.x, -_MainTex_TexelSize.y) * _SampleDistance, _MainTex_ST); - return o; - } - - - fixed4 fragLum (v2flum i) : SV_Target - { - fixed4 original = tex2D(_MainTex, i.uv[0]); - - // a very simple cross gradient filter - - half3 p1 = original.rgb; - half3 p2 = tex2D(_MainTex, i.uv[1]).rgb; - half3 p3 = tex2D(_MainTex, i.uv[2]).rgb; - - half3 diff = p1 * 2 - p2 - p3; - half len = dot(diff, diff); - len = step(len, _Threshold); - //if(len >= _Threshold) - // original.rgb = 0; - - return len * lerp(original, _BgColor, _BgFade); - } - - inline half CheckSame (half2 centerNormal, float centerDepth, half4 theSample) - { - // difference in normals - // do not bother decoding normals - there's no need here - half2 diff = abs(centerNormal - theSample.xy) * _Sensitivity.y; - int isSameNormal = (diff.x + diff.y) * _Sensitivity.y < 0.1; - // difference in depth - float sampleDepth = DecodeFloatRG (theSample.zw); - float zdiff = abs(centerDepth-sampleDepth); - // scale the required threshold by the distance - int isSameDepth = zdiff * _Sensitivity.x < 0.09 * centerDepth; - - // return: - // 1 - if normals and depth are similar enough - // 0 - otherwise - - return isSameNormal * isSameDepth ? 1.0 : 0.0; - } - - v2f vertRobert( appdata_img v ) - { - v2f o; - o.pos = UnityObjectToClipPos(v.vertex); - - float2 uv = v.texcoord.xy; - o.uv[0] = UnityStereoScreenSpaceUVAdjust(uv, _MainTex_ST); - - #if UNITY_UV_STARTS_AT_TOP - if (_MainTex_TexelSize.y < 0) - uv.y = 1-uv.y; - #endif - - // calc coord for the X pattern - // maybe nicer TODO for the future: 'rotated triangles' - - o.uv[1] = UnityStereoScreenSpaceUVAdjust(uv + _MainTex_TexelSize.xy * half2(1,1) * _SampleDistance, _MainTex_ST); - o.uv[2] = UnityStereoScreenSpaceUVAdjust(uv + _MainTex_TexelSize.xy * half2(-1,-1) * _SampleDistance, _MainTex_ST); - o.uv[3] = UnityStereoScreenSpaceUVAdjust(uv + _MainTex_TexelSize.xy * half2(-1,1) * _SampleDistance, _MainTex_ST); - o.uv[4] = UnityStereoScreenSpaceUVAdjust(uv + _MainTex_TexelSize.xy * half2(1,-1) * _SampleDistance, _MainTex_ST); - - return o; - } - - v2f vertThin( appdata_img v ) - { - v2f o; - o.pos = UnityObjectToClipPos (v.vertex); - - float2 uv = v.texcoord.xy; - o.uv[0] = UnityStereoScreenSpaceUVAdjust(uv, _MainTex_ST); - - #if UNITY_UV_STARTS_AT_TOP - if (_MainTex_TexelSize.y < 0) - uv.y = 1-uv.y; - #endif - - o.uv[1] = UnityStereoScreenSpaceUVAdjust(uv, _MainTex_ST); - o.uv[4] = UnityStereoScreenSpaceUVAdjust(uv, _MainTex_ST); - - // offsets for two additional samples - o.uv[2] = UnityStereoScreenSpaceUVAdjust(uv + float2(-_MainTex_TexelSize.x, -_MainTex_TexelSize.y) * _SampleDistance, _MainTex_ST); - o.uv[3] = UnityStereoScreenSpaceUVAdjust(uv + float2(+_MainTex_TexelSize.x, -_MainTex_TexelSize.y) * _SampleDistance, _MainTex_ST); - - return o; - } - - v2fd vertD( appdata_img v ) - { - v2fd o; - o.pos = UnityObjectToClipPos (v.vertex); - - float2 uv = v.texcoord.xy; - o.uv[0] = uv; - - #if UNITY_UV_STARTS_AT_TOP - if (_MainTex_TexelSize.y < 0) - uv.y = 1-uv.y; - #endif - - o.uv[1] = uv; - - return o; - } - - float4 fragDCheap(v2fd i) : SV_Target - { - // inspired by borderlands implementation of popular "sobel filter" - - float centerDepth = Linear01Depth(SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture, i.uv[1])); - float4 depthsDiag; - float4 depthsAxis; - - float2 uvDist = _SampleDistance * _MainTex_TexelSize.xy; - - depthsDiag.x = Linear01Depth(SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture, UnityStereoScreenSpaceUVAdjust(i.uv[1]+uvDist, _CameraDepthTexture_ST))); // TR - depthsDiag.y = Linear01Depth(SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture, UnityStereoScreenSpaceUVAdjust(i.uv[1]+uvDist*float2(-1,1), _CameraDepthTexture_ST))); // TL - depthsDiag.z = Linear01Depth(SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture, UnityStereoScreenSpaceUVAdjust(i.uv[1]-uvDist*float2(-1,1), _CameraDepthTexture_ST))); // BR - depthsDiag.w = Linear01Depth(SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture, UnityStereoScreenSpaceUVAdjust(i.uv[1]-uvDist, _CameraDepthTexture_ST))); // BL - - depthsAxis.x = Linear01Depth(SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture, UnityStereoScreenSpaceUVAdjust(i.uv[1]+uvDist*float2(0,1), _CameraDepthTexture_ST))); // T - depthsAxis.y = Linear01Depth(SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture, UnityStereoScreenSpaceUVAdjust(i.uv[1]-uvDist*float2(1,0), _CameraDepthTexture_ST))); // L - depthsAxis.z = Linear01Depth(SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture, UnityStereoScreenSpaceUVAdjust(i.uv[1]+uvDist*float2(1,0), _CameraDepthTexture_ST))); // R - depthsAxis.w = Linear01Depth(SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture, UnityStereoScreenSpaceUVAdjust(i.uv[1]-uvDist*float2(0,1), _CameraDepthTexture_ST))); // B - - depthsDiag -= centerDepth; - depthsAxis /= centerDepth; - - const float4 HorizDiagCoeff = float4(1,1,-1,-1); - const float4 VertDiagCoeff = float4(-1,1,-1,1); - const float4 HorizAxisCoeff = float4(1,0,0,-1); - const float4 VertAxisCoeff = float4(0,1,-1,0); - - float4 SobelH = depthsDiag * HorizDiagCoeff + depthsAxis * HorizAxisCoeff; - float4 SobelV = depthsDiag * VertDiagCoeff + depthsAxis * VertAxisCoeff; - - float SobelX = dot(SobelH, float4(1,1,1,1)); - float SobelY = dot(SobelV, float4(1,1,1,1)); - float Sobel = sqrt(SobelX * SobelX + SobelY * SobelY); - - Sobel = 1.0-pow(saturate(Sobel), _Exponent); - return Sobel * lerp(tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv[0].xy, _MainTex_ST)), _BgColor, _BgFade); - } - - // pretty much also just a sobel filter, except for that edges "outside" the silhouette get discarded - // which makes it compatible with other depth based post fx - - float4 fragD(v2fd i) : SV_Target - { - // inspired by borderlands implementation of popular "sobel filter" - - float centerDepth = Linear01Depth(SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture, UnityStereoScreenSpaceUVAdjust(i.uv[1], _CameraDepthTexture_ST))); - float4 depthsDiag; - float4 depthsAxis; - - float2 uvDist = _SampleDistance * _MainTex_TexelSize.xy; - - depthsDiag.x = Linear01Depth(SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture, UnityStereoScreenSpaceUVAdjust(i.uv[1]+uvDist, _CameraDepthTexture_ST))); // TR - depthsDiag.y = Linear01Depth(SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture, UnityStereoScreenSpaceUVAdjust(i.uv[1]+uvDist*float2(-1,1), _CameraDepthTexture_ST))); // TL - depthsDiag.z = Linear01Depth(SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture, UnityStereoScreenSpaceUVAdjust(i.uv[1]-uvDist*float2(-1,1), _CameraDepthTexture_ST))); // BR - depthsDiag.w = Linear01Depth(SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture, UnityStereoScreenSpaceUVAdjust(i.uv[1]-uvDist, _CameraDepthTexture_ST))); // BL - - depthsAxis.x = Linear01Depth(SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture, UnityStereoScreenSpaceUVAdjust(i.uv[1]+uvDist*float2(0,1), _CameraDepthTexture_ST))); // T - depthsAxis.y = Linear01Depth(SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture, UnityStereoScreenSpaceUVAdjust(i.uv[1]-uvDist*float2(1,0), _CameraDepthTexture_ST))); // L - depthsAxis.z = Linear01Depth(SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture, UnityStereoScreenSpaceUVAdjust(i.uv[1]+uvDist*float2(1,0), _CameraDepthTexture_ST))); // R - depthsAxis.w = Linear01Depth(SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture, UnityStereoScreenSpaceUVAdjust(i.uv[1]-uvDist*float2(0,1), _CameraDepthTexture_ST))); // B - - // make it work nicely with depth based image effects such as depth of field: - depthsDiag = (depthsDiag > centerDepth.xxxx) ? depthsDiag : centerDepth.xxxx; - depthsAxis = (depthsAxis > centerDepth.xxxx) ? depthsAxis : centerDepth.xxxx; - - depthsDiag -= centerDepth; - depthsAxis /= centerDepth; - - const float4 HorizDiagCoeff = float4(1,1,-1,-1); - const float4 VertDiagCoeff = float4(-1,1,-1,1); - const float4 HorizAxisCoeff = float4(1,0,0,-1); - const float4 VertAxisCoeff = float4(0,1,-1,0); - - float4 SobelH = depthsDiag * HorizDiagCoeff + depthsAxis * HorizAxisCoeff; - float4 SobelV = depthsDiag * VertDiagCoeff + depthsAxis * VertAxisCoeff; - - float SobelX = dot(SobelH, float4(1,1,1,1)); - float SobelY = dot(SobelV, float4(1,1,1,1)); - float Sobel = sqrt(SobelX * SobelX + SobelY * SobelY); - - Sobel = 1.0-pow(saturate(Sobel), _Exponent); - return Sobel * lerp(tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv[0].xy, _MainTex_ST)), _BgColor, _BgFade); - } - - half4 fragRobert(v2f i) : SV_Target { - half4 sample1 = tex2D(_CameraDepthNormalsTexture, i.uv[1].xy); - half4 sample2 = tex2D(_CameraDepthNormalsTexture, i.uv[2].xy); - half4 sample3 = tex2D(_CameraDepthNormalsTexture, i.uv[3].xy); - half4 sample4 = tex2D(_CameraDepthNormalsTexture, i.uv[4].xy); - - half edge = 1.0; - - edge *= CheckSame(sample1.xy, DecodeFloatRG(sample1.zw), sample2); - edge *= CheckSame(sample3.xy, DecodeFloatRG(sample3.zw), sample4); - - return edge * lerp(tex2D(_MainTex, i.uv[0]), _BgColor, _BgFade); - } - - half4 fragThin (v2f i) : SV_Target - { - half4 original = tex2D(_MainTex, i.uv[0]); - - half4 center = tex2D (_CameraDepthNormalsTexture, i.uv[1]); - half4 sample1 = tex2D (_CameraDepthNormalsTexture, i.uv[2]); - half4 sample2 = tex2D (_CameraDepthNormalsTexture, i.uv[3]); - - // encoded normal - half2 centerNormal = center.xy; - // decoded depth - float centerDepth = DecodeFloatRG (center.zw); - - half edge = 1.0; - - edge *= CheckSame(centerNormal, centerDepth, sample1); - edge *= CheckSame(centerNormal, centerDepth, sample2); - - return edge * lerp(original, _BgColor, _BgFade); - } - - ENDCG - -Subshader { - Pass { - ZTest Always Cull Off ZWrite Off - - CGPROGRAM - #pragma vertex vertThin - #pragma fragment fragThin - ENDCG - } - Pass { - ZTest Always Cull Off ZWrite Off - - CGPROGRAM - #pragma vertex vertRobert - #pragma fragment fragRobert - ENDCG - } - Pass { - ZTest Always Cull Off ZWrite Off - - CGPROGRAM - #pragma target 3.0 - #pragma vertex vertD - #pragma fragment fragDCheap - ENDCG - } - Pass { - ZTest Always Cull Off ZWrite Off - - CGPROGRAM - #pragma target 3.0 - #pragma vertex vertD - #pragma fragment fragD - ENDCG - } - Pass { - ZTest Always Cull Off ZWrite Off - - CGPROGRAM - #pragma target 3.0 - #pragma vertex vertLum - #pragma fragment fragLum - ENDCG - } -} - -Fallback off - -} // shader diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/EdgeDetectNormals.shader.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/EdgeDetectNormals.shader.meta deleted file mode 100644 index 328c9db..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/EdgeDetectNormals.shader.meta +++ /dev/null @@ -1,4 +0,0 @@ -fileFormatVersion: 2 -guid: 0d1644bdf064147baa97f235fc5b4903 -ShaderImporter: - userData: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/FisheyeShader.shader b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/FisheyeShader.shader deleted file mode 100644 index 0021042..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/FisheyeShader.shader +++ /dev/null @@ -1,61 +0,0 @@ -// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' - -Shader "Hidden/FisheyeShader" { - Properties { - _MainTex ("Base (RGB)", 2D) = "" {} - } - - // Shader code pasted into all further CGPROGRAM blocks - CGINCLUDE - - #include "UnityCG.cginc" - - struct v2f { - float4 pos : SV_POSITION; - float2 uv : TEXCOORD0; - }; - - sampler2D _MainTex; - half4 _MainTex_ST; - - float2 intensity; - - v2f vert( appdata_img v ) - { - v2f o; - o.pos = UnityObjectToClipPos(v.vertex); - o.uv = v.texcoord.xy; - return o; - } - - half4 frag(v2f i) : SV_Target - { - half2 coords = i.uv; - coords = (coords - 0.5) * 2.0; - - half2 realCoordOffs; - realCoordOffs.x = (1-coords.y * coords.y) * intensity.y * (coords.x); - realCoordOffs.y = (1-coords.x * coords.x) * intensity.x * (coords.y); - - half4 color = tex2D (_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv - realCoordOffs, _MainTex_ST)); - - return color; - } - - ENDCG - -Subshader { - Pass { - ZTest Always Cull Off ZWrite Off - - CGPROGRAM - #pragma vertex vert - #pragma fragment frag - ENDCG - } - -} - -Fallback off - -} // shader diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/FisheyeShader.shader.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/FisheyeShader.shader.meta deleted file mode 100644 index 8eb2318..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/FisheyeShader.shader.meta +++ /dev/null @@ -1,4 +0,0 @@ -fileFormatVersion: 2 -guid: 874ceab4425f64bccb1d14032f4452b1 -ShaderImporter: - userData: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/GlobalFog.shader b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/GlobalFog.shader deleted file mode 100644 index 397453d..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/GlobalFog.shader +++ /dev/null @@ -1,194 +0,0 @@ -// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' - -Shader "Hidden/GlobalFog" { -Properties { - _MainTex ("Base (RGB)", 2D) = "black" {} -} - -CGINCLUDE - - #include "UnityCG.cginc" - - uniform sampler2D _MainTex; - uniform sampler2D_float _CameraDepthTexture; - - // x = fog height - // y = FdotC (CameraY-FogHeight) - // z = k (FdotC > 0.0) - // w = a/2 - uniform float4 _HeightParams; - - // x = start distance - uniform float4 _DistanceParams; - - int4 _SceneFogMode; // x = fog mode, y = use radial flag - float4 _SceneFogParams; - #ifndef UNITY_APPLY_FOG - half4 unity_FogColor; - half4 unity_FogDensity; - #endif - - uniform float4 _MainTex_TexelSize; - - // for fast world space reconstruction - uniform float4x4 _FrustumCornersWS; - uniform float4 _CameraWS; - - struct appdata_fog - { - float4 vertex : POSITION; - half2 texcoord : TEXCOORD0; - }; - - struct v2f { - float4 pos : SV_POSITION; - float2 uv : TEXCOORD0; - float2 uv_depth : TEXCOORD1; - float4 interpolatedRay : TEXCOORD2; - }; - - v2f vert (appdata_fog v) - { - v2f o; - v.vertex.z = 0.1; - o.pos = UnityObjectToClipPos(v.vertex); - o.uv = v.texcoord.xy; - o.uv_depth = v.texcoord.xy; - - #if UNITY_UV_STARTS_AT_TOP - if (_MainTex_TexelSize.y < 0) - o.uv.y = 1-o.uv.y; - #endif - - int frustumIndex = v.texcoord.x + (2 * o.uv.y); - o.interpolatedRay = _FrustumCornersWS[frustumIndex]; - o.interpolatedRay.w = frustumIndex; - - return o; - } - - // Applies one of standard fog formulas, given fog coordinate (i.e. distance) - half ComputeFogFactor (float coord) - { - float fogFac = 0.0; - if (_SceneFogMode.x == 1) // linear - { - // factor = (end-z)/(end-start) = z * (-1/(end-start)) + (end/(end-start)) - fogFac = coord * _SceneFogParams.z + _SceneFogParams.w; - } - if (_SceneFogMode.x == 2) // exp - { - // factor = exp(-density*z) - fogFac = _SceneFogParams.y * coord; fogFac = exp2(-fogFac); - } - if (_SceneFogMode.x == 3) // exp2 - { - // factor = exp(-(density*z)^2) - fogFac = _SceneFogParams.x * coord; fogFac = exp2(-fogFac*fogFac); - } - return saturate(fogFac); - } - - // Distance-based fog - float ComputeDistance (float3 camDir, float zdepth) - { - float dist; - if (_SceneFogMode.y == 1) - dist = length(camDir); - else - dist = zdepth * _ProjectionParams.z; - // Built-in fog starts at near plane, so match that by - // subtracting the near value. Not a perfect approximation - // if near plane is very large, but good enough. - dist -= _ProjectionParams.y; - return dist; - } - - // Linear half-space fog, from https://www.terathon.com/lengyel/Lengyel-UnifiedFog.pdf - float ComputeHalfSpace (float3 wsDir) - { - float3 wpos = _CameraWS + wsDir; - float FH = _HeightParams.x; - float3 C = _CameraWS; - float3 V = wsDir; - float3 P = wpos; - float3 aV = _HeightParams.w * V; - float FdotC = _HeightParams.y; - float k = _HeightParams.z; - float FdotP = P.y-FH; - float FdotV = wsDir.y; - float c1 = k * (FdotP + FdotC); - float c2 = (1-2*k) * FdotP; - float g = min(c2, 0.0); - g = -length(aV) * (c1 - g * g / abs(FdotV+1.0e-5f)); - return g; - } - - half4 ComputeFog (v2f i, bool distance, bool height) : SV_Target - { - half4 sceneColor = tex2D(_MainTex, UnityStereoTransformScreenSpaceTex(i.uv)); - - // Reconstruct world space position & direction - // towards this screen pixel. - float rawDepth = SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture, UnityStereoTransformScreenSpaceTex(i.uv_depth)); - float dpth = Linear01Depth(rawDepth); - float4 wsDir = dpth * i.interpolatedRay; - float4 wsPos = _CameraWS + wsDir; - - // Compute fog distance - float g = _DistanceParams.x; - if (distance) - g += ComputeDistance (wsDir, dpth); - if (height) - g += ComputeHalfSpace (wsDir); - - // Compute fog amount - half fogFac = ComputeFogFactor (max(0.0,g)); - // Do not fog skybox - if (dpth == _DistanceParams.y) - fogFac = 1.0; - //return fogFac; // for debugging - - // Lerp between fog color & original scene color - // by fog amount - return lerp (unity_FogColor, sceneColor, fogFac); - } - -ENDCG - -SubShader -{ - ZTest Always Cull Off ZWrite Off Fog { Mode Off } - - // 0: distance + height - Pass - { - CGPROGRAM - #pragma vertex vert - #pragma fragment frag - half4 frag (v2f i) : SV_Target { return ComputeFog (i, true, true); } - ENDCG - } - // 1: distance - Pass - { - CGPROGRAM - #pragma vertex vert - #pragma fragment frag - half4 frag (v2f i) : SV_Target { return ComputeFog (i, true, false); } - ENDCG - } - // 2: height - Pass - { - CGPROGRAM - #pragma vertex vert - #pragma fragment frag - half4 frag (v2f i) : SV_Target { return ComputeFog (i, false, true); } - ENDCG - } -} - -Fallback off - -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/GlobalFog.shader.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/GlobalFog.shader.meta deleted file mode 100644 index bcb93d2..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/GlobalFog.shader.meta +++ /dev/null @@ -1,4 +0,0 @@ -fileFormatVersion: 2 -guid: 70d8568987ac0499f952b54c7c13e265 -ShaderImporter: - userData: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/GrayscaleEffect.shader b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/GrayscaleEffect.shader deleted file mode 100644 index ca45941..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/GrayscaleEffect.shader +++ /dev/null @@ -1,37 +0,0 @@ -Shader "Hidden/Grayscale Effect" { -Properties { - _MainTex ("Base (RGB)", 2D) = "white" {} - _RampTex ("Base (RGB)", 2D) = "grayscaleRamp" {} -} - -SubShader { - Pass { - ZTest Always Cull Off ZWrite Off - -CGPROGRAM -#pragma vertex vert_img -#pragma fragment frag -#include "UnityCG.cginc" - -uniform sampler2D _MainTex; -uniform sampler2D _RampTex; -uniform half _RampOffset; -half4 _MainTex_ST; - -fixed4 frag (v2f_img i) : SV_Target -{ - fixed4 original = tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv, _MainTex_ST)); - fixed grayscale = Luminance(original.rgb); - half2 remap = half2 (grayscale + _RampOffset, .5); - fixed4 output = tex2D(_RampTex, remap); - output.a = original.a; - return output; -} -ENDCG - - } -} - -Fallback off - -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/GrayscaleEffect.shader.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/GrayscaleEffect.shader.meta deleted file mode 100644 index 5fbca77..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/GrayscaleEffect.shader.meta +++ /dev/null @@ -1,4 +0,0 @@ -fileFormatVersion: 2 -guid: daf9781cad112c75d0008dfa8d76c639 -ShaderImporter: - userData: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/MotionBlur.shader b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/MotionBlur.shader deleted file mode 100644 index 2242495..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/MotionBlur.shader +++ /dev/null @@ -1,122 +0,0 @@ -// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' - -Shader "Hidden/MotionBlur" { -Properties { - _MainTex ("Base (RGB)", 2D) = "white" {} - _AccumOrig("AccumOrig", Float) = 0.65 -} - - SubShader { - ZTest Always Cull Off ZWrite Off - Pass { - Blend SrcAlpha OneMinusSrcAlpha - ColorMask RGB - BindChannels { - Bind "vertex", vertex - Bind "texcoord", texcoord - } - - CGPROGRAM - #pragma vertex vert - #pragma fragment frag - - #include "UnityCG.cginc" - - struct appdata_t { - float4 vertex : POSITION; - float2 texcoord : TEXCOORD; - }; - - struct v2f { - float4 vertex : SV_POSITION; - float2 texcoord : TEXCOORD; - }; - - float4 _MainTex_ST; - float _AccumOrig; - - v2f vert (appdata_t v) - { - v2f o; - o.vertex = UnityObjectToClipPos(v.vertex); - o.texcoord = TRANSFORM_TEX(v.texcoord, _MainTex); - return o; - } - - sampler2D _MainTex; - - half4 frag (v2f i) : SV_Target - { - return half4(tex2D(_MainTex, i.texcoord).rgb, _AccumOrig ); - } - ENDCG - } - - Pass { - Blend One Zero - ColorMask A - - BindChannels { - Bind "vertex", vertex - Bind "texcoord", texcoord - } - - CGPROGRAM - #pragma vertex vert - #pragma fragment frag - - #include "UnityCG.cginc" - - struct appdata_t { - float4 vertex : POSITION; - float2 texcoord : TEXCOORD; - }; - - struct v2f { - float4 vertex : SV_POSITION; - float2 texcoord : TEXCOORD; - }; - - float4 _MainTex_ST; - - v2f vert (appdata_t v) - { - v2f o; - o.vertex = UnityObjectToClipPos(v.vertex); - o.texcoord = TRANSFORM_TEX(v.texcoord, _MainTex); - return o; - } - - sampler2D _MainTex; - - half4 frag (v2f i) : SV_Target - { - return tex2D(_MainTex, i.texcoord); - } - ENDCG - } - - } - -SubShader { - ZTest Always Cull Off ZWrite Off - Pass { - Blend SrcAlpha OneMinusSrcAlpha - ColorMask RGB - SetTexture [_MainTex] { - ConstantColor (0,0,0,[_AccumOrig]) - Combine texture, constant - } - } - Pass { - Blend One Zero - ColorMask A - SetTexture [_MainTex] { - Combine texture - } - } -} - -Fallback off - -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/MotionBlur.shader.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/MotionBlur.shader.meta deleted file mode 100644 index 281af89..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/MotionBlur.shader.meta +++ /dev/null @@ -1,4 +0,0 @@ -fileFormatVersion: 2 -guid: e9ba2083ad114a07d000fbfb8d76c639 -ShaderImporter: - userData: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/MotionBlurClear.shader b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/MotionBlurClear.shader deleted file mode 100644 index 24dea58..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/MotionBlurClear.shader +++ /dev/null @@ -1,60 +0,0 @@ -// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' - - -Shader "Hidden/MotionBlurClear" -{ - -Properties { } - -SubShader { -Pass { - //ZTest LEqual - ZTest Always // lame depth test - ZWrite Off // lame depth test - - CGPROGRAM - - #pragma vertex vert - #pragma fragment frag - - #include "UnityCG.cginc" - - struct vs_input { - float4 vertex : POSITION; - }; - - struct ps_input { - float4 pos : SV_POSITION; - float4 screen : TEXCOORD0; - }; - - sampler2D_float _CameraDepthTexture; - - ps_input vert (vs_input v) - { - ps_input o; - o.pos = UnityObjectToClipPos (v.vertex); - o.screen = ComputeScreenPos(o.pos); - COMPUTE_EYEDEPTH(o.screen.z); - return o; - } - - float4 frag (ps_input i) : SV_Target - { - // superlame: manual depth test needed as we can't bind depth, FIXME for 4.x - // alternatively implement SM > 3 version where we write out custom depth - - float d = SAMPLE_DEPTH_TEXTURE_PROJ(_CameraDepthTexture, UNITY_PROJ_COORD(i.screen)); - d = LinearEyeDepth(d); - - clip(d - i.screen.z + 1e-2f); - return float4(0, 0, 0, 0); - } - - ENDCG - - } -} - -Fallback Off -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/MotionBlurClear.shader.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/MotionBlurClear.shader.meta deleted file mode 100644 index 3e9e48f..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/MotionBlurClear.shader.meta +++ /dev/null @@ -1,4 +0,0 @@ -fileFormatVersion: 2 -guid: 7699c5fbfa27745a1abe111ab7bf9785 -ShaderImporter: - userData: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/NoiseAndGrain.shader b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/NoiseAndGrain.shader deleted file mode 100644 index 9afe47a..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/NoiseAndGrain.shader +++ /dev/null @@ -1,160 +0,0 @@ -// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' - -Shader "Hidden/NoiseAndGrain" { - Properties { - _MainTex ("Base (RGB)", 2D) = "white" {} - _NoiseTex ("Noise (RGB)", 2D) = "white" {} - } - - CGINCLUDE - - #include "UnityCG.cginc" - - sampler2D _MainTex; - sampler2D _NoiseTex; - float4 _NoiseTex_TexelSize; - - uniform float4 _MainTex_TexelSize; - - uniform float3 _NoisePerChannel; - uniform float3 _NoiseTilingPerChannel; - uniform float3 _NoiseAmount; - uniform float3 _ThreshholdRGB; - uniform float3 _MidGrey; - - struct v2f - { - float4 pos : SV_POSITION; - float2 uv_screen : TEXCOORD0; - float4 uvRg : TEXCOORD1; - float2 uvB : TEXCOORD2; - }; - - struct appdata_img2 - { - float4 vertex : POSITION; - float2 texcoord : TEXCOORD0; - float2 texcoord1 : TEXCOORD1; - }; - - inline float3 Overlay(float3 m, float3 color) { - color = saturate(color); - float3 check = step(float3(0.5,0.5,0.5), color.rgb); - float3 result = check * (float3(1,1,1) - ((float3(1,1,1) - 2*(color.rgb-0.5)) * (1-m.rgb))); - result += (1-check) * (2*color.rgb) * m.rgb; - return result; - } - - v2f vert (appdata_img2 v) - { - v2f o; - - o.pos = UnityObjectToClipPos (v.vertex); - - #if UNITY_UV_STARTS_AT_TOP - o.uv_screen = v.vertex.xyxy; - if (_MainTex_TexelSize.y < 0) - o.uv_screen.y = 1-o.uv_screen.y; - #else - o.uv_screen = v.vertex.xy; - #endif - - o.uv_screen = UnityStereoTransformScreenSpaceTex(o.uv_screen); - - // different tiling for 3 channels - o.uvRg = v.texcoord.xyxy + v.texcoord1.xyxy * _NoiseTilingPerChannel.rrgg * _NoiseTex_TexelSize.xyxy; - o.uvB = v.texcoord.xy + v.texcoord1.xy * _NoiseTilingPerChannel.bb * _NoiseTex_TexelSize.xy; - - return o; - } - - float4 frag ( v2f i ) : SV_Target - { - float4 color = (tex2D (_MainTex, i.uv_screen.xy)); - - // black & white intensities - float2 blackWhiteCurve = Luminance(color.rgb) - _MidGrey.x; // maybe tweak middle grey - blackWhiteCurve.xy = saturate(blackWhiteCurve.xy * _MidGrey.yz); //float2(1.0/0.8, -1.0/0.2)); - - float finalIntensity = _NoiseAmount.x + max(0.0f, dot(_NoiseAmount.zy, blackWhiteCurve.xy)); - - // fetching & scaling noise (COMPILER BUG WORKAROUND) - float3 m = float3(0,0,0); - m += (tex2D(_NoiseTex, i.uvRg.xy) * float4(1,0,0,0)).rgb; - m += (tex2D(_NoiseTex, i.uvRg.zw) * float4(0,1,0,0)).rgb; - m += (tex2D(_NoiseTex, i.uvB.xy) * float4(0,0,1,0)).rgb; - - m = saturate(lerp(float3(0.5,0.5,0.5), m, _NoisePerChannel.rgb * float3(finalIntensity,finalIntensity,finalIntensity) )); - - return float4(Overlay(m, color.rgb), color.a); - } - - float4 fragTmp ( v2f i ) : SV_Target - { - float4 color = (tex2D (_MainTex, i.uv_screen.xy)); - - // black & white intensities - float2 blackWhiteCurve = Luminance(color.rgb) - _MidGrey.x; // maybe tweak middle grey - blackWhiteCurve.xy = saturate(blackWhiteCurve.xy * _MidGrey.yz); //float2(1.0/0.8, -1.0/0.2)); - - float finalIntensity = _NoiseAmount.x + max(0.0f, dot(_NoiseAmount.zy, blackWhiteCurve.xy)); - - // fetching & scaling noise (COMPILER BUG WORKAROUND) - float3 m = float3(0,0,0); - m += (tex2D(_NoiseTex, i.uvRg.xy) * float4(1,0,0,0)).rgb; - m += (tex2D(_NoiseTex, i.uvRg.zw) * float4(0,1,0,0)).rgb; - m += (tex2D(_NoiseTex, i.uvB.xy) * float4(0,0,1,0)).rgb; - - m = saturate(lerp(float3(0.5,0.5,0.5), m, _NoisePerChannel.rgb * float3(finalIntensity,finalIntensity,finalIntensity))); - - return float4(m.rgb, color.a); - } - - float4 fragOverlayBlend ( v2f i ) : SV_Target - { - float4 color = tex2D(_MainTex, i.uv_screen.xy); - float4 m = tex2D(_NoiseTex, i.uv_screen.xy); - - return float4(Overlay(m, color.rgb), color.a); - } - - ENDCG - - SubShader { - ZTest Always Cull Off ZWrite Off Blend Off - - Pass { - - CGPROGRAM - - #pragma vertex vert - #pragma fragment frag - - ENDCG - - } - - Pass { - - CGPROGRAM - - #pragma vertex vert - #pragma fragment fragOverlayBlend - - ENDCG - - } - - Pass { - - CGPROGRAM - - #pragma vertex vert - #pragma fragment fragTmp - - ENDCG - - } - } - FallBack Off -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/NoiseAndGrain.shader.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/NoiseAndGrain.shader.meta deleted file mode 100644 index 4f9286a..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/NoiseAndGrain.shader.meta +++ /dev/null @@ -1,4 +0,0 @@ -fileFormatVersion: 2 -guid: b0249d8c935344451aa4de6db76f0688 -ShaderImporter: - userData: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/NoiseAndGrainDX11.shader b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/NoiseAndGrainDX11.shader deleted file mode 100644 index 04d277f..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/NoiseAndGrainDX11.shader +++ /dev/null @@ -1,239 +0,0 @@ -// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' - -Shader "Hidden/NoiseAndGrainDX11" { - Properties { - _MainTex ("Base (RGB)", 2D) = "white" {} - _NoiseTex ("Noise (RGB)", 2D) = "white" {} - } - - CGINCLUDE - - #include "UnityCG.cginc" - - sampler2D _MainTex; - sampler2D _NoiseTex; - float4 _NoiseTex_TexelSize; - - uniform float4 _MainTex_TexelSize; - - uniform float3 _NoisePerChannel; - uniform float3 _NoiseTilingPerChannel; - uniform float3 _NoiseAmount; - uniform float3 _ThreshholdRGB; - uniform float3 _MidGrey; - uniform float _DX11NoiseTime; - - // DX11 noise helper functions, credit: rgba/iq - - int ihash(int n) - { - n = (n<<13)^n; - return (n*(n*n*15731+789221)+1376312589) & 2147483647; - } - - float frand(int n) - { - return ihash(n) / 2147483647.0; - } - - float cellNoise1f(int3 p) - { - return frand(p.z*65536 + p.y*256 + p.x);//*2.0-1.0; - } - - float3 cellNoise3f(int3 p) - { - int i = p.z*65536 + p.y*256 + p.x; - return float3(frand(i), frand(i + 57), frand(i + 113));//*2.0-1.0; - } - - struct v2f - { - float4 pos : SV_POSITION; - float2 uv_screen : TEXCOORD0; - float4 uvRg : TEXCOORD1; - float2 uvB : TEXCOORD2; - float2 uvOffsets : TEXCOORD4; - }; - - struct appdata_img2 - { - float4 vertex : POSITION; - float2 texcoord : TEXCOORD0; - float2 texcoord1 : TEXCOORD1; - }; - - inline float3 Overlay(float3 m, float3 color) { - float3 check = step(0.5, color.rgb); - float3 result = check * (float3(1,1,1) - ((float3(1,1,1) - 2*(color.rgb-0.5)) * (1-m.rgb))); - result += (1-check) * (2*color.rgb) * m.rgb; - return result; - } - - v2f vert (appdata_img2 v) - { - v2f o; - - o.pos = UnityObjectToClipPos (v.vertex); - - #if UNITY_UV_STARTS_AT_TOP - o.uv_screen = v.vertex.xyxy; - if (_MainTex_TexelSize.y < 0) - o.uv_screen.y = 1-o.uv_screen.y; - #else - o.uv_screen = v.vertex.xy; - #endif - - // different tiling for 3 channels - o.uvRg = v.texcoord.xyxy + v.texcoord1.xyxy * _NoiseTilingPerChannel.rrgg * _NoiseTex_TexelSize.xyxy; - o.uvB = v.texcoord.xy + v.texcoord1.xy * _NoiseTilingPerChannel.bb * _NoiseTex_TexelSize.xy; - - o.uvOffsets = v.texcoord.xy; - - return o; - } - - float4 fragDX11 ( v2f i ) : SV_Target - { - float4 color = saturate(tex2D (_MainTex, UnityStereoTransformScreenSpaceTex(i.uv_screen.xy))); - - // black & white intensities - float2 blackWhiteCurve = Luminance(color.rgb) - _MidGrey.x; // maybe tweak middle grey - blackWhiteCurve.xy = saturate(blackWhiteCurve.xy * _MidGrey.yz); //float2(1.0/0.8, -1.0/0.2)); - - float finalIntensity = _NoiseAmount.x + max(0.0f, dot(_NoiseAmount.zy, blackWhiteCurve.xy)); - - float3 m = cellNoise3f(float3( (i.uv_screen.xy + i.uvOffsets) * _MainTex_TexelSize.zw, _DX11NoiseTime)); - m = saturate(lerp(float3(0.5,0.5,0.5), m, _NoisePerChannel.rgb * finalIntensity)); - - return float4(Overlay(m, color.rgb), color.a); - } - - float4 fragDX11Monochrome ( v2f i ) : SV_Target - { - float4 color = saturate(tex2D (_MainTex, UnityStereoTransformScreenSpaceTex(i.uv_screen.xy))); - - // black & white intensities - float2 blackWhiteCurve = Luminance(color.rgb) - _MidGrey.x; // maybe tweak middle grey - blackWhiteCurve.xy = saturate(blackWhiteCurve.xy * _MidGrey.yz); //float2(1.0/0.8, -1.0/0.2)); - - float finalIntensity = _NoiseAmount.x + max(0.0f, dot(_NoiseAmount.zy, blackWhiteCurve.xy)); - - float3 m = cellNoise1f(float3( (i.uv_screen.xy + i.uvOffsets) * _MainTex_TexelSize.zw, _DX11NoiseTime)); - m = saturate(lerp(float3(0.5,0.5,0.5), m, finalIntensity)); - - return float4(Overlay(m, color.rgb), color.a); - } - - float4 fragDX11Tmp ( v2f i ) : SV_Target - { - float4 color = saturate(tex2D (_MainTex, UnityStereoTransformScreenSpaceTex(i.uv_screen.xy))); - - // black & white intensities - float2 blackWhiteCurve = Luminance(color.rgb) - _MidGrey.x; // maybe tweak middle grey - blackWhiteCurve.xy = saturate(blackWhiteCurve.xy * _MidGrey.yz); //float2(1.0/0.8, -1.0/0.2)); - - float finalIntensity = _NoiseAmount.x + max(0.0f, dot(_NoiseAmount.zy, blackWhiteCurve.xy)); - - float3 m = cellNoise3f(float3( (i.uv_screen.xy + i.uvOffsets) * _MainTex_TexelSize.zw, _DX11NoiseTime)); - m = saturate(lerp(float3(0.5,0.5,0.5), m, _NoisePerChannel.rgb * finalIntensity)); - - return float4(m.rgb, color.a); - } - - float4 fragDX11MonochromeTmp ( v2f i ) : SV_Target - { - float4 color = saturate(tex2D (_MainTex, UnityStereoTransformScreenSpaceTex(i.uv_screen.xy))); - - // black & white intensities - float2 blackWhiteCurve = Luminance(color.rgb) - _MidGrey.x; // maybe tweak middle grey - blackWhiteCurve.xy = saturate(blackWhiteCurve.xy * _MidGrey.yz); //float2(1.0/0.8, -1.0/0.2)); - - float finalIntensity = _NoiseAmount.x + max(0.0f, dot(_NoiseAmount.zy, blackWhiteCurve.xy)); - - float3 m = cellNoise1f(float3( (i.uv_screen.xy + i.uvOffsets) * _MainTex_TexelSize.zw, _DX11NoiseTime)); - m = saturate(lerp(float3(0.5,0.5,0.5), m, finalIntensity)); - - return float4(m.rgb, color.a); - } - - float4 fragOverlayBlend ( v2f i ) : SV_Target - { - float4 color = saturate(tex2D (_MainTex, UnityStereoTransformScreenSpaceTex(i.uv_screen.xy))); - float4 m = saturate(tex2D (_NoiseTex, i.uv_screen.xy)); - - return float4(Overlay(m, color.rgb), color.a); - } - - ENDCG - - SubShader { - ZTest Always Cull Off ZWrite Off Blend Off - - Pass { - - CGPROGRAM - - #pragma exclude_renderers gles xbox360 ps3 d3d9 - #pragma target 5.0 - #pragma vertex vert - #pragma fragment fragDX11 - - ENDCG - - } - - Pass { - - CGPROGRAM - - #pragma exclude_renderers gles xbox360 ps3 d3d9 - #pragma target 5.0 - #pragma vertex vert - #pragma fragment fragDX11Monochrome - - ENDCG - - } - - Pass { - - CGPROGRAM - - #pragma exclude_renderers gles xbox360 ps3 d3d9 - #pragma target 5.0 - #pragma vertex vert - #pragma fragment fragDX11Tmp - - ENDCG - - } - - Pass { - - CGPROGRAM - - #pragma exclude_renderers gles xbox360 ps3 d3d9 - #pragma target 5.0 - #pragma vertex vert - #pragma fragment fragDX11MonochromeTmp - - ENDCG - - } - - Pass { - - CGPROGRAM - - #pragma exclude_renderers gles xbox360 ps3 d3d9 - #pragma target 5.0 - #pragma vertex vert - #pragma fragment fragOverlayBlend - - ENDCG - - } - } - FallBack Off -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/NoiseAndGrainDX11.shader.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/NoiseAndGrainDX11.shader.meta deleted file mode 100644 index 829e8e3..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/NoiseAndGrainDX11.shader.meta +++ /dev/null @@ -1,4 +0,0 @@ -fileFormatVersion: 2 -guid: 8b30686bb4322ab42ad5eb50a0210b58 -ShaderImporter: - userData: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/NoiseEffectShaderRGB.shader b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/NoiseEffectShaderRGB.shader deleted file mode 100644 index ca35d64..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/NoiseEffectShaderRGB.shader +++ /dev/null @@ -1,66 +0,0 @@ -// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' - -Shader "Hidden/Noise Shader RGB" { -Properties { - _MainTex ("Base (RGB)", 2D) = "white" {} - _GrainTex ("Base (RGB)", 2D) = "gray" {} - _ScratchTex ("Base (RGB)", 2D) = "gray" {} -} - -SubShader { - Pass { - ZTest Always Cull Off ZWrite Off - -CGPROGRAM -#pragma vertex vert -#pragma fragment frag -#include "UnityCG.cginc" - -struct v2f { - float4 pos : SV_POSITION; - float2 uv : TEXCOORD0; - float2 uvg : TEXCOORD1; // grain - float2 uvs : TEXCOORD2; // scratch -}; - -uniform sampler2D _MainTex; -uniform sampler2D _GrainTex; -uniform sampler2D _ScratchTex; - -uniform float4 _GrainOffsetScale; -uniform float4 _ScratchOffsetScale; -uniform fixed4 _Intensity; // x=grain, y=scratch - -half4 _MainTex_ST; - -v2f vert (appdata_img v) -{ - v2f o; - o.pos = UnityObjectToClipPos (v.vertex); - o.uv = UnityStereoScreenSpaceUVAdjust(MultiplyUV (UNITY_MATRIX_TEXTURE0, v.texcoord), _MainTex_ST); - o.uvg = v.texcoord.xy * _GrainOffsetScale.zw + _GrainOffsetScale.xy; - o.uvs = v.texcoord.xy * _ScratchOffsetScale.zw + _ScratchOffsetScale.xy; - return o; -} - -fixed4 frag (v2f i) : SV_Target -{ - fixed4 col = tex2D(_MainTex, i.uv); - - // sample noise texture and do a signed add - fixed3 grain = tex2D(_GrainTex, i.uvg).rgb * 2 - 1; - col.rgb += grain * _Intensity.x; - - // sample scratch texture and do a signed add - fixed3 scratch = tex2D(_ScratchTex, i.uvs).rgb * 2 - 1; - col.rgb += scratch * _Intensity.y; - - return col; -} -ENDCG - } -} - -Fallback off - -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/NoiseEffectShaderRGB.shader.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/NoiseEffectShaderRGB.shader.meta deleted file mode 100644 index e11fb85..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/NoiseEffectShaderRGB.shader.meta +++ /dev/null @@ -1,4 +0,0 @@ -fileFormatVersion: 2 -guid: 5d7f4c401ae8946bcb0d6ff68a9e7466 -ShaderImporter: - userData: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/NoiseEffectShaderYUV.shader b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/NoiseEffectShaderYUV.shader deleted file mode 100644 index 200f97a..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/NoiseEffectShaderYUV.shader +++ /dev/null @@ -1,77 +0,0 @@ -// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' - -Shader "Hidden/Noise Shader YUV" { -Properties { - _MainTex ("Base (RGB)", 2D) = "white" {} - _GrainTex ("Base (RGB)", 2D) = "gray" {} - _ScratchTex ("Base (RGB)", 2D) = "gray" {} -} - -SubShader { - Pass { - ZTest Always Cull Off ZWrite Off - -CGPROGRAM -#pragma vertex vert -#pragma fragment frag -#include "UnityCG.cginc" - -struct v2f { - float4 pos : SV_POSITION; - float2 uv : TEXCOORD0; - float2 uvg : TEXCOORD1; // grain - float2 uvs : TEXCOORD2; // scratch -}; - -uniform sampler2D _MainTex; -uniform sampler2D _GrainTex; -uniform sampler2D _ScratchTex; - -uniform float4 _GrainOffsetScale; -uniform float4 _ScratchOffsetScale; -uniform fixed4 _Intensity; // x=grain, y=scratch - -half4 _MainTex_ST; - -v2f vert (appdata_img v) -{ - v2f o; - o.pos = UnityObjectToClipPos (v.vertex); - o.uv = UnityStereoScreenSpaceUVAdjust(MultiplyUV (UNITY_MATRIX_TEXTURE0, v.texcoord), _MainTex_ST); - o.uvg = v.texcoord.xy * _GrainOffsetScale.zw + _GrainOffsetScale.xy; - o.uvs = v.texcoord.xy * _ScratchOffsetScale.zw + _ScratchOffsetScale.xy; - return o; -} - -fixed4 frag (v2f i) : SV_Target -{ - fixed4 col = tex2D(_MainTex, i.uv); - - // convert to YUV - fixed3 yuv; - yuv.x = dot( col.rgb, half3(0.299,0.587,0.114) ); - yuv.y = (col.b-yuv.x)*0.492; - yuv.z = (col.r-yuv.x)*0.877; - - // sample noise texture and do a signed add - fixed3 grain = tex2D(_GrainTex, i.uvg).rgb * 2 - 1; - yuv.rgb += grain * _Intensity.x; - - // convert back to rgb - col.r = yuv.z * 1.140 + yuv.x; - col.g = yuv.z * (-0.581) + yuv.y * (-0.395) + yuv.x; - col.b = yuv.y * 2.032 + yuv.x; - - // sample scratch texture and add - fixed3 scratch = tex2D(_ScratchTex, i.uvs).rgb * 2 - 1; - col.rgb += scratch * _Intensity.y; - - return col; -} -ENDCG - } -} - -Fallback off - -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/NoiseEffectShaderYUV.shader.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/NoiseEffectShaderYUV.shader.meta deleted file mode 100644 index b817ce9..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/NoiseEffectShaderYUV.shader.meta +++ /dev/null @@ -1,4 +0,0 @@ -fileFormatVersion: 2 -guid: 0e447868506ba49f0a73235b8a8b647a -ShaderImporter: - userData: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/PrepareSunShaftsBlur.shader b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/PrepareSunShaftsBlur.shader deleted file mode 100644 index 5c8891a..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/PrepareSunShaftsBlur.shader +++ /dev/null @@ -1,99 +0,0 @@ -// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' - - -Shader "Hidden/PrepareSunShaftsBlur" { - Properties { - _MainTex ("Base", 2D) = "" {} - _Skybox ("Skybox", 2D) = "" {} - } - - CGINCLUDE - - #include "UnityCG.cginc" - - struct v2f { - float4 pos : SV_POSITION; - float2 uv : TEXCOORD0; - }; - - sampler2D _MainTex; - sampler2D _Skybox; - sampler2D_float _CameraDepthTexture; - - uniform half _NoSkyBoxMask; - uniform half4 _SunPosition; - - v2f vert (appdata_img v) { - v2f o; - o.pos = UnityObjectToClipPos(v.vertex); - o.uv = v.texcoord.xy; - return o; - } - - half TransformColor (half4 skyboxValue) { - return max (skyboxValue.a, _NoSkyBoxMask * dot (skyboxValue.rgb, float3 (0.59,0.3,0.11))); - } - - half4 frag (v2f i) : SV_Target { - float depthSample = SAMPLE_DEPTH_TEXTURE( _CameraDepthTexture, i.uv.xy); - half4 tex = tex2D (_MainTex, i.uv.xy); - - depthSample = Linear01Depth (depthSample); - - // consider maximum radius - half2 vec = _SunPosition.xy - i.uv.xy; - half dist = saturate (_SunPosition.w - length (vec.xy)); - - half4 outColor = 0; - - // consider shafts blockers - if (depthSample > 0.99) - outColor = TransformColor (tex) * dist; - - return outColor; - } - - half4 fragNoDepthNeeded (v2f i) : SV_Target { - float4 sky = (tex2D (_Skybox, i.uv.xy)); - float4 tex = (tex2D (_MainTex, i.uv.xy)); - - // consider maximum radius - half2 vec = _SunPosition.xy - i.uv.xy; - half dist = saturate (_SunPosition.w - length (vec)); - - half4 outColor = 0; - - if (Luminance ( abs(sky.rgb - tex.rgb)) < 0.2) - outColor = TransformColor (sky) * dist; - - return outColor; - } - - ENDCG - -Subshader { - Pass { - ZTest Always Cull Off ZWrite Off - - CGPROGRAM - - #pragma vertex vert - #pragma fragment frag - - ENDCG - } - Pass { - ZTest Always Cull Off ZWrite Off - - CGPROGRAM - - #pragma vertex vert - #pragma fragment fragNoDepthNeeded - - ENDCG - } -} - -Fallback off - -} // shader diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/PrepareSunShaftsBlur.shader.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/PrepareSunShaftsBlur.shader.meta deleted file mode 100644 index e32df02..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/PrepareSunShaftsBlur.shader.meta +++ /dev/null @@ -1,4 +0,0 @@ -fileFormatVersion: 2 -guid: 9ad381ed8492840ab9f165df743e4826 -ShaderImporter: - userData: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/RadialBlur.shader b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/RadialBlur.shader deleted file mode 100644 index 5e0025c..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/RadialBlur.shader +++ /dev/null @@ -1,73 +0,0 @@ -// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' - -Shader "Hidden/RadialBlur" -{ - Properties { - _MainTex ("Base (RGB)", 2D) = "" {} - } - - // Shader code pasted into all further CGPROGRAM blocks - CGINCLUDE - - #include "UnityCG.cginc" - - struct v2f { - float4 pos : SV_POSITION; - float2 uv : TEXCOORD0; - float2 blurVector : TEXCOORD1; - }; - - sampler2D _MainTex; - - float4 _BlurRadius4; - float4 _SunPosition; - - float4 _MainTex_TexelSize; - - v2f vert( appdata_img v ) { - v2f o; - o.pos = UnityObjectToClipPos(v.vertex); - o.uv.xy = v.texcoord.xy; - - o.blurVector = (_SunPosition.xy - v.texcoord.xy) * _BlurRadius4.xy; - - return o; - } - - #define SAMPLES_FLOAT 6.0f - #define SAMPLES_INT 6 - - half4 frag(v2f i) : SV_Target - { - half4 color = half4(0,0,0,0); - - for(int j = 0; j < SAMPLES_INT; j++) - { - half4 tmpColor = tex2D(_MainTex, i.uv.xy); - color += tmpColor; - - i.uv.xy += i.blurVector; - } - - return color / SAMPLES_FLOAT; - } - - ENDCG - -Subshader -{ - Blend One Zero - Pass { - ZTest Always Cull Off ZWrite Off - - CGPROGRAM - #pragma vertex vert - #pragma fragment frag - - ENDCG - } // Pass -} // Subshader - -Fallback off - -} // shader diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/RadialBlur.shader.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/RadialBlur.shader.meta deleted file mode 100644 index a8725c4..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/RadialBlur.shader.meta +++ /dev/null @@ -1,4 +0,0 @@ -fileFormatVersion: 2 -guid: f58445347fe2e4b8396487ed2bfa02ad -ShaderImporter: - userData: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/SSAOShader.shader b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/SSAOShader.shader deleted file mode 100644 index 1b579fe..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/SSAOShader.shader +++ /dev/null @@ -1,285 +0,0 @@ -// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' - -Shader "Hidden/SSAO" { -Properties { - _MainTex ("", 2D) = "" {} - _RandomTexture ("", 2D) = "" {} - _SSAO ("", 2D) = "" {} -} -Subshader { - ZTest Always Cull Off ZWrite Off - -CGINCLUDE -// Common code used by several SSAO passes below -#include "UnityCG.cginc" -struct v2f_ao { - float4 pos : SV_POSITION; - float2 uv : TEXCOORD0; - float2 uvr : TEXCOORD1; -}; - -uniform float2 _NoiseScale; -float4 _CameraDepthNormalsTexture_ST; - -v2f_ao vert_ao (appdata_img v) -{ - v2f_ao o; - o.pos = UnityObjectToClipPos (v.vertex); - o.uv = TRANSFORM_TEX(v.texcoord, _CameraDepthNormalsTexture); - o.uvr = v.texcoord.xy * _NoiseScale; - return o; -} - -sampler2D _CameraDepthNormalsTexture; -sampler2D _RandomTexture; -float4 _Params; // x=radius, y=minz, z=attenuation power, w=SSAO power - -// HLSL and GLSL do not support arbitrarily sized arrays as function parameters (eg. float bla[]), whereas Cg does. -#if !defined(UNITY_COMPILER_CG) - -# define INPUT_SAMPLE_COUNT 8 -# include "frag_ao.cginc" -# undef INPUT_SAMPLE_COUNT - -# define INPUT_SAMPLE_COUNT 14 -# include "frag_ao.cginc" -# undef INPUT_SAMPLE_COUNT - -# define INPUT_SAMPLE_COUNT 26 -# include "frag_ao.cginc" -# undef INPUT_SAMPLE_COUNT - -# define INPUT_SAMPLE_COUNT 34 -# include "frag_ao.cginc" -# undef INPUT_SAMPLE_COUNT - -#else -# define INPUT_SAMPLE_COUNT -# include "frag_ao.cginc" -#endif - -ENDCG - - // ---- SSAO pass, 8 samples - Pass { - -CGPROGRAM -#pragma vertex vert_ao -#pragma fragment frag -#pragma target 3.0 - - -half4 frag (v2f_ao i) : SV_Target -{ - #define SAMPLE_COUNT 8 - const float3 RAND_SAMPLES[SAMPLE_COUNT] = { - float3(0.01305719,0.5872321,-0.119337), - float3(0.3230782,0.02207272,-0.4188725), - float3(-0.310725,-0.191367,0.05613686), - float3(-0.4796457,0.09398766,-0.5802653), - float3(0.1399992,-0.3357702,0.5596789), - float3(-0.2484578,0.2555322,0.3489439), - float3(0.1871898,-0.702764,-0.2317479), - float3(0.8849149,0.2842076,0.368524), - }; - return frag_ao (i, SAMPLE_COUNT, RAND_SAMPLES); -} -ENDCG - - } - -// ---- SSAO pass, 14 samples - Pass { - -CGPROGRAM -#pragma vertex vert_ao -#pragma fragment frag -#pragma target 3.0 - - -half4 frag (v2f_ao i) : SV_Target -{ - #define SAMPLE_COUNT 14 - const float3 RAND_SAMPLES[SAMPLE_COUNT] = { - float3(0.4010039,0.8899381,-0.01751772), - float3(0.1617837,0.1338552,-0.3530486), - float3(-0.2305296,-0.1900085,0.5025396), - float3(-0.6256684,0.1241661,0.1163932), - float3(0.3820786,-0.3241398,0.4112825), - float3(-0.08829653,0.1649759,0.1395879), - float3(0.1891677,-0.1283755,-0.09873557), - float3(0.1986142,0.1767239,0.4380491), - float3(-0.3294966,0.02684341,-0.4021836), - float3(-0.01956503,-0.3108062,-0.410663), - float3(-0.3215499,0.6832048,-0.3433446), - float3(0.7026125,0.1648249,0.02250625), - float3(0.03704464,-0.939131,0.1358765), - float3(-0.6984446,-0.6003422,-0.04016943), - }; - return frag_ao (i, SAMPLE_COUNT, RAND_SAMPLES); -} -ENDCG - - } - -// ---- SSAO pass, 26 samples - Pass { - -CGPROGRAM -#pragma vertex vert_ao -#pragma fragment frag -#pragma target 3.0 - - -half4 frag (v2f_ao i) : SV_Target -{ - #define SAMPLE_COUNT 26 - const float3 RAND_SAMPLES[SAMPLE_COUNT] = { - float3(0.2196607,0.9032637,0.2254677), - float3(0.05916681,0.2201506,-0.1430302), - float3(-0.4152246,0.1320857,0.7036734), - float3(-0.3790807,0.1454145,0.100605), - float3(0.3149606,-0.1294581,0.7044517), - float3(-0.1108412,0.2162839,0.1336278), - float3(0.658012,-0.4395972,-0.2919373), - float3(0.5377914,0.3112189,0.426864), - float3(-0.2752537,0.07625949,-0.1273409), - float3(-0.1915639,-0.4973421,-0.3129629), - float3(-0.2634767,0.5277923,-0.1107446), - float3(0.8242752,0.02434147,0.06049098), - float3(0.06262707,-0.2128643,-0.03671562), - float3(-0.1795662,-0.3543862,0.07924347), - float3(0.06039629,0.24629,0.4501176), - float3(-0.7786345,-0.3814852,-0.2391262), - float3(0.2792919,0.2487278,-0.05185341), - float3(0.1841383,0.1696993,-0.8936281), - float3(-0.3479781,0.4725766,-0.719685), - float3(-0.1365018,-0.2513416,0.470937), - float3(0.1280388,-0.563242,0.3419276), - float3(-0.4800232,-0.1899473,0.2398808), - float3(0.6389147,0.1191014,-0.5271206), - float3(0.1932822,-0.3692099,-0.6060588), - float3(-0.3465451,-0.1654651,-0.6746758), - float3(0.2448421,-0.1610962,0.1289366), - }; - return frag_ao (i, SAMPLE_COUNT, RAND_SAMPLES); -} -ENDCG - - } - -// ---- Blur pass - Pass { -CGPROGRAM -#pragma vertex vert -#pragma fragment frag -#pragma target 3.0 -#include "UnityCG.cginc" - -struct v2f { - float4 pos : SV_POSITION; - float2 uv : TEXCOORD0; -}; - -float4 _MainTex_ST; - -v2f vert (appdata_img v) -{ - v2f o; - o.pos = UnityObjectToClipPos (v.vertex); - o.uv = TRANSFORM_TEX (v.texcoord, _CameraDepthNormalsTexture); - return o; -} - -sampler2D _SSAO; -float3 _TexelOffsetScale; - -inline half CheckSame (half4 n, half4 nn) -{ - // difference in normals - half2 diff = abs(n.xy - nn.xy); - half sn = (diff.x + diff.y) < 0.1; - // difference in depth - float z = DecodeFloatRG (n.zw); - float zz = DecodeFloatRG (nn.zw); - float zdiff = abs(z-zz) * _ProjectionParams.z; - half sz = zdiff < 0.2; - return sn * sz; -} - - -half4 frag( v2f i ) : SV_Target -{ - #define NUM_BLUR_SAMPLES 4 - - float2 o = _TexelOffsetScale.xy; - - half sum = tex2D(_SSAO, i.uv).r * (NUM_BLUR_SAMPLES + 1); - half denom = NUM_BLUR_SAMPLES + 1; - - half4 geom = tex2D (_CameraDepthNormalsTexture, i.uv); - - for (int s = 0; s < NUM_BLUR_SAMPLES; ++s) - { - float2 nuv = i.uv + o * (s+1); - half4 ngeom = tex2D (_CameraDepthNormalsTexture, nuv.xy); - half coef = (NUM_BLUR_SAMPLES - s) * CheckSame (geom, ngeom); - sum += tex2D (_SSAO, nuv.xy).r * coef; - denom += coef; - } - for (int s = 0; s < NUM_BLUR_SAMPLES; ++s) - { - float2 nuv = i.uv - o * (s+1); - half4 ngeom = tex2D (_CameraDepthNormalsTexture, nuv.xy); - half coef = (NUM_BLUR_SAMPLES - s) * CheckSame (geom, ngeom); - sum += tex2D (_SSAO, nuv.xy).r * coef; - denom += coef; - } - return sum / denom; -} -ENDCG - } - - // ---- Composite pass - Pass { -CGPROGRAM -#pragma vertex vert -#pragma fragment frag -#include "UnityCG.cginc" - -struct v2f { - float4 pos : SV_POSITION; - float2 uv[2] : TEXCOORD0; -}; - -sampler2D _MainTex; -half4 _MainTex_ST; - -sampler2D _SSAO; -half4 _SSAO_ST; - -v2f vert (appdata_img v) -{ - v2f o; - o.pos = UnityObjectToClipPos (v.vertex); - o.uv[0] = UnityStereoScreenSpaceUVAdjust(MultiplyUV (UNITY_MATRIX_TEXTURE0, v.texcoord), _MainTex_ST); - o.uv[1] = UnityStereoScreenSpaceUVAdjust(MultiplyUV (UNITY_MATRIX_TEXTURE1, v.texcoord), _SSAO_ST); - return o; -} - - -half4 frag( v2f i ) : SV_Target -{ - half4 c = tex2D (_MainTex, i.uv[0]); - half ao = tex2D (_SSAO, i.uv[1]).r; - ao = pow (ao, _Params.w); - c.rgb *= ao; - return c; -} -ENDCG - } - -} - -Fallback off -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/SSAOShader.shader.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/SSAOShader.shader.meta deleted file mode 100644 index 0e2cdcc..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/SSAOShader.shader.meta +++ /dev/null @@ -1,4 +0,0 @@ -fileFormatVersion: 2 -guid: 43ca18288c424f645aaa1e9e07f04c50 -ShaderImporter: - userData: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/ScreenSpaceAmbientObscurance.shader b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/ScreenSpaceAmbientObscurance.shader deleted file mode 100644 index f6e4488..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/ScreenSpaceAmbientObscurance.shader +++ /dev/null @@ -1,417 +0,0 @@ -// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' - - -// This Ambient Occlusion image effect is based on "Scalable Ambient Obscurance": - -/** - -\author Morgan McGuire and Michael Mara, NVIDIA and Williams College, http://research.nvidia.com, http://graphics.cs.williams.edu - -Open Source under the "BSD" license: http://www.opensource.org/licenses/bsd-license.php - -Copyright (c) 2011-2012, NVIDIA -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - -Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. -Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -*/ - -Shader "Hidden/ScreenSpaceAmbientObscurance" -{ - Properties { - _MainTex ("Base (RGB)", 2D) = "white" {} - _AOTex("", 2D) = "" {} - _Rand("", 2D) = "" {} - } - - CGINCLUDE - - #include "UnityCG.cginc" - - #if defined(SHADER_API_D3D11) || defined(SHADER_API_GLCORE) - #define NUM_SAMPLES (15) - #else - #define NUM_SAMPLES (11) - #endif - - #define FAR_PLANE_Z (300.0) - #define NUM_SPIRAL_TURNS (7) - #define bias (0.01) - - float _Radius; - float _Radius2; // _Radius * _Radius; - float _Intensity; - float4 _ProjInfo; - float4 _ProjInfoLeft; - float4 _ProjInfoRight; - float4x4 _ProjectionInv; // ref only - - sampler2D_float _CameraDepthTexture; - sampler2D _Rand; - sampler2D _AOTex; - sampler2D _MainTex; - - float4 _MainTex_TexelSize; - half4 _MainTex_ST; - - half4 _AOTex_ST; - half4 _CameraDepthTexture_ST; - - static const float gaussian[5] = { 0.153170, 0.144893, 0.122649, 0.092902, 0.062970 }; // stddev = 2.0 - - float2 _Axis; - - /** Increase to make edges crisper. Decrease to reduce temporal flicker. */ - #define EDGE_SHARPNESS (1.0) - - float _BlurFilterDistance; - #define SCALE _BlurFilterDistance - - /** Filter _Radius in pixels. This will be multiplied by SCALE. */ - #define R (4) - - struct v2f - { - float4 pos : SV_POSITION; - float2 uv : TEXCOORD0; - float2 uv2 : TEXCOORD1; - }; - - v2f vert( appdata_img v ) - { - v2f o; - o.pos = UnityObjectToClipPos(v.vertex); - o.uv = v.texcoord.xy; - o.uv2 = v.texcoord.xy; - #if UNITY_UV_STARTS_AT_TOP - if (_MainTex_TexelSize.y < 0) - o.uv2.y = 1-o.uv2.y; - #endif - return o; - } - - float3 ReconstructCSPosition(float2 S, float z) - { - float linEyeZ = LinearEyeDepth(z); -#ifdef UNITY_SINGLE_PASS_STEREO - float4 projInfo = (unity_StereoEyeIndex == 0) ? _ProjInfoLeft : _ProjInfoRight; - return float3((S.xy * projInfo.xy + projInfo.zw) * linEyeZ, linEyeZ); -#else - return float3(( S.xy * _ProjInfo.xy + _ProjInfo.zw) * linEyeZ, linEyeZ); -#endif - - /* - // for reference - float4 clipPos = float4(S*2.0-1.0, (z*2-1), 1); - float4 viewPos; - viewPos.x = dot((float4)_ProjectionInv[0], clipPos); - viewPos.y = dot((float4)_ProjectionInv[1], clipPos); - viewPos.w = dot((float4)_ProjectionInv[3], clipPos); - viewPos.z = z; - viewPos = viewPos/viewPos.w; - return viewPos.xyz; - */ - } - - float3 ReconstructCSFaceNormal(float3 C) { - return normalize(cross(ddy(C), ddx(C))); - } - - - /** Returns a unit vector and a screen-space _Radius for the tap on a unit disk (the caller should scale by the actual disk _Radius) */ - - float2 TapLocation(int sampleNumber, float spinAngle, out float ssR){ - // Radius relative to ssR - float alpha = float(sampleNumber + 0.5) * (1.0 / NUM_SAMPLES); - float angle = alpha * (NUM_SPIRAL_TURNS * 6.28) + spinAngle; - - ssR = alpha; - return float2(cos(angle), sin(angle)); - } - - /** Used for packing Z into the GB channels */ - float CSZToKey(float z) { - return saturate(z * (1.0 / FAR_PLANE_Z)); - } - - /** Used for packing Z into the GB channels */ - void packKey(float key, out float2 p) { - // Round to the nearest 1/256.0 - float temp = floor(key * 256.0); - - // Integer part - p.x = temp * (1.0 / 256.0); - - // Fractional part - p.y = key * 256.0 - temp; - } - - /** Returns a number on (0, 1) */ - float UnpackKey(float2 p) - { - return p.x * (256.0 / 257.0) + p.y * (1.0 / 257.0); - } - - - /** Read the camera-space position of the point at screen-space pixel ssP */ - float3 GetPosition(float2 ssP) { - float3 P; - - P.z = SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture, UnityStereoScreenSpaceUVAdjust(ssP.xy, _CameraDepthTexture_ST)); - - // Offset to pixel center - P = ReconstructCSPosition(float2(ssP) /*+ float2(0.5, 0.5)*/, P.z); - return P; - } - - /** Read the camera-space position of the point at screen-space pixel ssP + unitOffset * ssR. Assumes length(unitOffset) == 1 */ - float3 GetOffsetPosition(float2 ssC, float2 unitOffset, float ssR) - { - float2 ssP = saturate(float2(ssR*unitOffset) + ssC); - - float3 P; - P.z = SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture, UnityStereoScreenSpaceUVAdjust(ssP.xy, _CameraDepthTexture_ST)); - - // Offset to pixel center - P = ReconstructCSPosition(float2(ssP)/* + float2(0.5, 0.5)*/, P.z); - - return P; - } - - /** Compute the occlusion due to sample with index \a i about the pixel at \a ssC that corresponds - to camera-space point \a C with unit normal \a n_C, using maximum screen-space sampling _Radius \a ssDiskRadius */ - - float SampleAO(in float2 ssC, in float3 C, in float3 n_C, in float ssDiskRadius, in int tapIndex, in float randomPatternRotationAngle) - { - // Offset on the unit disk, spun for this pixel - float ssR; - float2 unitOffset = TapLocation(tapIndex, randomPatternRotationAngle, ssR); - ssR *= ssDiskRadius; - - // The occluding point in camera space - float3 Q = GetOffsetPosition(ssC, unitOffset, ssR); - - float3 v = Q - C; - - float vv = dot(v, v); - float vn = dot(v, n_C); - - const float epsilon = 0.01; - float f = max(_Radius2 - vv, 0.0); - return f * f * f * max((vn - bias) / (epsilon + vv), 0.0); - } - - float4 fragAO(v2f i) : SV_Target - { - float4 fragment = fixed4(1,1,1,1); - - // Pixel being shaded - float2 ssC = i.uv2.xy;// * _MainTex_TexelSize.zw; - - // View space point being shaded - float3 C = GetPosition(ssC); - - //return abs(float4(C.xyz,0)); - //if(abs(C.z)<0.31) - // return 1; - //return abs(C.z); - - packKey(CSZToKey(C.z), fragment.gb); - //packKey(CSZToKey(C.z), bilateralKey); - - float randomPatternRotationAngle = 1.0; - #if defined(SHADER_API_D3D11) || defined(SHADER_API_GLCORE) - int2 ssCInt = ssC.xy * _MainTex_TexelSize.zw; - randomPatternRotationAngle = frac(sin(dot(i.uv, float2(12.9898, 78.233))) * 43758.5453) * 1000.0; - #else - // TODO: make dx9 rand better - randomPatternRotationAngle = tex2D(_Rand, i.uv*12.0).x * 1000.0; - #endif - - // Reconstruct normals from positions. These will lead to 1-pixel black lines - // at depth discontinuities, however the blur will wipe those out so they are not visible - // in the final image. - float3 n_C = ReconstructCSFaceNormal(C); - - //return float4((n_C),0); - - // Choose the screen-space sample _Radius - // proportional to the projected area of the sphere - float ssDiskRadius = -_Radius / C.z; // -projScale * _Radius / C.z; // <::::: - - float sum = 0.0; - for (int l = 0; l < NUM_SAMPLES; ++l) { - sum += SampleAO(ssC, C, n_C, (ssDiskRadius), l, randomPatternRotationAngle); - } - - float temp = _Radius2 * _Radius; - sum /= temp * temp; - - float A = max(0.0, 1.0 - sum * _Intensity * (5.0 / NUM_SAMPLES)); - fragment.ra = float2(A,A); - - return fragment; - } - - float4 fragUpsample (v2f i) : SV_Target - { - float4 fragment = fixed4(1,1,1,1); - - // View space point being shaded - float3 C = GetPosition(i.uv.xy); - - packKey(CSZToKey(C.z), fragment.gb); - fragment.ra = tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv.xy, _MainTex_ST)).ra; - - return fragment; - } - - float4 fragApply (v2f i) : SV_Target - { - float4 ao = tex2D(_AOTex, UnityStereoScreenSpaceUVAdjust(i.uv2.xy, _AOTex_ST)); - return tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv.xy, _MainTex_ST)) * ao.rrrr; - } - - float4 fragApplySoft (v2f i) : SV_Target - { - float4 color = tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv.xy, _MainTex_ST)); - - float ao = tex2D(_AOTex, UnityStereoScreenSpaceUVAdjust(i.uv2.xy, _AOTex_ST)).r; - ao += tex2D(_AOTex, UnityStereoScreenSpaceUVAdjust(i.uv2.xy, _AOTex_ST) + _MainTex_TexelSize.xy * 0.75).r; - ao += tex2D(_AOTex, UnityStereoScreenSpaceUVAdjust(i.uv2.xy, _AOTex_ST) - _MainTex_TexelSize.xy * 0.75).r; - ao += tex2D(_AOTex, UnityStereoScreenSpaceUVAdjust(i.uv2.xy, _AOTex_ST) + _MainTex_TexelSize.xy * float2(-0.75,0.75)).r; - ao += tex2D(_AOTex, UnityStereoScreenSpaceUVAdjust(i.uv2.xy, _AOTex_ST) - _MainTex_TexelSize.xy * float2(-0.75,0.75)).r; - - return color * float4(ao,ao,ao,5)/5; - } - - float4 fragBlurBL (v2f i) : SV_Target - { - float4 fragment = float4(1,1,1,1); - - float2 ssC = UnityStereoScreenSpaceUVAdjust(i.uv.xy, _MainTex_ST); - - float4 temp = tex2Dlod(_MainTex, float4(UnityStereoScreenSpaceUVAdjust(i.uv.xy, _MainTex_ST),0,0)); - - float2 passthrough2 = temp.gb; - float key = UnpackKey(passthrough2); - - float sum = temp.r; - - /* - if (key >= 0.999) { - // Sky pixel (if you aren't using depth keying, disable this test) - fragment.gb = passthrough2; - return fragment; - } - */ - - // Base weight for depth falloff. Increase this for more blurriness, decrease it for better edge discrimination - - float BASE = gaussian[0] * 0.5; // ole: i decreased - float totalWeight = BASE; - sum *= totalWeight; - - for (int r = -R; r <= R; ++r) { - // We already handled the zero case above. This loop should be unrolled and the branch discarded - if (r != 0) { - temp = tex2Dlod(_MainTex, float4(ssC + _Axis * _MainTex_TexelSize.xy * (r * SCALE),0,0) ); - float tapKey = UnpackKey(temp.gb); - float value = temp.r; - - // spatial domain: offset gaussian tap - float weight = 0.3 + gaussian[abs(r)]; - - // range domain (the "bilateral" weight). As depth difference increases, decrease weight. - weight *= max(0.0, 1.0 - (2000.0 * EDGE_SHARPNESS) * abs(tapKey - key)); - - sum += value * weight; - totalWeight += weight; - } - } - - const float epsilon = 0.0001; - fragment = sum / (totalWeight + epsilon); - - fragment.gb = passthrough2; - - return fragment; - } - - ENDCG - -SubShader { - - // 0: get ao - Pass { - ZTest Always Cull Off ZWrite Off - - CGPROGRAM - - #pragma vertex vert - #pragma fragment fragAO - #pragma target 3.0 - - ENDCG - } - - // 1: bilateral blur - Pass { - ZTest Always Cull Off ZWrite Off - - CGPROGRAM - - #pragma vertex vert - #pragma fragment fragBlurBL - #pragma target 3.0 - - ENDCG - } - - // 2: apply ao - Pass { - ZTest Always Cull Off ZWrite Off - - CGPROGRAM - - #pragma vertex vert - #pragma fragment fragApply - #pragma target 3.0 - - ENDCG - } - - // 3: apply with a slight box filter - Pass { - ZTest Always Cull Off ZWrite Off - - CGPROGRAM - - #pragma vertex vert - #pragma fragment fragApplySoft - #pragma target 3.0 - - ENDCG - } - - // 4: in case you want to blur in high rez for nicer z borders - Pass { - ZTest Always Cull Off ZWrite Off - - CGPROGRAM - - #pragma vertex vert - #pragma fragment fragUpsample - #pragma target 3.0 - - ENDCG - } -} - -Fallback off - -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/ScreenSpaceAmbientObscurance.shader.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/ScreenSpaceAmbientObscurance.shader.meta deleted file mode 100644 index dbe9a72..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/ScreenSpaceAmbientObscurance.shader.meta +++ /dev/null @@ -1,4 +0,0 @@ -fileFormatVersion: 2 -guid: 95616c020c5604dda96cf76afbbc0272 -ShaderImporter: - userData: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/ScreenSpaceRaytrace.cginc b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/ScreenSpaceRaytrace.cginc deleted file mode 100644 index 5397f38..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/ScreenSpaceRaytrace.cginc +++ /dev/null @@ -1,261 +0,0 @@ -/** -\author Michael Mara and Morgan McGuire, Casual Effects. 2015. -*/ - -#ifndef SCREEN_SPACE_RAYTRACE_INCLUDED -#define SCREEN_SPACE_RAYTRACE_INCLUDED - - -sampler2D_float _CameraDepthTexture; - - -float distanceSquared(float2 A, float2 B) { - A -= B; - return dot(A, A); -} - -float distanceSquared(float3 A, float3 B) { - A -= B; - return dot(A, A); -} - -void swap(inout float v0, inout float v1) { - float temp = v0; - v0 = v1; - v1 = temp; -} - - -bool isIntersecting(float rayZMin, float rayZMax, float sceneZ, float layerThickness) { - return (rayZMax >= sceneZ - layerThickness) && (rayZMin <= sceneZ); -} - -void rayIterations(inout float2 P, inout float stepDirection, inout float end, inout int stepCount, inout int maxSteps, inout bool intersecting, - inout float sceneZ, inout float2 dP, inout float3 Q, inout float3 dQ, inout float k, inout float dk, - inout float rayZMin, inout float rayZMax, inout float prevZMaxEstimate, inout bool permute, inout float2 hitPixel, - inout float2 invSize, inout float layerThickness) { - - UNITY_LOOP - for (; - ( (P.x * stepDirection) <= end) && - (stepCount < maxSteps) && - (!intersecting); - P += dP, Q.z += dQ.z, k += dk, stepCount += 1) { - - // The depth range that the ray covers within this loop iteration. - // Assume that the ray is moving in increasing z and swap if backwards. - rayZMin = prevZMaxEstimate; - //rayZMin = (dQ.z * -0.5 + Q.z) / (dk * -0.5 + k); - // Compute the value at 1/2 pixel into the future - rayZMax = (dQ.z * 0.5 + Q.z) / (dk * 0.5 + k); - prevZMaxEstimate = rayZMax; - if (rayZMin > rayZMax) { swap(rayZMin, rayZMax); } - - // Undo the homogeneous operation to obtain the camera-space - // Q at each point - hitPixel = permute ? P.yx : P; - - sceneZ = tex2Dlod(_CameraDepthTexture, float4(hitPixel * invSize,0,0)).r; - sceneZ = -LinearEyeDepth(sceneZ); - - intersecting = isIntersecting(rayZMin, rayZMax, sceneZ, layerThickness); - - } // pixel on ray - P -= dP, Q.z -= dQ.z, k -= dk; -} - -/** - \param csOrigin must have z < -0.01, and project within the valid screen rectangle - \param stepRate Set to 1.0 by default, higher to step faster - */ -bool castDenseScreenSpaceRay - (float3 csOrigin, - float3 csDirection, - float4x4 projectToPixelMatrix, - float2 csZBufferSize, - float3 clipInfo, - float jitterFraction, - int maxSteps, - float layerThickness, - float maxRayTraceDistance, - out float2 hitPixel, - int stepRate, - bool refine, - out float3 csHitPoint, - out float stepCount) { - - float2 invSize = float2(1.0 / csZBufferSize.x, 1.0 / csZBufferSize.y); - - // Initialize to off screen - hitPixel = float2(-1, -1); - - float nearPlaneZ = -0.01; - // Clip ray to a near plane in 3D (doesn't have to be *the* near plane, although that would be a good idea) - float rayLength = ((csOrigin.z + csDirection.z * maxRayTraceDistance) > nearPlaneZ) ? - ((nearPlaneZ - csOrigin.z) / csDirection.z) : - maxRayTraceDistance; - - float3 csEndPoint = csDirection * rayLength + csOrigin; - - // Project into screen space - // This matrix has a lot of zeroes in it. We could expand - // out these multiplies to avoid multiplying by zero - // ...but 16 MADDs are not a big deal compared to what's ahead - float4 H0 = mul(projectToPixelMatrix, float4(csOrigin, 1.0)); - float4 H1 = mul(projectToPixelMatrix, float4(csEndPoint, 1.0)); - - // There are a lot of divisions by w that can be turned into multiplications - // at some minor precision loss...and we need to interpolate these 1/w values - // anyway. - // - // Because the caller was required to clip to the near plane, - // this homogeneous division (projecting from 4D to 2D) is guaranteed - // to succeed. - float k0 = 1.0 / H0.w; - float k1 = 1.0 / H1.w; - - // Screen-space endpoints - float2 P0 = H0.xy * k0; - float2 P1 = H1.xy * k1; - - // Switch the original points to values that interpolate linearly in 2D: - float3 Q0 = csOrigin * k0; - float3 Q1 = csEndPoint * k1; - -#if 1 // Clipping to the screen coordinates. We could simply modify maxSteps instead - float yMax = csZBufferSize.y - 0.5; - float yMin = 0.5; - float xMax = csZBufferSize.x - 0.5; - float xMin = 0.5; - - // 2D interpolation parameter - float alpha = 0.0; - // P0 must be in bounds - if (P1.y > yMax || P1.y < yMin) { - float yClip = (P1.y > yMax) ? yMax : yMin; - float yAlpha = (P1.y - yClip) / (P1.y - P0.y); // Denominator is not zero, since P0 != P1 (or P0 would have been clipped!) - alpha = yAlpha; - } - - // P0 must be in bounds - if (P1.x > xMax || P1.x < xMin) { - float xClip = (P1.x > xMax) ? xMax : xMin; - float xAlpha = (P1.x - xClip) / (P1.x - P0.x); // Denominator is not zero, since P0 != P1 (or P0 would have been clipped!) - alpha = max(alpha, xAlpha); - } - - // These are all in homogeneous space, so they interpolate linearly - P1 = lerp(P1, P0, alpha); - k1 = lerp(k1, k0, alpha); - Q1 = lerp(Q1, Q0, alpha); -#endif - - // We're doing this to avoid divide by zero (rays exactly parallel to an eye ray) - P1 = (distanceSquared(P0, P1) < 0.0001) ? P0 + float2(0.01, 0.01) : P1; - - float2 delta = P1 - P0; - - // Assume horizontal - bool permute = false; - if (abs(delta.x) < abs(delta.y)) { - // More-vertical line. Create a permutation that swaps x and y in the output - permute = true; - - // Directly swizzle the inputs - delta = delta.yx; - P1 = P1.yx; - P0 = P0.yx; - } - - // From now on, "x" is the primary iteration direction and "y" is the secondary one - - float stepDirection = sign(delta.x); - float invdx = stepDirection / delta.x; - float2 dP = float2(stepDirection, invdx * delta.y); - - // Track the derivatives of Q and k - float3 dQ = (Q1 - Q0) * invdx; - float dk = (k1 - k0) * invdx; - - dP *= stepRate; - dQ *= stepRate; - dk *= stepRate; - - P0 += dP * jitterFraction; - Q0 += dQ * jitterFraction; - k0 += dk * jitterFraction; - - // Slide P from P0 to P1, (now-homogeneous) Q from Q0 to Q1, and k from k0 to k1 - float3 Q = Q0; - float k = k0; - - // We track the ray depth at +/- 1/2 pixel to treat pixels as clip-space solid - // voxels. Because the depth at -1/2 for a given pixel will be the same as at - // +1/2 for the previous iteration, we actually only have to compute one value - // per iteration. - float prevZMaxEstimate = csOrigin.z; - stepCount = 0.0; - float rayZMax = prevZMaxEstimate, rayZMin = prevZMaxEstimate; - float sceneZ = 100000; - - // P1.x is never modified after this point, so pre-scale it by - // the step direction for a signed comparison - float end = P1.x * stepDirection; - - bool intersecting = isIntersecting(rayZMin, rayZMax, sceneZ, layerThickness); - // We only advance the z field of Q in the inner loop, since - // Q.xy is never used until after the loop terminates - - //int rayIterations = min(maxSteps, stepsToGetOffscreen); - - - float2 P = P0; - - int originalStepCount = 0; - rayIterations(P, stepDirection, end, originalStepCount, maxSteps, intersecting, - sceneZ, dP, Q, dQ, k, dk, - rayZMin, rayZMax, prevZMaxEstimate, permute, hitPixel, - invSize, layerThickness); - - - stepCount = originalStepCount; - if (refine && intersecting && stepRate > 1) { - - - // We're going back a step. - P -= dP, Q.z -= dQ.z, k -= dk; - prevZMaxEstimate = Q.z / k; - rayZMin = prevZMaxEstimate; - rayZMax = prevZMaxEstimate; - - intersecting = false; - int refinementStepCount = 0; - int refinementMaxSteps = stepRate; - - float refinementConstant = 1.0 / stepRate; - dQ.z *= refinementConstant; - dP *= refinementConstant; - dk *= refinementConstant; - - // Refinement - rayIterations(P, stepDirection, end, refinementStepCount, refinementMaxSteps, intersecting, - sceneZ, dP, Q, dQ, k, dk, - rayZMin, rayZMax, prevZMaxEstimate, permute, hitPixel, - invSize, layerThickness); - stepCount += refinementStepCount * refinementConstant - 1.0; - //stepCount = refinementStepCount; - intersecting = true; - } - - - // Loop only advanced the Z component. Now that we know where we are going - // update xy - Q.xy += dQ.xy * stepCount; - // Q is a vector, so we are trying to get by with 1 division instead of 3. - csHitPoint = Q * (1.0 / k); - - return intersecting; -} - - -#endif // SCREEN_SPACE_RAYTRACE_INCLUDED diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/ScreenSpaceRaytrace.cginc.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/ScreenSpaceRaytrace.cginc.meta deleted file mode 100644 index 88f5b49..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/ScreenSpaceRaytrace.cginc.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 26c67b7245085cf438e3d42d50d94f55 -timeCreated: 1425661779 -licenseType: Pro -ShaderImporter: - defaultTextures: [] - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/SepiaToneEffect.shader b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/SepiaToneEffect.shader deleted file mode 100644 index 692e676..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/SepiaToneEffect.shader +++ /dev/null @@ -1,39 +0,0 @@ -Shader "Hidden/Sepiatone Effect" { -Properties { - _MainTex ("Base (RGB)", 2D) = "white" {} -} - -SubShader { - Pass { - ZTest Always Cull Off ZWrite Off - -CGPROGRAM -#pragma vertex vert_img -#pragma fragment frag -#include "UnityCG.cginc" - -uniform sampler2D _MainTex; -half4 _MainTex_ST; - -fixed4 frag (v2f_img i) : SV_Target -{ - fixed4 original = tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv, _MainTex_ST)); - - // get intensity value (Y part of YIQ color space) - fixed Y = dot (fixed3(0.299, 0.587, 0.114), original.rgb); - - // Convert to Sepia Tone by adding constant - fixed4 sepiaConvert = float4 (0.191, -0.054, -0.221, 0.0); - fixed4 output = sepiaConvert + Y; - output.a = original.a; - - return output; -} -ENDCG - - } -} - -Fallback off - -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/SepiaToneEffect.shader.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/SepiaToneEffect.shader.meta deleted file mode 100644 index 34528f5..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/SepiaToneEffect.shader.meta +++ /dev/null @@ -1,4 +0,0 @@ -fileFormatVersion: 2 -guid: b6aa781cad112c75d0008dfa8d76c639 -ShaderImporter: - userData: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/ShowAlphaChannel.shader b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/ShowAlphaChannel.shader deleted file mode 100644 index 00e0d42..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/ShowAlphaChannel.shader +++ /dev/null @@ -1,56 +0,0 @@ -// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' - - - -Shader "Hidden/ShowAlphaChannel" { -Properties { - _MainTex ("Base (RGB)", 2D) = "white" {} - _EdgeTex ("_EdgeTex", 2D) = "white" {} -} - -SubShader { - Pass { - ZTest Always Cull Off ZWrite Off - -CGPROGRAM -#pragma vertex vert -#pragma fragment frag - -#include "UnityCG.cginc" - -uniform sampler2D _MainTex; -uniform sampler2D _EdgeTex; - -uniform float4 _MainTex_TexelSize; - -float filterRadius; - -struct v2f { - float4 pos : SV_POSITION; - float2 uv : TEXCOORD0; -}; - -v2f vert( appdata_img v ) -{ - v2f o; - o.pos = UnityObjectToClipPos (v.vertex); - o.uv = v.texcoord.xy; - - return o; -} - -half4 frag (v2f i) : SV_Target -{ - - half4 color = tex2D(_MainTex, i.uv.xy); - half edges = color.a; - - return edges; -} -ENDCG - } -} - -Fallback off - -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/ShowAlphaChannel.shader.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/ShowAlphaChannel.shader.meta deleted file mode 100644 index 37d3f86..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/ShowAlphaChannel.shader.meta +++ /dev/null @@ -1,4 +0,0 @@ -fileFormatVersion: 2 -guid: da310021e2a4142429d95c537846dc38 -ShaderImporter: - userData: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/SimpleClear.shader b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/SimpleClear.shader deleted file mode 100644 index 4d4cec9..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/SimpleClear.shader +++ /dev/null @@ -1,43 +0,0 @@ -// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' - - - -Shader "Hidden/SimpleClear" { -Properties { - _MainTex ("Base (RGB)", 2D) = "white" {} -} - -SubShader { - Pass { - ZTest Always Cull Off ZWrite Off - -CGPROGRAM -#pragma vertex vert -#pragma fragment frag -#include "UnityCG.cginc" - -uniform sampler2D _MainTex; -uniform float4 _MainTex_TexelSize; - -struct v2f { - float4 pos : SV_POSITION; -}; - -v2f vert( appdata_img v ) -{ - v2f o; - o.pos = UnityObjectToClipPos(v.vertex); - return o; -} - -half4 frag (v2f i) : SV_Target -{ - return half4(0,0,0,0); -} -ENDCG - } -} - -Fallback off - -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/SimpleClear.shader.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/SimpleClear.shader.meta deleted file mode 100644 index eba30cb..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/SimpleClear.shader.meta +++ /dev/null @@ -1,4 +0,0 @@ -fileFormatVersion: 2 -guid: f688f89ed5eb847c5b19c934a0f1e772 -ShaderImporter: - userData: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/SunShaftsComposite.shader b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/SunShaftsComposite.shader deleted file mode 100644 index 6db882e..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/SunShaftsComposite.shader +++ /dev/null @@ -1,229 +0,0 @@ -// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' - -Shader "Hidden/SunShaftsComposite" { - Properties { - _MainTex ("Base", 2D) = "" {} - _ColorBuffer ("Color", 2D) = "" {} - _Skybox ("Skybox", 2D) = "" {} - } - - CGINCLUDE - - #include "UnityCG.cginc" - - struct v2f { - float4 pos : SV_POSITION; - float2 uv : TEXCOORD0; - #if UNITY_UV_STARTS_AT_TOP - float2 uv1 : TEXCOORD1; - #endif - }; - - struct v2f_radial { - float4 pos : SV_POSITION; - float2 uv : TEXCOORD0; - float2 blurVector : TEXCOORD1; - }; - - sampler2D _MainTex; - sampler2D _ColorBuffer; - sampler2D _Skybox; - sampler2D_float _CameraDepthTexture; - - uniform half4 _SunThreshold; - - uniform half4 _SunColor; - uniform half4 _BlurRadius4; - uniform half4 _SunPosition; - uniform half4 _MainTex_TexelSize; - half4 _MainTex_ST; - half4 _ColorBuffer_ST; - half4 _Skybox_ST; - half4 _CameraDepthTexture_ST; - - - #define SAMPLES_FLOAT 6.0f - #define SAMPLES_INT 6 - - v2f vert( appdata_img v ) { - v2f o; - o.pos = UnityObjectToClipPos(v.vertex); - o.uv = v.texcoord.xy; - - #if UNITY_UV_STARTS_AT_TOP - o.uv1 = v.texcoord.xy; - if (_MainTex_TexelSize.y < 0) - o.uv1.y = 1-o.uv1.y; - #endif - - return o; - } - - half4 fragScreen(v2f i) : SV_Target { - half4 colorA = tex2D (_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv.xy, _MainTex_ST)); - #if UNITY_UV_STARTS_AT_TOP - half4 colorB = tex2D (_ColorBuffer, UnityStereoScreenSpaceUVAdjust(i.uv1.xy, _ColorBuffer_ST)); - #else - half4 colorB = tex2D (_ColorBuffer, UnityStereoScreenSpaceUVAdjust(i.uv.xy, _ColorBuffer_ST)); - #endif - half4 depthMask = saturate (colorB * _SunColor); - return 1.0f - (1.0f-colorA) * (1.0f-depthMask); - } - - half4 fragAdd(v2f i) : SV_Target { - half4 colorA = tex2D (_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv.xy, _MainTex_ST)); - #if UNITY_UV_STARTS_AT_TOP - half4 colorB = tex2D (_ColorBuffer, UnityStereoScreenSpaceUVAdjust(i.uv1.xy, _ColorBuffer_ST)); - #else - half4 colorB = tex2D (_ColorBuffer, UnityStereoScreenSpaceUVAdjust(i.uv.xy, _ColorBuffer_ST)); - #endif - half4 depthMask = saturate (colorB * _SunColor); - return colorA + depthMask; - } - - v2f_radial vert_radial( appdata_img v ) { - v2f_radial o; - o.pos = UnityObjectToClipPos(v.vertex); - - o.uv.xy = v.texcoord.xy; - o.blurVector = (_SunPosition.xy - v.texcoord.xy) * _BlurRadius4.xy; - - return o; - } - - half4 frag_radial(v2f_radial i) : SV_Target - { - half4 color = half4(0,0,0,0); - for(int j = 0; j < SAMPLES_INT; j++) - { - half4 tmpColor = tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv.xy, _MainTex_ST)); - color += tmpColor; - i.uv.xy += i.blurVector; - } - return color / SAMPLES_FLOAT; - } - - half TransformColor (half4 skyboxValue) { - return dot(max(skyboxValue.rgb - _SunThreshold.rgb, half3(0,0,0)), half3(1,1,1)); // threshold and convert to greyscale - } - - half4 frag_depth (v2f i) : SV_Target { - #if UNITY_UV_STARTS_AT_TOP - float depthSample = SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture, UnityStereoScreenSpaceUVAdjust(i.uv1.xy, _CameraDepthTexture_ST)); - #else - float depthSample = SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture, UnityStereoScreenSpaceUVAdjust(i.uv.xy, _CameraDepthTexture_ST)); - #endif - - half4 tex = tex2D (_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv.xy, _MainTex_ST)); - - depthSample = Linear01Depth (depthSample); - - // consider maximum radius - #if UNITY_UV_STARTS_AT_TOP - half2 vec = _SunPosition.xy - i.uv1.xy; - #else - half2 vec = _SunPosition.xy - i.uv.xy; - #endif - half dist = saturate (_SunPosition.w - length (vec.xy)); - - half4 outColor = 0; - - // consider shafts blockers - if (depthSample > 0.99) - outColor = TransformColor (tex) * dist; - - return outColor; - } - - half4 frag_nodepth (v2f i) : SV_Target { - #if UNITY_UV_STARTS_AT_TOP - float4 sky = (tex2D (_Skybox, UnityStereoScreenSpaceUVAdjust(i.uv1.xy, _Skybox_ST))); - #else - float4 sky = (tex2D (_Skybox, UnityStereoScreenSpaceUVAdjust(i.uv.xy, _Skybox_ST))); - #endif - - float4 tex = (tex2D (_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv.xy, _MainTex_ST))); - - // consider maximum radius - #if UNITY_UV_STARTS_AT_TOP - half2 vec = _SunPosition.xy - i.uv1.xy; - #else - half2 vec = _SunPosition.xy - i.uv.xy; - #endif - half dist = saturate (_SunPosition.w - length (vec)); - - half4 outColor = 0; - - // find unoccluded sky pixels - // consider pixel values that differ significantly between framebuffer and sky-only buffer as occluded - if (Luminance ( abs(sky.rgb - tex.rgb)) < 0.2) - outColor = TransformColor (sky) * dist; - - return outColor; - } - - - - ENDCG - -Subshader { - - Pass { - ZTest Always Cull Off ZWrite Off - - CGPROGRAM - - #pragma vertex vert - #pragma fragment fragScreen - - ENDCG - } - - Pass { - ZTest Always Cull Off ZWrite Off - - CGPROGRAM - - #pragma vertex vert_radial - #pragma fragment frag_radial - - ENDCG - } - - Pass { - ZTest Always Cull Off ZWrite Off - - CGPROGRAM - - #pragma vertex vert - #pragma fragment frag_depth - - ENDCG - } - - Pass { - ZTest Always Cull Off ZWrite Off - - CGPROGRAM - - #pragma vertex vert - #pragma fragment frag_nodepth - - ENDCG - } - - Pass { - ZTest Always Cull Off ZWrite Off - - CGPROGRAM - - #pragma vertex vert - #pragma fragment fragAdd - - ENDCG - } -} - -Fallback off - -} // shader diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/SunShaftsComposite.shader.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/SunShaftsComposite.shader.meta deleted file mode 100644 index 82a0680..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/SunShaftsComposite.shader.meta +++ /dev/null @@ -1,4 +0,0 @@ -fileFormatVersion: 2 -guid: d3b1c8c1036784176946f5cfbfb7fe4c -ShaderImporter: - userData: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/Tonemapper.shader b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/Tonemapper.shader deleted file mode 100644 index fac29f1..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/Tonemapper.shader +++ /dev/null @@ -1,357 +0,0 @@ -// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' - -Shader "Hidden/Tonemapper" { - Properties { - _MainTex ("", 2D) = "black" {} - _SmallTex ("", 2D) = "grey" {} - _Curve ("", 2D) = "black" {} - } - - CGINCLUDE - - #include "UnityCG.cginc" - - struct v2f { - float4 pos : SV_POSITION; - float2 uv : TEXCOORD0; - }; - - sampler2D _MainTex; - sampler2D _SmallTex; - sampler2D _Curve; - - float4 _HdrParams; - float2 intensity; - float4 _MainTex_TexelSize; - half4 _MainTex_ST; - float _AdaptionSpeed; - float _ExposureAdjustment; - float _RangeScale; - - v2f vert( appdata_img v ) - { - v2f o; - o.pos = UnityObjectToClipPos(v.vertex); - o.uv = v.texcoord.xy; - return o; - } - - float4 fragLog(v2f i) : SV_Target - { - const float EPSILON = 1e-4h; - - float fLogLumSum = 0.0f; - - fLogLumSum += log( max( EPSILON, Luminance(tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv + _MainTex_TexelSize.xy * float2(-1,-1), _MainTex_ST)).rgb))); - fLogLumSum += log( max( EPSILON, Luminance(tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv + _MainTex_TexelSize.xy * float2( 1, 1), _MainTex_ST)).rgb))); - fLogLumSum += log( max( EPSILON, Luminance(tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv + _MainTex_TexelSize.xy * float2(-1, 1), _MainTex_ST)).rgb))); - fLogLumSum += log( max( EPSILON, Luminance(tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv + _MainTex_TexelSize.xy * float2( 1,-1), _MainTex_ST)).rgb))); - - float avg = fLogLumSum / 4.0; - return float4(avg, avg, avg, avg); - } - - float4 fragExp(v2f i) : SV_Target - { - float2 lum = float2(0.0f, 0.0f); - - lum += tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv + _MainTex_TexelSize.xy * float2(-1,-1), _MainTex_ST)).xy; - lum += tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv + _MainTex_TexelSize.xy * float2(1,1), _MainTex_ST)).xy; - lum += tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv + _MainTex_TexelSize.xy * float2(1,-1), _MainTex_ST)).xy; - lum += tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv + _MainTex_TexelSize.xy * float2(-1,1), _MainTex_ST)).xy; - - lum = exp(lum / 4.0f); - - return float4(lum.x, lum.y, lum.x, saturate(0.0125 * _AdaptionSpeed)); - } - - float3 ToCIE(float3 FullScreenImage) - { - // RGB -> XYZ conversion - // http://www.w3.org/Graphics/Color/sRGB - // The official sRGB to XYZ conversion matrix is (following ITU-R BT.709) - // 0.4125 0.3576 0.1805 - // 0.2126 0.7152 0.0722 - // 0.0193 0.1192 0.9505 - - float3x3 RGB2XYZ = {0.5141364, 0.3238786, 0.16036376, 0.265068, 0.67023428, 0.06409157, 0.0241188, 0.1228178, 0.84442666}; - - float3 XYZ = mul(RGB2XYZ, FullScreenImage.rgb); - - // XYZ -> Yxy conversion - - float3 Yxy; - - Yxy.r = XYZ.g; - - // x = X / (X + Y + Z) - // y = X / (X + Y + Z) - - float temp = dot(float3(1.0,1.0,1.0), XYZ.rgb); - - Yxy.gb = XYZ.rg / temp; - - return Yxy; - } - - float3 FromCIE(float3 Yxy) - { - float3 XYZ; - // Yxy -> XYZ conversion - XYZ.r = Yxy.r * Yxy.g / Yxy. b; - - // X = Y * x / y - XYZ.g = Yxy.r; - - // copy luminance Y - XYZ.b = Yxy.r * (1 - Yxy.g - Yxy.b) / Yxy.b; - - // Z = Y * (1-x-y) / y - - // XYZ -> RGB conversion - // The official XYZ to sRGB conversion matrix is (following ITU-R BT.709) - // 3.2410 -1.5374 -0.4986 - // -0.9692 1.8760 0.0416 - // 0.0556 -0.2040 1.0570 - - float3x3 XYZ2RGB = { 2.5651,-1.1665,-0.3986, -1.0217, 1.9777, 0.0439, 0.0753, -0.2543, 1.1892}; - - return mul(XYZ2RGB, XYZ); - } - - // NOTE/OPTIMIZATION: we're not going the extra CIE detour anymore, but - // scale with the OUT/IN luminance ratio,this is sooooo much faster - - float4 fragAdaptive(v2f i) : SV_Target - { - float avgLum = tex2D(_SmallTex, i.uv).x; - float4 color = tex2D (_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv, _MainTex_ST)); - - float cieLum = max(0.000001, Luminance(color.rgb)); //ToCIE(color.rgb); - - float lumScaled = cieLum * _HdrParams.z / (0.001 + avgLum.x); - - lumScaled = (lumScaled * (1.0f + lumScaled / (_HdrParams.w)))/(1.0f + lumScaled); - - //cie.r = lumScaled; - - color.rgb = color.rgb * (lumScaled / cieLum); - - //color.rgb = FromCIE(cie); - return color; - } - - float4 fragAdaptiveAutoWhite(v2f i) : SV_Target - { - float2 avgLum = tex2D(_SmallTex, i.uv).xy; - float4 color = tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv, _MainTex_ST)); - - float cieLum = max(0.000001, Luminance(color.rgb)); //ToCIE(color.rgb); - - float lumScaled = cieLum * _HdrParams.z / (0.001 + avgLum.x); - - lumScaled = (lumScaled * (1.0f + lumScaled / (avgLum.y*avgLum.y)))/(1.0f + lumScaled); - - //cie.r = lumScaled; - - color.rgb = color.rgb * (lumScaled / cieLum); - - //color.rgb = FromCIE(cie); - return color; - } - - float4 fragCurve(v2f i) : SV_Target - { - float4 color = tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv, _MainTex_ST)); - float3 cie = ToCIE(color.rgb); - - // Remap to new lum range - float newLum = tex2D(_Curve, float2(cie.r * _RangeScale, 0.5)).r; - cie.r = newLum; - color.rgb = FromCIE(cie); - - return color; - } - - float4 fragHable(v2f i) : SV_Target - { - const float A = 0.15; - const float B = 0.50; - const float C = 0.10; - const float D = 0.20; - const float E = 0.02; - const float F = 0.30; - const float W = 11.2; - - float3 texColor = tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv, _MainTex_ST)).rgb; - texColor *= _ExposureAdjustment; - - float ExposureBias = 2.0; - float3 x = ExposureBias*texColor; - float3 curr = ((x*(A*x+C*B)+D*E)/(x*(A*x+B)+D*F))-E/F; - - x = W; - float3 whiteScale = 1.0f/(((x*(A*x+C*B)+D*E)/(x*(A*x+B)+D*F))-E/F); - float3 color = curr*whiteScale; - - // float3 retColor = pow(color,1/2.2); // we have SRGB write enabled at this stage - - return float4(color, 1.0); - } - - // we are doing it on luminance here (better color preservation, but some other problems like very fast saturation) - float4 fragSimpleReinhard(v2f i) : SV_Target - { - float4 texColor = tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv, _MainTex_ST)); - float lum = Luminance(texColor.rgb); - float lumTm = lum * _ExposureAdjustment; - float scale = lumTm / (1+lumTm); - return float4(texColor.rgb * scale / lum, texColor.a); - } - - float4 fragOptimizedHejiDawson(v2f i) : SV_Target - { - float4 texColor = tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv, _MainTex_ST)); - texColor *= _ExposureAdjustment; - float4 X = max(float4(0.0,0.0,0.0,0.0), texColor-0.004); - float4 retColor = (X*(6.2*X+.5))/(X*(6.2*X+1.7)+0.06); - return retColor*retColor; - } - - float4 fragPhotographic(v2f i) : SV_Target - { - float4 texColor = tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv, _MainTex_ST)); - return 1-exp2(-_ExposureAdjustment * texColor); - } - - float4 fragDownsample(v2f i) : SV_Target - { - float4 tapA = tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv + _MainTex_TexelSize * 0.5, _MainTex_ST)); - float4 tapB = tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv - _MainTex_TexelSize * 0.5, _MainTex_ST)); - float4 tapC = tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv + _MainTex_TexelSize * float2(0.5,-0.5), _MainTex_ST)); - float4 tapD = tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv - _MainTex_TexelSize * float2(0.5,-0.5), _MainTex_ST)); - - float4 average = (tapA+tapB+tapC+tapD)/4; - average.y = max(max(tapA.y,tapB.y), max(tapC.y,tapD.y)); - - return average; - } - - ENDCG - -Subshader { - // adaptive reinhhard apply - Pass { - ZTest Always Cull Off ZWrite Off - - CGPROGRAM - #pragma vertex vert - #pragma fragment fragAdaptive - ENDCG - } - - // 1 - Pass { - ZTest Always Cull Off ZWrite Off - - CGPROGRAM - #pragma vertex vert - #pragma fragment fragLog - ENDCG - } - // 2 - Pass { - ZTest Always Cull Off ZWrite Off - Blend SrcAlpha OneMinusSrcAlpha - - CGPROGRAM - #pragma vertex vert - #pragma fragment fragExp - ENDCG - } - // 3 - Pass { - ZTest Always Cull Off ZWrite Off - - Blend Off - - CGPROGRAM - #pragma vertex vert - #pragma fragment fragExp - ENDCG - } - - // 4 user controllable tonemap curve - Pass { - ZTest Always Cull Off ZWrite Off - - CGPROGRAM - #pragma vertex vert - #pragma fragment fragCurve - ENDCG - } - - // 5 tonemapping in uncharted - Pass { - ZTest Always Cull Off ZWrite Off - - CGPROGRAM - #pragma vertex vert - #pragma fragment fragHable - ENDCG - } - - // 6 simple tonemapping based reinhard - Pass { - ZTest Always Cull Off ZWrite Off - - CGPROGRAM - #pragma vertex vert - #pragma fragment fragSimpleReinhard - ENDCG - } - - // 7 OptimizedHejiDawson - Pass { - ZTest Always Cull Off ZWrite Off - - CGPROGRAM - #pragma vertex vert - #pragma fragment fragOptimizedHejiDawson - ENDCG - } - - // 8 Photographic - Pass { - ZTest Always Cull Off ZWrite Off - - CGPROGRAM - #pragma vertex vert - #pragma fragment fragPhotographic - ENDCG - } - - // 9 Downsample with auto white detection - Pass { - ZTest Always Cull Off ZWrite Off - - CGPROGRAM - #pragma vertex vert - #pragma fragment fragDownsample - ENDCG - } - - // 10 adaptive reinhhard apply with auto white - Pass { - ZTest Always Cull Off ZWrite Off - - CGPROGRAM - #pragma vertex vert - #pragma fragment fragAdaptiveAutoWhite - ENDCG - } -} - -Fallback off - -} // shader diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/Tonemapper.shader.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/Tonemapper.shader.meta deleted file mode 100644 index 370e284..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/Tonemapper.shader.meta +++ /dev/null @@ -1,4 +0,0 @@ -fileFormatVersion: 2 -guid: 003377fc2620a44939dadde6fe3f8190 -ShaderImporter: - userData: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/TwirlEffect.shader b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/TwirlEffect.shader deleted file mode 100644 index 555988a..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/TwirlEffect.shader +++ /dev/null @@ -1,55 +0,0 @@ -// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' - -Shader "Hidden/Twirt Effect Shader" { -Properties { - _MainTex ("Base (RGB)", 2D) = "white" {} -} - -SubShader { - Pass { - ZTest Always Cull Off ZWrite Off - -CGPROGRAM -#pragma vertex vert -#pragma fragment frag -#include "UnityCG.cginc" - -uniform sampler2D _MainTex; -uniform float4 _MainTex_TexelSize; -half4 _MainTex_ST; -uniform float4 _CenterRadius; -uniform float4x4 _RotationMatrix; - -struct v2f { - float4 pos : SV_POSITION; - float2 uv : TEXCOORD0; -}; - -v2f vert( appdata_img v ) -{ - v2f o; - o.pos = UnityObjectToClipPos (v.vertex); - o.uv = v.texcoord - _CenterRadius.xy; - return o; -} - -float4 frag (v2f i) : SV_Target -{ - float2 offset = i.uv; - float2 distortedOffset = MultiplyUV (_RotationMatrix, offset.xy); - float2 tmp = offset / _CenterRadius.zw; - float t = min (1, length(tmp)); - - offset = lerp (distortedOffset, offset, t); - offset += _CenterRadius.xy; - - return tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(offset, _MainTex_ST)); -} -ENDCG - - } -} - -Fallback off - -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/TwirlEffect.shader.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/TwirlEffect.shader.meta deleted file mode 100644 index a11709f..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/TwirlEffect.shader.meta +++ /dev/null @@ -1,4 +0,0 @@ -fileFormatVersion: 2 -guid: 641b781cad112c75d0008dfa8d76c639 -ShaderImporter: - userData: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/VignettingShader.shader b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/VignettingShader.shader deleted file mode 100644 index ade5c9a..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/VignettingShader.shader +++ /dev/null @@ -1,73 +0,0 @@ -// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' - -Shader "Hidden/Vignetting" { - Properties { - _MainTex ("Base", 2D) = "white" {} - _VignetteTex ("Vignette", 2D) = "white" {} - } - - CGINCLUDE - - #include "UnityCG.cginc" - - struct v2f { - float4 pos : SV_POSITION; - float2 uv : TEXCOORD0; - float2 uv2 : TEXCOORD1; - }; - - sampler2D _MainTex; - sampler2D _VignetteTex; - - half _Intensity; - half _Blur; - - float4 _MainTex_TexelSize; - half4 _MainTex_ST; - half4 _VignetteTex_ST; - - v2f vert( appdata_img v ) { - v2f o; - o.pos = UnityObjectToClipPos(v.vertex); - o.uv = v.texcoord.xy; - o.uv2 = v.texcoord.xy; - - #if UNITY_UV_STARTS_AT_TOP - if (_MainTex_TexelSize.y < 0) - o.uv2.y = 1.0 - o.uv2.y; - #endif - - return o; - } - - half4 frag(v2f i) : SV_Target { - half2 coords = i.uv; - half2 uv = i.uv; - - coords = (coords - 0.5) * 2.0; - half coordDot = dot (coords,coords); - half4 color = tex2D (_MainTex, UnityStereoScreenSpaceUVAdjust(uv, _MainTex_ST)); - - float mask = 1.0 - coordDot * _Intensity; - - half4 colorBlur = tex2D (_VignetteTex, UnityStereoScreenSpaceUVAdjust(i.uv2, _VignetteTex_ST)); - color = lerp (color, colorBlur, saturate (_Blur * coordDot)); - - return color * mask; - } - - ENDCG - -Subshader { - Pass { - ZTest Always Cull Off ZWrite Off - - CGPROGRAM - #pragma vertex vert - #pragma fragment frag - ENDCG - } -} - -Fallback off -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/VignettingShader.shader.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/VignettingShader.shader.meta deleted file mode 100644 index 2ecd872..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/VignettingShader.shader.meta +++ /dev/null @@ -1,4 +0,0 @@ -fileFormatVersion: 2 -guid: 627943dc7a9a74286b70a4f694a0acd5 -ShaderImporter: - userData: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/VortexEffect.shader b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/VortexEffect.shader deleted file mode 100644 index 208d1ac..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/VortexEffect.shader +++ /dev/null @@ -1,67 +0,0 @@ -// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' - -Shader "Hidden/Twist Effect" { -Properties { - _MainTex ("Base (RGB)", 2D) = "white" {} -} - -SubShader -{ - Pass - { - ZTest Always Cull Off ZWrite Off - -CGPROGRAM -#pragma vertex vert -#pragma fragment frag - -#include "UnityCG.cginc" - -uniform sampler2D _MainTex; - -uniform float4 _MainTex_ST; - -uniform float4 _MainTex_TexelSize; -uniform float _Angle; -uniform float4 _CenterRadius; - -struct v2f { - float4 pos : SV_POSITION; - float2 uv : TEXCOORD0; - float2 uvOrig : TEXCOORD1; -}; - -v2f vert (appdata_img v) -{ - v2f o; - o.pos = UnityObjectToClipPos(v.vertex); - float2 uv = v.texcoord.xy - _CenterRadius.xy; - o.uv = TRANSFORM_TEX(uv, _MainTex); //MultiplyUV (UNITY_MATRIX_TEXTURE0, uv); - o.uvOrig = uv; - return o; -} - -float4 frag (v2f i) : SV_Target -{ - float2 offset = i.uvOrig; - float angle = 1.0 - length(offset / _CenterRadius.zw); - angle = max (0, angle); - angle = angle * angle * _Angle; - float cosLength, sinLength; - sincos (angle, sinLength, cosLength); - - float2 uv; - uv.x = cosLength * offset[0] - sinLength * offset[1]; - uv.y = sinLength * offset[0] + cosLength * offset[1]; - uv += _CenterRadius.xy; - - return tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(uv, _MainTex_ST)); -} -ENDCG - - } -} - -Fallback off - -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/VortexEffect.shader.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/VortexEffect.shader.meta deleted file mode 100644 index 78ded6f..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/VortexEffect.shader.meta +++ /dev/null @@ -1,4 +0,0 @@ -fileFormatVersion: 2 -guid: 708b781cad112c75d0008dfa8d76c639 -ShaderImporter: - userData: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_Antialiasing.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_Antialiasing.meta deleted file mode 100644 index 34cabb7..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_Antialiasing.meta +++ /dev/null @@ -1,2 +0,0 @@ -fileFormatVersion: 2 -guid: 6d55b5e91b95c41739cdf4f804dd383d diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_Antialiasing/DLAA.shader b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_Antialiasing/DLAA.shader deleted file mode 100644 index 5c8f44b..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_Antialiasing/DLAA.shader +++ /dev/null @@ -1,347 +0,0 @@ -// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' - - -// -// modified and adapted DLAA code based on Dmitry Andreev's -// Directionally Localized Anti-Aliasing (DLAA) -// -// as seen in "The Force Unleashed 2" -// - -Shader "Hidden/DLAA" { -Properties { - _MainTex ("Base (RGB)", 2D) = "white" {} -} - -CGINCLUDE - - #include "UnityCG.cginc" - - uniform sampler2D _MainTex; - uniform float4 _MainTex_TexelSize; - half4 _MainTex_ST; - - struct v2f { - float4 pos : SV_POSITION; - float2 uv : TEXCOORD0; - }; - - #define LD( o, dx, dy ) o = tex2D( _MainTex, UnityStereoScreenSpaceUVAdjust(texCoord + float2( dx, dy ) * _MainTex_TexelSize.xy, _MainTex_ST) ); - - float GetIntensity( float3 col ) - { - return dot( col, float3( 0.33f, 0.33f, 0.33f ) ); - } - - float4 highPassPre( float2 texCoord ) - { - LD(float4 sCenter, 0.0,0.0) - LD(float4 sUpLeft, -1.0,-1.0) - LD(float4 sUpRight, 1.0,-1.0) - LD(float4 sDownLeft, -1.0,1.0) - LD(float4 sDownRight, 1.0,1.0) - - float4 diff = 4.0f * abs( (sUpLeft + sUpRight + sDownLeft + sDownRight) - 4.0f * sCenter ); - float edgeMask = GetIntensity(diff.xyz); - - return float4(sCenter.rgb, edgeMask); - } - - // Softer (5-pixel wide high-pass) - /* - void HighPassEdgeHV (out float4 edge_h, out float4 edge_v, float4 center, float4 w_h, float4 w_v, float2 texCoord) { - edge_h = abs( w_h - 4.0f * center ) / 4.0f; - edge_v = abs( w_v - 4.0f * center ) / 4.0f; - } - - // Sharper (3-pixel wide high-pass) - void EdgeHV (out float4 edge_h, out float4 edge_v, float4 center, float2 texCoord) { - float4 left, right, top, bottom; - - LD( left, -1, 0 ) - LD( right, 1, 0 ) - LD( top, 0, -1 ) - LD( bottom, 0, 1 ) - - edge_h = abs( left + right - 2.0f * center ) / 2.0f; - edge_v = abs( top + bottom - 2.0f * center ) / 2.0f; - } - */ - - float4 edgeDetectAndBlur( float2 texCoord ) - { - float lambda = 3.0f; - float epsilon = 0.1f; - - // - // Short Edges - // - - float4 center, left_01, right_01, top_01, bottom_01; - - // sample 5x5 cross - LD( center, 0, 0 ) - LD( left_01, -1.5, 0 ) - LD( right_01, 1.5, 0 ) - LD( top_01, 0,-1.5 ) - LD( bottom_01, 0, 1.5 ) - - - float4 w_h = 2.0f * ( left_01 + right_01 ); - float4 w_v = 2.0f * ( top_01 + bottom_01 ); - - - // Softer (5-pixel wide high-pass) - float4 edge_h = abs( w_h - 4.0f * center ) / 4.0f; - float4 edge_v = abs( w_v - 4.0f * center ) / 4.0f; - - - float4 blurred_h = ( w_h + 2.0f * center ) / 6.0f; - float4 blurred_v = ( w_v + 2.0f * center ) / 6.0f; - - float edge_h_lum = GetIntensity( edge_h.xyz ); - float edge_v_lum = GetIntensity( edge_v.xyz ); - float blurred_h_lum = GetIntensity( blurred_h.xyz ); - float blurred_v_lum = GetIntensity( blurred_v.xyz ); - - float edge_mask_h = saturate( ( lambda * edge_h_lum - epsilon ) / blurred_v_lum ); - float edge_mask_v = saturate( ( lambda * edge_v_lum - epsilon ) / blurred_h_lum ); - - float4 clr = center; - clr = lerp( clr, blurred_h, edge_mask_v ); - clr = lerp( clr, blurred_v, edge_mask_h ); // blurrier version - - // - // Long Edges - // - - float4 h0, h1, h2, h3, h4, h5, h6, h7; - float4 v0, v1, v2, v3, v4, v5, v6, v7; - - // sample 16x16 cross (sparse-sample on X360, incremental kernel update on SPUs) - LD( h0, 1.5, 0 ) LD( h1, 3.5, 0 ) LD( h2, 5.5, 0 ) LD( h3, 7.5, 0 ) LD( h4, -1.5,0 ) LD( h5, -3.5,0 ) LD( h6, -5.5,0 ) LD( h7, -7.5,0 ) - LD( v0, 0, 1.5 ) LD( v1, 0, 3.5 ) LD( v2, 0, 5.5 ) LD( v3, 0, 7.5 ) LD( v4, 0,-1.5 ) LD( v5, 0,-3.5 ) LD( v6, 0,-5.5 ) LD( v7, 0,-7.5 ) - - float long_edge_mask_h = ( h0.a + h1.a + h2.a + h3.a + h4.a + h5.a + h6.a + h7.a ) / 8.0f; - float long_edge_mask_v = ( v0.a + v1.a + v2.a + v3.a + v4.a + v5.a + v6.a + v7.a ) / 8.0f; - - long_edge_mask_h = saturate( long_edge_mask_h * 2.0f - 1.0f ); - long_edge_mask_v = saturate( long_edge_mask_v * 2.0f - 1.0f ); - - float4 left, right, top, bottom; - - LD( left, -1, 0 ) - LD( right, 1, 0 ) - LD( top, 0, -1 ) - LD( bottom, 0, 1 ) - - if ( long_edge_mask_h > 0 || long_edge_mask_v > 0 ) // faster but less resistant to noise (TFU2 X360) - //if ( abs( long_edge_mask_h - long_edge_mask_v ) > 0.2f ) // resistant to noise (TFU2 SPUs) - { - float4 long_blurred_h = ( h0 + h1 + h2 + h3 + h4 + h5 + h6 + h7 ) / 8.0f; - float4 long_blurred_v = ( v0 + v1 + v2 + v3 + v4 + v5 + v6 + v7 ) / 8.0f; - - float lb_h_lum = GetIntensity( long_blurred_h.xyz ); - float lb_v_lum = GetIntensity( long_blurred_v.xyz ); - - float center_lum = GetIntensity( center.xyz ); - float left_lum = GetIntensity( left.xyz ); - float right_lum = GetIntensity( right.xyz ); - float top_lum = GetIntensity( top.xyz ); - float bottom_lum = GetIntensity( bottom.xyz ); - - float4 clr_v = center; - float4 clr_h = center; - - // we had to hack this because DIV by 0 gives some artefacts on different platforms - float hx = center_lum == top_lum ? 0.0 : saturate( 0 + ( lb_h_lum - top_lum ) / ( center_lum - top_lum ) ); - float hy = center_lum == bottom_lum ? 0.0 : saturate( 1 + ( lb_h_lum - center_lum ) / ( center_lum - bottom_lum ) ); - float vx = center_lum == left_lum ? 0.0 : saturate( 0 + ( lb_v_lum - left_lum ) / ( center_lum - left_lum ) ); - float vy = center_lum == right_lum ? 0.0 : saturate( 1 + ( lb_v_lum - center_lum ) / ( center_lum - right_lum ) ); - - float4 vhxy = float4( vx, vy, hx, hy ); - //vhxy = vhxy == float4( 0, 0, 0, 0 ) ? float4( 1, 1, 1, 1 ) : vhxy; - - clr_v = lerp( left , clr_v, vhxy.x ); - clr_v = lerp( right , clr_v, vhxy.y ); - clr_h = lerp( top , clr_h, vhxy.z ); - clr_h = lerp( bottom, clr_h, vhxy.w ); - - clr = lerp( clr, clr_v, long_edge_mask_v ); - clr = lerp( clr, clr_h, long_edge_mask_h ); - } - - return clr; - } - - float4 edgeDetectAndBlurSharper(float2 texCoord) - { - float lambda = 3.0f; - float epsilon = 0.1f; - - // - // Short Edges - // - - float4 center, left_01, right_01, top_01, bottom_01; - - // sample 5x5 cross - LD( center, 0, 0 ) - LD( left_01, -1.5, 0 ) - LD( right_01, 1.5, 0 ) - LD( top_01, 0,-1.5 ) - LD( bottom_01, 0, 1.5 ) - - - float4 w_h = 2.0f * ( left_01 + right_01 ); - float4 w_v = 2.0f * ( top_01 + bottom_01 ); - - // Sharper (3-pixel wide high-pass) - float4 left, right, top, bottom; - - LD( left, -1, 0 ) - LD( right, 1, 0 ) - LD( top, 0, -1 ) - LD( bottom, 0, 1 ) - - float4 edge_h = abs( left + right - 2.0f * center ) / 2.0f; - float4 edge_v = abs( top + bottom - 2.0f * center ) / 2.0f; - - float4 blurred_h = ( w_h + 2.0f * center ) / 6.0f; - float4 blurred_v = ( w_v + 2.0f * center ) / 6.0f; - - float edge_h_lum = GetIntensity( edge_h.xyz ); - float edge_v_lum = GetIntensity( edge_v.xyz ); - float blurred_h_lum = GetIntensity( blurred_h.xyz ); - float blurred_v_lum = GetIntensity( blurred_v.xyz ); - - float edge_mask_h = saturate( ( lambda * edge_h_lum - epsilon ) / blurred_v_lum ); - float edge_mask_v = saturate( ( lambda * edge_v_lum - epsilon ) / blurred_h_lum ); - - float4 clr = center; - clr = lerp( clr, blurred_h, edge_mask_v ); - clr = lerp( clr, blurred_v, edge_mask_h * 0.5f ); // TFU2 uses 1.0f instead of 0.5f - - // - // Long Edges - // - - float4 h0, h1, h2, h3, h4, h5, h6, h7; - float4 v0, v1, v2, v3, v4, v5, v6, v7; - - // sample 16x16 cross (sparse-sample on X360, incremental kernel update on SPUs) - LD( h0, 1.5, 0 ) LD( h1, 3.5, 0 ) LD( h2, 5.5, 0 ) LD( h3, 7.5, 0 ) LD( h4, -1.5,0 ) LD( h5, -3.5,0 ) LD( h6, -5.5,0 ) LD( h7, -7.5,0 ) - LD( v0, 0, 1.5 ) LD( v1, 0, 3.5 ) LD( v2, 0, 5.5 ) LD( v3, 0, 7.5 ) LD( v4, 0,-1.5 ) LD( v5, 0,-3.5 ) LD( v6, 0,-5.5 ) LD( v7, 0,-7.5 ) - - float long_edge_mask_h = ( h0.a + h1.a + h2.a + h3.a + h4.a + h5.a + h6.a + h7.a ) / 8.0f; - float long_edge_mask_v = ( v0.a + v1.a + v2.a + v3.a + v4.a + v5.a + v6.a + v7.a ) / 8.0f; - - long_edge_mask_h = saturate( long_edge_mask_h * 2.0f - 1.0f ); - long_edge_mask_v = saturate( long_edge_mask_v * 2.0f - 1.0f ); - - //if ( long_edge_mask_h > 0 || long_edge_mask_v > 0 ) // faster but less resistant to noise (TFU2 X360) - if ( abs( long_edge_mask_h - long_edge_mask_v ) > 0.2f ) // resistant to noise (TFU2 SPUs) - { - float4 long_blurred_h = ( h0 + h1 + h2 + h3 + h4 + h5 + h6 + h7 ) / 8.0f; - float4 long_blurred_v = ( v0 + v1 + v2 + v3 + v4 + v5 + v6 + v7 ) / 8.0f; - - float lb_h_lum = GetIntensity( long_blurred_h.xyz ); - float lb_v_lum = GetIntensity( long_blurred_v.xyz ); - - float center_lum = GetIntensity( center.xyz ); - float left_lum = GetIntensity( left.xyz ); - float right_lum = GetIntensity( right.xyz ); - float top_lum = GetIntensity( top.xyz ); - float bottom_lum = GetIntensity( bottom.xyz ); - - float4 clr_v = center; - float4 clr_h = center; - - // we had to hack this because DIV by 0 gives some artefacts on different platforms - float hx = center_lum == top_lum ? 0.0 : saturate( 0 + ( lb_h_lum - top_lum ) / ( center_lum - top_lum ) ); - float hy = center_lum == bottom_lum ? 0.0 : saturate( 1 + ( lb_h_lum - center_lum ) / ( center_lum - bottom_lum ) ); - float vx = center_lum == left_lum ? 0.0 : saturate( 0 + ( lb_v_lum - left_lum ) / ( center_lum - left_lum ) ); - float vy = center_lum == right_lum ? 0.0 : saturate( 1 + ( lb_v_lum - center_lum ) / ( center_lum - right_lum ) ); - - float4 vhxy = float4( vx, vy, hx, hy ); - //vhxy = vhxy == float4( 0, 0, 0, 0 ) ? float4( 1, 1, 1, 1 ) : vhxy; - - clr_v = lerp( left , clr_v, vhxy.x ); - clr_v = lerp( right , clr_v, vhxy.y ); - clr_h = lerp( top , clr_h, vhxy.z ); - clr_h = lerp( bottom, clr_h, vhxy.w ); - - clr = lerp( clr, clr_v, long_edge_mask_v ); - clr = lerp( clr, clr_h, long_edge_mask_h ); - } - - return clr; - } - - - v2f vert( appdata_img v ) { - v2f o; - o.pos = UnityObjectToClipPos (v.vertex); - - float2 uv = v.texcoord.xy; - o.uv.xy = uv; - - return o; - } - - half4 fragFirst (v2f i) : SV_Target { - return highPassPre (i.uv); - } - - half4 fragSecond (v2f i) : SV_Target { - return edgeDetectAndBlur( i.uv ); - } - - half4 fragThird (v2f i) : SV_Target { - return edgeDetectAndBlurSharper( i.uv ); - } - -ENDCG - -SubShader { - Pass { - ZTest Always Cull Off ZWrite Off - - CGPROGRAM - - #pragma vertex vert - #pragma fragment fragFirst - #pragma exclude_renderers d3d11_9x - - ENDCG - } - - Pass { - ZTest Always Cull Off ZWrite Off - - CGPROGRAM - - #pragma vertex vert - #pragma fragment fragSecond - #pragma target 3.0 - #pragma exclude_renderers d3d11_9x - - ENDCG - } - - Pass { - ZTest Always Cull Off ZWrite Off - - CGPROGRAM - - #pragma vertex vert - #pragma fragment fragThird - #pragma target 3.0 - - ENDCG - } -} - -Fallback off - -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_Antialiasing/DLAA.shader.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_Antialiasing/DLAA.shader.meta deleted file mode 100644 index 8db070d..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_Antialiasing/DLAA.shader.meta +++ /dev/null @@ -1,4 +0,0 @@ -fileFormatVersion: 2 -guid: 017ca72b9e8a749058d13ebd527e98fa -ShaderImporter: - userData: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_Antialiasing/FXAA2.shader b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_Antialiasing/FXAA2.shader deleted file mode 100644 index 093ea9e..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_Antialiasing/FXAA2.shader +++ /dev/null @@ -1,191 +0,0 @@ -// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' - -Shader "Hidden/FXAA II" { -Properties { - _MainTex ("Base (RGB)", 2D) = "white" {} -} - -SubShader { - Pass { - ZTest Always Cull Off ZWrite Off - -CGPROGRAM - -#pragma vertex vert -#pragma fragment frag -#include "UnityCG.cginc" -#pragma target 3.0 - -#define FXAA_HLSL_3 1 - -/*============================================================================ - - FXAA v2 CONSOLE by TIMOTHY LOTTES @ NVIDIA - -============================================================================*/ - -/*============================================================================ - API PORTING -============================================================================*/ -#ifndef FXAA_GLSL_120 - #define FXAA_GLSL_120 0 -#endif -#ifndef FXAA_GLSL_130 - #define FXAA_GLSL_130 0 -#endif -#ifndef FXAA_HLSL_3 - #define FXAA_HLSL_3 0 -#endif -#ifndef FXAA_HLSL_4 - #define FXAA_HLSL_4 0 -#endif -/*--------------------------------------------------------------------------*/ -#if FXAA_GLSL_120 - // Requires, - // #version 120 - // #extension GL_EXT_gpu_shader4 : enable - #define int2 ivec2 - #define float2 vec2 - #define float3 vec3 - #define float4 vec4 - #define FxaaInt2 ivec2 - #define FxaaFloat2 vec2 - #define FxaaSat(a) clamp((a), 0.0, 1.0) - #define FxaaTex sampler2D - #define FxaaTexLod0(t, p) texture2DLod(t, p, 0.0) - #define FxaaTexOff(t, p, o, r) texture2DLodOffset(t, p, 0.0, o) -#endif -/*--------------------------------------------------------------------------*/ -#if FXAA_GLSL_130 - // Requires "#version 130" or better - #define int2 ivec2 - #define float2 vec2 - #define float3 vec3 - #define float4 vec4 - #define FxaaInt2 ivec2 - #define FxaaFloat2 vec2 - #define FxaaSat(a) clamp((a), 0.0, 1.0) - #define FxaaTex sampler2D - #define FxaaTexLod0(t, p) textureLod(t, p, 0.0) - #define FxaaTexOff(t, p, o, r) textureLodOffset(t, p, 0.0, o) -#endif -/*--------------------------------------------------------------------------*/ -#if FXAA_HLSL_3 - #define int2 float2 - #define FxaaInt2 float2 - #define FxaaFloat2 float2 - #define FxaaSat(a) saturate((a)) - #define FxaaTex sampler2D - #define FxaaTexLod0(t, p) tex2Dlod(t, float4(UnityStereoScreenSpaceUVAdjust(p, _MainTex_ST), 0.0, 0.0)) - #define FxaaTexOff(t, p, o, r) tex2Dlod(t, float4(UnityStereoScreenSpaceUVAdjust(p + (o * r), _MainTex_ST), 0, 0)) -#endif -/*--------------------------------------------------------------------------*/ -#if FXAA_HLSL_4 - #define FxaaInt2 int2 - #define FxaaFloat2 float2 - #define FxaaSat(a) saturate((a)) - struct FxaaTex { SamplerState smpl; Texture2D tex; }; - #define FxaaTexLod0(t, p) t.tex.SampleLevel(t.smpl, UnityStereoScreenSpaceUVAdjust(p, _MainTex_ST), 0.0) - #define FxaaTexOff(t, p, o, r) t.tex.SampleLevel(t.smpl, UnityStereoScreenSpaceUVAdjust(p, _MainTex_ST), 0.0, o) -#endif - - -/*============================================================================ - - VERTEX SHADER - -============================================================================*/ -float4 FxaaVertexShader( -float2 pos, // Both x and y range {-1.0 to 1.0 across screen}. -float2 rcpFrame) { // {1.0/frameWidth, 1.0/frameHeight} -/*--------------------------------------------------------------------------*/ - #define FXAA_SUBPIX_SHIFT (1.0/4.0) -/*--------------------------------------------------------------------------*/ - float4 posPos; - posPos.xy = (pos.xy * 0.5) + 0.5; - posPos.zw = posPos.xy - (rcpFrame * (0.5 + FXAA_SUBPIX_SHIFT)); - return posPos; } - -/*============================================================================ - - PIXEL SHADER - -============================================================================*/ -half4 _MainTex_ST; - -float3 FxaaPixelShader( -float4 posPos, // Output of FxaaVertexShader interpolated across screen. -FxaaTex tex, // Input texture. -float2 rcpFrame) { // Constant {1.0/frameWidth, 1.0/frameHeight}. -/*--------------------------------------------------------------------------*/ - #define FXAA_REDUCE_MIN (1.0/128.0) - #define FXAA_REDUCE_MUL (1.0/8.0) - #define FXAA_SPAN_MAX 8.0 -/*--------------------------------------------------------------------------*/ - float3 rgbNW = FxaaTexLod0(tex, posPos.zw).xyz; - float3 rgbNE = FxaaTexOff(tex, posPos.zw, FxaaInt2(1,0), rcpFrame.xy).xyz; - float3 rgbSW = FxaaTexOff(tex, posPos.zw, FxaaInt2(0,1), rcpFrame.xy).xyz; - float3 rgbSE = FxaaTexOff(tex, posPos.zw, FxaaInt2(1,1), rcpFrame.xy).xyz; - float3 rgbM = FxaaTexLod0(tex, posPos.xy).xyz; -/*--------------------------------------------------------------------------*/ - float3 luma = float3(0.299, 0.587, 0.114); - float lumaNW = dot(rgbNW, luma); - float lumaNE = dot(rgbNE, luma); - float lumaSW = dot(rgbSW, luma); - float lumaSE = dot(rgbSE, luma); - float lumaM = dot(rgbM, luma); -/*--------------------------------------------------------------------------*/ - float lumaMin = min(lumaM, min(min(lumaNW, lumaNE), min(lumaSW, lumaSE))); - float lumaMax = max(lumaM, max(max(lumaNW, lumaNE), max(lumaSW, lumaSE))); -/*--------------------------------------------------------------------------*/ - float2 dir; - dir.x = -((lumaNW + lumaNE) - (lumaSW + lumaSE)); - dir.y = ((lumaNW + lumaSW) - (lumaNE + lumaSE)); -/*--------------------------------------------------------------------------*/ - float dirReduce = max( - (lumaNW + lumaNE + lumaSW + lumaSE) * (0.25 * FXAA_REDUCE_MUL), - FXAA_REDUCE_MIN); - float rcpDirMin = 1.0/(min(abs(dir.x), abs(dir.y)) + dirReduce); - dir = min(FxaaFloat2( FXAA_SPAN_MAX, FXAA_SPAN_MAX), - max(FxaaFloat2(-FXAA_SPAN_MAX, -FXAA_SPAN_MAX), - dir * rcpDirMin)) * rcpFrame.xy; -/*--------------------------------------------------------------------------*/ - float3 rgbA = (1.0/2.0) * ( - FxaaTexLod0(tex, posPos.xy + dir * (1.0/3.0 - 0.5)).xyz + - FxaaTexLod0(tex, posPos.xy + dir * (2.0/3.0 - 0.5)).xyz); - float3 rgbB = rgbA * (1.0/2.0) + (1.0/4.0) * ( - FxaaTexLod0(tex, posPos.xy + dir * (0.0/3.0 - 0.5)).xyz + - FxaaTexLod0(tex, posPos.xy + dir * (3.0/3.0 - 0.5)).xyz); - float lumaB = dot(rgbB, luma); - if((lumaB < lumaMin) || (lumaB > lumaMax)) return rgbA; - return rgbB; } - - -struct v2f { - float4 pos : SV_POSITION; - float4 uv : TEXCOORD0; -}; - -float4 _MainTex_TexelSize; - -v2f vert (appdata_img v) -{ - v2f o; - o.pos = UnityObjectToClipPos (v.vertex); - o.uv = FxaaVertexShader (v.texcoord.xy*2-1, _MainTex_TexelSize.xy); - return o; -} - -sampler2D _MainTex; - -float4 frag (v2f i) : SV_Target -{ - return float4(FxaaPixelShader(i.uv, _MainTex, _MainTex_TexelSize.xy).xyz, 0.0f); -} - -ENDCG - } -} - -Fallback off -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_Antialiasing/FXAA2.shader.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_Antialiasing/FXAA2.shader.meta deleted file mode 100644 index 365db5f..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_Antialiasing/FXAA2.shader.meta +++ /dev/null @@ -1,4 +0,0 @@ -fileFormatVersion: 2 -guid: cd5b323dcc592457790ff18b528f5e67 -ShaderImporter: - userData: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_Antialiasing/FXAA3Console.shader b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_Antialiasing/FXAA3Console.shader deleted file mode 100644 index d0fe765..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_Antialiasing/FXAA3Console.shader +++ /dev/null @@ -1,175 +0,0 @@ -// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' - - - -/*============================================================================ - -source taken from - - - NVIDIA FXAA 3.11 by TIMOTHY LOTTES - - -and adapted and ported to Unity by Unity Technologies - - ------------------------------------------------------------------------------- -COPYRIGHT (C) 2010, 2011 NVIDIA CORPORATION. ALL RIGHTS RESERVED. ------------------------------------------------------------------------------- -TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THIS SOFTWARE IS PROVIDED -*AS IS* AND NVIDIA AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES, EITHER EXPRESS -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL NVIDIA -OR ITS SUPPLIERS BE LIABLE FOR ANY SPECIAL, INCIDENTAL, INDIRECT, OR -CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR -LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, -OR ANY OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR INABILITY TO USE -THIS SOFTWARE, EVEN IF NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. - -============================================================================*/ - - -Shader "Hidden/FXAA III (Console)" { - Properties { - _MainTex ("-", 2D) = "white" {} - _EdgeThresholdMin ("Edge threshold min",float) = 0.125 - _EdgeThreshold("Edge Threshold", float) = 0.25 - _EdgeSharpness("Edge sharpness",float) = 4.0 - } - SubShader { - Pass { - ZTest Always Cull Off ZWrite Off - - CGPROGRAM - #pragma vertex vert - #pragma fragment frag - #pragma target 3.0 - - #include "UnityCG.cginc" - - uniform sampler2D _MainTex; - uniform half _EdgeThresholdMin; - uniform half _EdgeThreshold; - uniform half _EdgeSharpness; - half4 _MainTex_ST; - - struct v2f { - float4 pos : SV_POSITION; - float2 uv : TEXCOORD0; - float4 interpolatorA : TEXCOORD1; - float4 interpolatorB : TEXCOORD2; - float4 interpolatorC : TEXCOORD3; - }; - - float4 _MainTex_TexelSize; - - v2f vert (appdata_img v) - { - v2f o; - o.pos = UnityObjectToClipPos (v.vertex); - - o.uv = v.texcoord.xy; - - float4 extents; - float2 offset = ( _MainTex_TexelSize.xy ) * 0.5f; - extents.xy = v.texcoord.xy - offset; - extents.zw = v.texcoord.xy + offset; - - float4 rcpSize; - rcpSize.xy = -_MainTex_TexelSize.xy * 0.5f; - rcpSize.zw = _MainTex_TexelSize.xy * 0.5f; -#if defined (SHADER_API_PSP2) - //cg compiler linker bug workaround - float almostzero = v.texcoord.x*0.000001f; - rcpSize.x += almostzero; -#endif - o.interpolatorA = extents; - o.interpolatorB = rcpSize; - o.interpolatorC = rcpSize; - - o.interpolatorC.xy *= 4.0; - o.interpolatorC.zw *= 4.0; - - return o; - } - -// hacky support for NaCl -#if defined(SHADER_API_GLES) && defined(SHADER_API_DESKTOP) - #define FxaaTexTop(t, p) tex2D(t, UnityStereoScreenSpaceUVAdjust(p, _MainTex_ST)) -#else - #define FxaaTexTop(t, p) tex2Dlod(t, float4(UnityStereoScreenSpaceUVAdjust(p, _MainTex_ST), 0.0, 0.0)) -#endif - - inline half TexLuminance( float2 uv ) - { - return Luminance(FxaaTexTop(_MainTex, uv).rgb); - } - - half3 FxaaPixelShader(float2 pos, float4 extents, float4 rcpSize, float4 rcpSize2) - { - half lumaNw = TexLuminance(extents.xy); - half lumaSw = TexLuminance(extents.xw); - half lumaNe = TexLuminance(extents.zy); - half lumaSe = TexLuminance(extents.zw); - - half3 centre = FxaaTexTop(_MainTex, pos).rgb; - half lumaCentre = Luminance(centre); - - half lumaMaxNwSw = max( lumaNw , lumaSw ); - lumaNe += 1.0/384.0; - half lumaMinNwSw = min( lumaNw , lumaSw ); - - half lumaMaxNeSe = max( lumaNe , lumaSe ); - half lumaMinNeSe = min( lumaNe , lumaSe ); - - half lumaMax = max( lumaMaxNeSe, lumaMaxNwSw ); - half lumaMin = min( lumaMinNeSe, lumaMinNwSw ); - - half lumaMaxScaled = lumaMax * _EdgeThreshold; - - half lumaMinCentre = min( lumaMin , lumaCentre ); - half lumaMaxScaledClamped = max( _EdgeThresholdMin , lumaMaxScaled ); - half lumaMaxCentre = max( lumaMax , lumaCentre ); - half dirSWMinusNE = lumaSw - lumaNe; - half lumaMaxCMinusMinC = lumaMaxCentre - lumaMinCentre; - half dirSEMinusNW = lumaSe - lumaNw; - - if(lumaMaxCMinusMinC < lumaMaxScaledClamped) - return centre; - - half2 dir; - dir.x = dirSWMinusNE + dirSEMinusNW; - dir.y = dirSWMinusNE - dirSEMinusNW; - - dir = normalize(dir); - half3 col1 = FxaaTexTop(_MainTex, pos.xy - dir * rcpSize.zw).rgb; - half3 col2 = FxaaTexTop(_MainTex, pos.xy + dir * rcpSize.zw).rgb; - - half dirAbsMinTimesC = min( abs( dir.x ) , abs( dir.y ) ) * _EdgeSharpness; - dir = clamp(dir.xy/dirAbsMinTimesC, -2.0, 2.0); - - half3 col3 = FxaaTexTop(_MainTex, pos.xy - dir * rcpSize2.zw).rgb; - half3 col4 = FxaaTexTop(_MainTex, pos.xy + dir * rcpSize2.zw).rgb; - - half3 rgbyA = col1 + col2; - half3 rgbyB = ((col3 + col4) * 0.25) + (rgbyA * 0.25); - - if((Luminance(rgbyA) < lumaMin) || (Luminance(rgbyB) > lumaMax)) - return rgbyA * 0.5; - else - return rgbyB; - } - - half4 frag (v2f i) : SV_Target - { - half3 color = FxaaPixelShader(i.uv, i.interpolatorA, i.interpolatorB, i.interpolatorC); - return half4(color, 1.0); - } - - ENDCG - } - } - FallBack Off -} - diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_Antialiasing/FXAA3Console.shader.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_Antialiasing/FXAA3Console.shader.meta deleted file mode 100644 index 6306815..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_Antialiasing/FXAA3Console.shader.meta +++ /dev/null @@ -1,4 +0,0 @@ -fileFormatVersion: 2 -guid: c547503fff0e8482ea5793727057041c -ShaderImporter: - userData: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_Antialiasing/FXAAPreset2.shader b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_Antialiasing/FXAAPreset2.shader deleted file mode 100644 index 9dd3f4d..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_Antialiasing/FXAAPreset2.shader +++ /dev/null @@ -1,831 +0,0 @@ -// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' - -Shader "Hidden/FXAA Preset 2" { -Properties { - _MainTex ("Base (RGB)", 2D) = "white" {} -} - -SubShader { - Pass { - ZTest Always Cull Off ZWrite Off - -CGPROGRAM -#pragma vertex vert -#pragma fragment frag -#include "UnityCG.cginc" -#pragma target 3.0 - -// doesn't make sense to have this on consoles, it'll fallback to FXAA2 -#pragma exclude_renderers xbox360 ps3 gles - - -#define FXAA_HLSL_3 1 -#define FXAA_PRESET 2 - - -// Copyright (c) 2010 NVIDIA Corporation. All rights reserved. -// -// TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THIS SOFTWARE IS PROVIDED -// *AS IS* AND NVIDIA AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES, EITHER EXPRESS -// OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY -// AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL NVIDIA OR ITS SUPPLIERS -// BE LIABLE FOR ANY SPECIAL, INCIDENTAL, INDIRECT, OR CONSEQUENTIAL DAMAGES -// WHATSOEVER (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF BUSINESS PROFITS, -// BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR ANY OTHER PECUNIARY LOSS) -// ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF NVIDIA HAS -// BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - -/*============================================================================ - - FXAA - -============================================================================*/ - -/*============================================================================ - API PORTING -============================================================================*/ -#ifndef FXAA_GLSL_120 - #define FXAA_GLSL_120 0 -#endif -#ifndef FXAA_GLSL_130 - #define FXAA_GLSL_130 0 -#endif -#ifndef FXAA_HLSL_3 - #define FXAA_HLSL_3 0 -#endif -#ifndef FXAA_HLSL_4 - #define FXAA_HLSL_4 0 -#endif -/*--------------------------------------------------------------------------*/ -#if FXAA_GLSL_120 - // Requires, - // #version 120 - // #extension GL_EXT_gpu_shader4 : enable - #define int2 ivec2 - #define float2 vec2 - #define float3 vec3 - #define float4 vec4 - #define FxaaBool3 bvec3 - #define FxaaInt2 ivec2 - #define FxaaFloat2 vec2 - #define FxaaFloat3 vec3 - #define FxaaFloat4 vec4 - #define FxaaBool2Float(a) mix(0.0, 1.0, (a)) - #define FxaaPow3(x, y) pow(x, y) - #define FxaaSel3(f, t, b) mix((f), (t), (b)) - #define FxaaTex sampler2D -#endif -/*--------------------------------------------------------------------------*/ -#if FXAA_GLSL_130 - // Requires "#version 130" or better - #define int2 ivec2 - #define float2 vec2 - #define float3 vec3 - #define float4 vec4 - #define FxaaBool3 bvec3 - #define FxaaInt2 ivec2 - #define FxaaFloat2 vec2 - #define FxaaFloat3 vec3 - #define FxaaFloat4 vec4 - #define FxaaBool2Float(a) mix(0.0, 1.0, (a)) - #define FxaaPow3(x, y) pow(x, y) - #define FxaaSel3(f, t, b) mix((f), (t), (b)) - #define FxaaTex sampler2D -#endif -/*--------------------------------------------------------------------------*/ -#if FXAA_HLSL_3 - #define int2 float2 - #define FxaaInt2 float2 - #define FxaaFloat2 float2 - #define FxaaFloat3 float3 - #define FxaaFloat4 float4 - #define FxaaBool2Float(a) (a) - #define FxaaPow3(x, y) pow(x, y) - #define FxaaSel3(f, t, b) ((f)*(!b) + (t)*(b)) - #define FxaaTex sampler2D -#endif -/*--------------------------------------------------------------------------*/ -#if FXAA_HLSL_4 - #define FxaaInt2 int2 - #define FxaaFloat2 float2 - #define FxaaFloat3 float3 - #define FxaaFloat4 float4 - #define FxaaBool2Float(a) (a) - #define FxaaPow3(x, y) pow(x, y) - #define FxaaSel3(f, t, b) ((f)*(!b) + (t)*(b)) - struct FxaaTex { SamplerState smpl; Texture2D tex; }; -#endif -/*--------------------------------------------------------------------------*/ -#define FxaaToFloat3(a) FxaaFloat3((a), (a), (a)) -/*--------------------------------------------------------------------------*/ -half4 _MainTex_ST; - -float4 FxaaTexLod0(FxaaTex tex, float2 pos) { - #if FXAA_GLSL_120 - return texture2DLod(tex, pos.xy, 0.0); - #endif - #if FXAA_GLSL_130 - return textureLod(tex, pos.xy, 0.0); - #endif - #if FXAA_HLSL_3 - return tex2Dlod(tex, float4(UnityStereoScreenSpaceUVAdjust(pos.xy, _MainTex_ST), 0.0, 0.0)); - #endif - #if FXAA_HLSL_4 - return tex.tex.SampleLevel(tex.smpl, UnityStereoScreenSpaceUVAdjust(pos.xy, _MainTex_ST), 0.0); - #endif -} -/*--------------------------------------------------------------------------*/ -float4 FxaaTexGrad(FxaaTex tex, float2 pos, float2 grad) { - #if FXAA_GLSL_120 - return texture2DGrad(tex, pos.xy, grad, grad); - #endif - #if FXAA_GLSL_130 - return textureGrad(tex, pos.xy, grad, grad); - #endif - #if FXAA_HLSL_3 - return tex2Dgrad(tex, UnityStereoScreenSpaceUVAdjust(pos.xy, _MainTex_ST), grad, grad); - #endif - #if FXAA_HLSL_4 - return tex.tex.SampleGrad(tex.smpl, UnityStereoScreenSpaceUVAdjust(pos.xy, _MainTex_ST), grad, grad); - #endif -} -/*--------------------------------------------------------------------------*/ -float4 FxaaTexOff(FxaaTex tex, float2 pos, int2 off, float2 rcpFrame) { - #if FXAA_GLSL_120 - return texture2DLodOffset(tex, pos.xy, 0.0, off.xy); - #endif - #if FXAA_GLSL_130 - return textureLodOffset(tex, pos.xy, 0.0, off.xy); - #endif - #if FXAA_HLSL_3 - return tex2Dlod(tex, float4(UnityStereoScreenSpaceUVAdjust(pos.xy + (off * rcpFrame), _MainTex_ST), 0, 0)); - #endif - #if FXAA_HLSL_4 - return tex.tex.SampleLevel(tex.smpl, UnityStereoScreenSpaceUVAdjust(pos.xy, _MainTex_ST), 0.0, off.xy); - #endif -} - -/*============================================================================ - SRGB KNOBS ------------------------------------------------------------------------------- -FXAA_SRGB_ROP - Set to 1 when applying FXAA to an sRGB back buffer (DX10/11). - This will do the sRGB to linear transform, - as ROP will expect linear color from this shader, - and this shader works in non-linear color. -============================================================================*/ -#define FXAA_SRGB_ROP 0 - -/*============================================================================ - DEBUG KNOBS ------------------------------------------------------------------------------- -All debug knobs draw FXAA-untouched pixels in FXAA computed luma (monochrome). - -FXAA_DEBUG_PASSTHROUGH - Red for pixels which are filtered by FXAA with a - yellow tint on sub-pixel aliasing filtered by FXAA. -FXAA_DEBUG_HORZVERT - Blue for horizontal edges, gold for vertical edges. -FXAA_DEBUG_PAIR - Blue/green for the 2 pixel pair choice. -FXAA_DEBUG_NEGPOS - Red/blue for which side of center of span. -FXAA_DEBUG_OFFSET - Red/blue for -/+ x, gold/skyblue for -/+ y. -============================================================================*/ -#ifndef FXAA_DEBUG_PASSTHROUGH - #define FXAA_DEBUG_PASSTHROUGH 0 -#endif -#ifndef FXAA_DEBUG_HORZVERT - #define FXAA_DEBUG_HORZVERT 0 -#endif -#ifndef FXAA_DEBUG_PAIR - #define FXAA_DEBUG_PAIR 0 -#endif -#ifndef FXAA_DEBUG_NEGPOS - #define FXAA_DEBUG_NEGPOS 0 -#endif -#ifndef FXAA_DEBUG_OFFSET - #define FXAA_DEBUG_OFFSET 0 -#endif -/*--------------------------------------------------------------------------*/ -#if FXAA_DEBUG_PASSTHROUGH || FXAA_DEBUG_HORZVERT || FXAA_DEBUG_PAIR - #define FXAA_DEBUG 1 -#endif -#if FXAA_DEBUG_NEGPOS || FXAA_DEBUG_OFFSET - #define FXAA_DEBUG 1 -#endif -#ifndef FXAA_DEBUG - #define FXAA_DEBUG 0 -#endif - -/*============================================================================ - COMPILE-IN KNOBS ------------------------------------------------------------------------------- -FXAA_PRESET - Choose compile-in knob preset 0-5. ------------------------------------------------------------------------------- -FXAA_EDGE_THRESHOLD - The minimum amount of local contrast required - to apply algorithm. - 1.0/3.0 - too little - 1.0/4.0 - good start - 1.0/8.0 - applies to more edges - 1.0/16.0 - overkill ------------------------------------------------------------------------------- -FXAA_EDGE_THRESHOLD_MIN - Trims the algorithm from processing darks. - Perf optimization. - 1.0/32.0 - visible limit (smaller isn't visible) - 1.0/16.0 - good compromise - 1.0/12.0 - upper limit (seeing artifacts) ------------------------------------------------------------------------------- -FXAA_SEARCH_STEPS - Maximum number of search steps for end of span. ------------------------------------------------------------------------------- -FXAA_SEARCH_ACCELERATION - How much to accelerate search, - 1 - no acceleration - 2 - skip by 2 pixels - 3 - skip by 3 pixels - 4 - skip by 4 pixels ------------------------------------------------------------------------------- -FXAA_SEARCH_THRESHOLD - Controls when to stop searching. - 1.0/4.0 - seems to be the best quality wise ------------------------------------------------------------------------------- -FXAA_SUBPIX_FASTER - Turn on lower quality but faster subpix path. - Not recomended, but used in preset 0. ------------------------------------------------------------------------------- -FXAA_SUBPIX - Toggle subpix filtering. - 0 - turn off - 1 - turn on - 2 - turn on full (ignores FXAA_SUBPIX_TRIM and CAP) ------------------------------------------------------------------------------- -FXAA_SUBPIX_TRIM - Controls sub-pixel aliasing removal. - 1.0/2.0 - low removal - 1.0/3.0 - medium removal - 1.0/4.0 - default removal - 1.0/8.0 - high removal - 0.0 - complete removal ------------------------------------------------------------------------------- -FXAA_SUBPIX_CAP - Insures fine detail is not completely removed. - This is important for the transition of sub-pixel detail, - like fences and wires. - 3.0/4.0 - default (medium amount of filtering) - 7.0/8.0 - high amount of filtering - 1.0 - no capping of sub-pixel aliasing removal -============================================================================*/ -#ifndef FXAA_PRESET - #define FXAA_PRESET 3 -#endif -/*--------------------------------------------------------------------------*/ -#if (FXAA_PRESET == 0) - #define FXAA_EDGE_THRESHOLD (1.0/4.0) - #define FXAA_EDGE_THRESHOLD_MIN (1.0/12.0) - #define FXAA_SEARCH_STEPS 2 - #define FXAA_SEARCH_ACCELERATION 4 - #define FXAA_SEARCH_THRESHOLD (1.0/4.0) - #define FXAA_SUBPIX 1 - #define FXAA_SUBPIX_FASTER 1 - #define FXAA_SUBPIX_CAP (2.0/3.0) - #define FXAA_SUBPIX_TRIM (1.0/4.0) -#endif -/*--------------------------------------------------------------------------*/ -#if (FXAA_PRESET == 1) - #define FXAA_EDGE_THRESHOLD (1.0/8.0) - #define FXAA_EDGE_THRESHOLD_MIN (1.0/16.0) - #define FXAA_SEARCH_STEPS 4 - #define FXAA_SEARCH_ACCELERATION 3 - #define FXAA_SEARCH_THRESHOLD (1.0/4.0) - #define FXAA_SUBPIX 1 - #define FXAA_SUBPIX_FASTER 0 - #define FXAA_SUBPIX_CAP (3.0/4.0) - #define FXAA_SUBPIX_TRIM (1.0/4.0) -#endif -/*--------------------------------------------------------------------------*/ -#if (FXAA_PRESET == 2) - #define FXAA_EDGE_THRESHOLD (1.0/8.0) - #define FXAA_EDGE_THRESHOLD_MIN (1.0/24.0) - #define FXAA_SEARCH_STEPS 8 - #define FXAA_SEARCH_ACCELERATION 2 - #define FXAA_SEARCH_THRESHOLD (1.0/4.0) - #define FXAA_SUBPIX 1 - #define FXAA_SUBPIX_FASTER 0 - #define FXAA_SUBPIX_CAP (3.0/4.0) - #define FXAA_SUBPIX_TRIM (1.0/4.0) -#endif -/*--------------------------------------------------------------------------*/ -#if (FXAA_PRESET == 3) - #define FXAA_EDGE_THRESHOLD (1.0/8.0) - #define FXAA_EDGE_THRESHOLD_MIN (1.0/24.0) - #define FXAA_SEARCH_STEPS 16 - #define FXAA_SEARCH_ACCELERATION 1 - #define FXAA_SEARCH_THRESHOLD (1.0/4.0) - #define FXAA_SUBPIX 1 - #define FXAA_SUBPIX_FASTER 0 - #define FXAA_SUBPIX_CAP (3.0/4.0) - #define FXAA_SUBPIX_TRIM (1.0/4.0) -#endif -/*--------------------------------------------------------------------------*/ -#if (FXAA_PRESET == 4) - #define FXAA_EDGE_THRESHOLD (1.0/8.0) - #define FXAA_EDGE_THRESHOLD_MIN (1.0/24.0) - #define FXAA_SEARCH_STEPS 24 - #define FXAA_SEARCH_ACCELERATION 1 - #define FXAA_SEARCH_THRESHOLD (1.0/4.0) - #define FXAA_SUBPIX 1 - #define FXAA_SUBPIX_FASTER 0 - #define FXAA_SUBPIX_CAP (3.0/4.0) - #define FXAA_SUBPIX_TRIM (1.0/4.0) -#endif -/*--------------------------------------------------------------------------*/ -#if (FXAA_PRESET == 5) - #define FXAA_EDGE_THRESHOLD (1.0/8.0) - #define FXAA_EDGE_THRESHOLD_MIN (1.0/24.0) - #define FXAA_SEARCH_STEPS 32 - #define FXAA_SEARCH_ACCELERATION 1 - #define FXAA_SEARCH_THRESHOLD (1.0/4.0) - #define FXAA_SUBPIX 1 - #define FXAA_SUBPIX_FASTER 0 - #define FXAA_SUBPIX_CAP (3.0/4.0) - #define FXAA_SUBPIX_TRIM (1.0/4.0) -#endif -/*--------------------------------------------------------------------------*/ -#define FXAA_SUBPIX_TRIM_SCALE (1.0/(1.0 - FXAA_SUBPIX_TRIM)) - -/*============================================================================ - HELPERS -============================================================================*/ -// Return the luma, the estimation of luminance from rgb inputs. -// This approximates luma using one FMA instruction, -// skipping normalization and tossing out blue. -// FxaaLuma() will range 0.0 to 2.963210702. -float FxaaLuma(float3 rgb) { - return rgb.y * (0.587/0.299) + rgb.x; } -/*--------------------------------------------------------------------------*/ -float3 FxaaLerp3(float3 a, float3 b, float amountOfA) { - return (FxaaToFloat3(-amountOfA) * b) + - ((a * FxaaToFloat3(amountOfA)) + b); } -/*--------------------------------------------------------------------------*/ -// Support any extra filtering before returning color. -float3 FxaaFilterReturn(float3 rgb) { - #if FXAA_SRGB_ROP - // Do sRGB encoded value to linear conversion. - return FxaaSel3( - rgb * FxaaToFloat3(1.0/12.92), - FxaaPow3( - rgb * FxaaToFloat3(1.0/1.055) + FxaaToFloat3(0.055/1.055), - FxaaToFloat3(2.4)), - rgb > FxaaToFloat3(0.04045)); - #else - return rgb; - #endif -} - -/*============================================================================ - VERTEX SHADER -============================================================================*/ -float2 FxaaVertexShader( -// Both x and y range {-1.0 to 1.0 across screen}. -float2 inPos) { - float2 pos; - pos.xy = (inPos.xy * FxaaFloat2(0.5, 0.5)) + FxaaFloat2(0.5, 0.5); - return pos; } - -/*============================================================================ - - PIXEL SHADER - -============================================================================*/ -float3 FxaaPixelShader( -// Output of FxaaVertexShader interpolated across screen. -// xy -> actual texture position {0.0 to 1.0} -float2 pos, -// Input texture. -FxaaTex tex, -// RCPFRAME SHOULD PIXEL SHADER CONSTANTS!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -// {1.0/frameWidth, 1.0/frameHeight} -float2 rcpFrame) { - -/*---------------------------------------------------------------------------- - EARLY EXIT IF LOCAL CONTRAST BELOW EDGE DETECT LIMIT ------------------------------------------------------------------------------- -Majority of pixels of a typical image do not require filtering, -often pixels are grouped into blocks which could benefit from early exit -right at the beginning of the algorithm. -Given the following neighborhood, - - N - W M E - S - -If the difference in local maximum and minimum luma (contrast "range") -is lower than a threshold proportional to the maximum local luma ("rangeMax"), -then the shader early exits (no visible aliasing). -This threshold is clamped at a minimum value ("FXAA_EDGE_THRESHOLD_MIN") -to avoid processing in really dark areas. -----------------------------------------------------------------------------*/ - float3 rgbN = FxaaTexOff(tex, pos.xy, FxaaInt2( 0,-1), rcpFrame).xyz; - float3 rgbW = FxaaTexOff(tex, pos.xy, FxaaInt2(-1, 0), rcpFrame).xyz; - float3 rgbM = FxaaTexOff(tex, pos.xy, FxaaInt2( 0, 0), rcpFrame).xyz; - float3 rgbE = FxaaTexOff(tex, pos.xy, FxaaInt2( 1, 0), rcpFrame).xyz; - float3 rgbS = FxaaTexOff(tex, pos.xy, FxaaInt2( 0, 1), rcpFrame).xyz; - float lumaN = FxaaLuma(rgbN); - float lumaW = FxaaLuma(rgbW); - float lumaM = FxaaLuma(rgbM); - float lumaE = FxaaLuma(rgbE); - float lumaS = FxaaLuma(rgbS); - float rangeMin = min(lumaM, min(min(lumaN, lumaW), min(lumaS, lumaE))); - float rangeMax = max(lumaM, max(max(lumaN, lumaW), max(lumaS, lumaE))); - float range = rangeMax - rangeMin; - #if FXAA_DEBUG - float lumaO = lumaM / (1.0 + (0.587/0.299)); - #endif - if(range < max(FXAA_EDGE_THRESHOLD_MIN, rangeMax * FXAA_EDGE_THRESHOLD)) { - #if FXAA_DEBUG - return FxaaFilterReturn(FxaaToFloat3(lumaO)); - #endif - return FxaaFilterReturn(rgbM); } - #if FXAA_SUBPIX > 0 - #if FXAA_SUBPIX_FASTER - float3 rgbL = (rgbN + rgbW + rgbE + rgbS + rgbM) * - FxaaToFloat3(1.0/5.0); - #else - float3 rgbL = rgbN + rgbW + rgbM + rgbE + rgbS; - #endif - #endif - -/*---------------------------------------------------------------------------- - COMPUTE LOWPASS ------------------------------------------------------------------------------- -FXAA computes a local neighborhood lowpass value as follows, - - (N + W + E + S)/4 - -Then uses the ratio of the contrast range of the lowpass -and the range found in the early exit check, -as a sub-pixel aliasing detection filter. -When FXAA detects sub-pixel aliasing (such as single pixel dots), -it later blends in "blendL" amount -of a lowpass value (computed in the next section) to the final result. -----------------------------------------------------------------------------*/ - #if FXAA_SUBPIX != 0 - float lumaL = (lumaN + lumaW + lumaE + lumaS) * 0.25; - float rangeL = abs(lumaL - lumaM); - #endif - #if FXAA_SUBPIX == 1 - float blendL = max(0.0, - (rangeL / range) - FXAA_SUBPIX_TRIM) * FXAA_SUBPIX_TRIM_SCALE; - blendL = min(FXAA_SUBPIX_CAP, blendL); - #endif - #if FXAA_SUBPIX == 2 - float blendL = rangeL / range; - #endif - #if FXAA_DEBUG_PASSTHROUGH - #if FXAA_SUBPIX == 0 - float blendL = 0.0; - #endif - return FxaaFilterReturn( - FxaaFloat3(1.0, blendL/FXAA_SUBPIX_CAP, 0.0)); - #endif - -/*---------------------------------------------------------------------------- - CHOOSE VERTICAL OR HORIZONTAL SEARCH ------------------------------------------------------------------------------- -FXAA uses the following local neighborhood, - - NW N NE - W M E - SW S SE - -To compute an edge amount for both vertical and horizontal directions. -Note edge detect filters like Sobel fail on single pixel lines through M. -FXAA takes the weighted average magnitude of the high-pass values -for rows and columns as an indication of local edge amount. - -A lowpass value for anti-sub-pixel-aliasing is computed as - (N+W+E+S+M+NW+NE+SW+SE)/9. -This full box pattern has higher quality than other options. - -Note following this block, both vertical and horizontal cases -flow in parallel (reusing the horizontal variables). -----------------------------------------------------------------------------*/ - float3 rgbNW = FxaaTexOff(tex, pos.xy, FxaaInt2(-1,-1), rcpFrame).xyz; - float3 rgbNE = FxaaTexOff(tex, pos.xy, FxaaInt2( 1,-1), rcpFrame).xyz; - float3 rgbSW = FxaaTexOff(tex, pos.xy, FxaaInt2(-1, 1), rcpFrame).xyz; - float3 rgbSE = FxaaTexOff(tex, pos.xy, FxaaInt2( 1, 1), rcpFrame).xyz; - #if (FXAA_SUBPIX_FASTER == 0) && (FXAA_SUBPIX > 0) - rgbL += (rgbNW + rgbNE + rgbSW + rgbSE); - rgbL *= FxaaToFloat3(1.0/9.0); - #endif - float lumaNW = FxaaLuma(rgbNW); - float lumaNE = FxaaLuma(rgbNE); - float lumaSW = FxaaLuma(rgbSW); - float lumaSE = FxaaLuma(rgbSE); - float edgeVert = - abs((0.25 * lumaNW) + (-0.5 * lumaN) + (0.25 * lumaNE)) + - abs((0.50 * lumaW ) + (-1.0 * lumaM) + (0.50 * lumaE )) + - abs((0.25 * lumaSW) + (-0.5 * lumaS) + (0.25 * lumaSE)); - float edgeHorz = - abs((0.25 * lumaNW) + (-0.5 * lumaW) + (0.25 * lumaSW)) + - abs((0.50 * lumaN ) + (-1.0 * lumaM) + (0.50 * lumaS )) + - abs((0.25 * lumaNE) + (-0.5 * lumaE) + (0.25 * lumaSE)); - bool horzSpan = edgeHorz >= edgeVert; - #if FXAA_DEBUG_HORZVERT - if(horzSpan) return FxaaFilterReturn(FxaaFloat3(1.0, 0.75, 0.0)); - else return FxaaFilterReturn(FxaaFloat3(0.0, 0.50, 1.0)); - #endif - float lengthSign = horzSpan ? -rcpFrame.y : -rcpFrame.x; - if(!horzSpan) lumaN = lumaW; - if(!horzSpan) lumaS = lumaE; - float gradientN = abs(lumaN - lumaM); - float gradientS = abs(lumaS - lumaM); - lumaN = (lumaN + lumaM) * 0.5; - lumaS = (lumaS + lumaM) * 0.5; - -/*---------------------------------------------------------------------------- - CHOOSE SIDE OF PIXEL WHERE GRADIENT IS HIGHEST ------------------------------------------------------------------------------- -This chooses a pixel pair. -For "horzSpan == true" this will be a vertical pair, - - [N] N - [M] or [M] - S [S] - -Note following this block, both {N,M} and {S,M} cases -flow in parallel (reusing the {N,M} variables). - -This pair of image rows or columns is searched below -in the positive and negative direction -until edge status changes -(or the maximum number of search steps is reached). -----------------------------------------------------------------------------*/ - bool pairN = gradientN >= gradientS; - #if FXAA_DEBUG_PAIR - if(pairN) return FxaaFilterReturn(FxaaFloat3(0.0, 0.0, 1.0)); - else return FxaaFilterReturn(FxaaFloat3(0.0, 1.0, 0.0)); - #endif - if(!pairN) lumaN = lumaS; - if(!pairN) gradientN = gradientS; - if(!pairN) lengthSign *= -1.0; - float2 posN; - posN.x = pos.x + (horzSpan ? 0.0 : lengthSign * 0.5); - posN.y = pos.y + (horzSpan ? lengthSign * 0.5 : 0.0); - -/*---------------------------------------------------------------------------- - CHOOSE SEARCH LIMITING VALUES ------------------------------------------------------------------------------- -Search limit (+/- gradientN) is a function of local gradient. -----------------------------------------------------------------------------*/ - gradientN *= FXAA_SEARCH_THRESHOLD; - -/*---------------------------------------------------------------------------- - SEARCH IN BOTH DIRECTIONS UNTIL FIND LUMA PAIR AVERAGE IS OUT OF RANGE ------------------------------------------------------------------------------- -This loop searches either in vertical or horizontal directions, -and in both the negative and positive direction in parallel. -This loop fusion is faster than searching separately. - -The search is accelerated using FXAA_SEARCH_ACCELERATION length box filter -via anisotropic filtering with specified texture gradients. -----------------------------------------------------------------------------*/ - float2 posP = posN; - float2 offNP = horzSpan ? - FxaaFloat2(rcpFrame.x, 0.0) : - FxaaFloat2(0.0f, rcpFrame.y); - float lumaEndN = lumaN; - float lumaEndP = lumaN; - bool doneN = false; - bool doneP = false; - #if FXAA_SEARCH_ACCELERATION == 1 - posN += offNP * FxaaFloat2(-1.0, -1.0); - posP += offNP * FxaaFloat2( 1.0, 1.0); - #endif - #if FXAA_SEARCH_ACCELERATION == 2 - posN += offNP * FxaaFloat2(-1.5, -1.5); - posP += offNP * FxaaFloat2( 1.5, 1.5); - offNP *= FxaaFloat2(2.0, 2.0); - #endif - #if FXAA_SEARCH_ACCELERATION == 3 - posN += offNP * FxaaFloat2(-2.0, -2.0); - posP += offNP * FxaaFloat2( 2.0, 2.0); - offNP *= FxaaFloat2(3.0, 3.0); - #endif - #if FXAA_SEARCH_ACCELERATION == 4 - posN += offNP * FxaaFloat2(-2.5, -2.5); - posP += offNP * FxaaFloat2( 2.5, 2.5); - offNP *= FxaaFloat2(4.0, 4.0); - #endif - for(int i = 0; i < FXAA_SEARCH_STEPS; i++) { - #if FXAA_SEARCH_ACCELERATION == 1 - if(!doneN) lumaEndN = - FxaaLuma(FxaaTexLod0(tex, posN.xy).xyz); - if(!doneP) lumaEndP = - FxaaLuma(FxaaTexLod0(tex, posP.xy).xyz); - #else - if(!doneN) lumaEndN = - FxaaLuma(FxaaTexGrad(tex, posN.xy, offNP).xyz); - if(!doneP) lumaEndP = - FxaaLuma(FxaaTexGrad(tex, posP.xy, offNP).xyz); - #endif - doneN = doneN || (abs(lumaEndN - lumaN) >= gradientN); - doneP = doneP || (abs(lumaEndP - lumaN) >= gradientN); - if(doneN && doneP) break; - if(!doneN) posN -= offNP; - if(!doneP) posP += offNP; } - -/*---------------------------------------------------------------------------- - HANDLE IF CENTER IS ON POSITIVE OR NEGATIVE SIDE ------------------------------------------------------------------------------- -FXAA uses the pixel's position in the span -in combination with the values (lumaEnd*) at the ends of the span, -to determine filtering. - -This step computes which side of the span the pixel is on. -On negative side if dstN < dstP, - - posN pos posP - |-----------|------|------------------| - | | | | - |<--dstN--->|<---------dstP---------->| - | - span center - -----------------------------------------------------------------------------*/ - float dstN = horzSpan ? pos.x - posN.x : pos.y - posN.y; - float dstP = horzSpan ? posP.x - pos.x : posP.y - pos.y; - bool directionN = dstN < dstP; - #if FXAA_DEBUG_NEGPOS - if(directionN) return FxaaFilterReturn(FxaaFloat3(1.0, 0.0, 0.0)); - else return FxaaFilterReturn(FxaaFloat3(0.0, 0.0, 1.0)); - #endif - lumaEndN = directionN ? lumaEndN : lumaEndP; - -/*---------------------------------------------------------------------------- - CHECK IF PIXEL IS IN SECTION OF SPAN WHICH GETS NO FILTERING ------------------------------------------------------------------------------- -If both the pair luma at the end of the span (lumaEndN) -and middle pixel luma (lumaM) -are on the same side of the middle pair average luma (lumaN), -then don't filter. - -Cases, - -(1.) "L", - - lumaM - | - V XXXXXXXX <- other line averaged - XXXXXXX[X]XXXXXXXXXXX <- source pixel line - | . | - -------------------------- - [ ]xxxxxx[x]xx[X]XXXXXX <- pair average - -------------------------- - ^ ^ ^ ^ - | | | | - . |<---->|<---------- no filter region - . | | | - . center | | - . | lumaEndN - . | . - . lumaN . - . . - |<--- span -->| - - -(2.) "^" and "-", - - <- other line averaged - XXXXX[X]XXX <- source pixel line - | | | - -------------------------- - [ ]xxxx[x]xx[ ] <- pair average - -------------------------- - | | | - |<--->|<--->|<---------- filter both sides - - -(3.) "v" and inverse of "-", - - XXXXXX XXXXXXXXX <- other line averaged - XXXXXXXXXXX[X]XXXXXXXXXXXX <- source pixel line - | | | - -------------------------- - XXXX[X]xxxx[x]xx[X]XXXXXXX <- pair average - -------------------------- - | | | - |<--->|<--->|<---------- don't filter both! - - -Note the "v" case for FXAA requires no filtering. -This is because the inverse of the "-" case is the "v". -Filtering "v" case turns open spans like this, - - XXXXXXXXX - -Into this (which is not desired), - - x+. .+x - XXXXXXXXX - -----------------------------------------------------------------------------*/ - if(((lumaM - lumaN) < 0.0) == ((lumaEndN - lumaN) < 0.0)) - lengthSign = 0.0; - -/*---------------------------------------------------------------------------- - COMPUTE SUB-PIXEL OFFSET AND FILTER SPAN ------------------------------------------------------------------------------- -FXAA filters using a bilinear texture fetch offset -from the middle pixel M towards the center of the pair (NM below). -Maximum filtering will be half way between pair. -Reminder, at this point in the code, -the {N,M} pair is also reused for all cases: {S,M}, {W,M}, and {E,M}. - - +-------+ - | | 0.5 offset - | N | | - | | V - +-------+....--- - | | - | M...|....--- - | | ^ - +-------+ | - . . 0.0 offset - . S . - . . - ......... - -Position on span is used to compute sub-pixel filter offset using simple ramp, - - posN posP - |\ |<------- 0.5 pixel offset into pair pixel - | \ | - | \ | - ---.......|...\..........|<------- 0.25 pixel offset into pair pixel - ^ | ^\ | - | | | \ | - V | | \ | - ---.......|===|==========|<------- 0.0 pixel offset (ie M pixel) - ^ . | ^ . - | . pos | . - | . . | . - | . . center . - | . . . - | |<->|<---------.-------- dstN - | . . . - | . |<-------->|<------- dstP - | . . - | |<------------>|<------- spanLength - | - subPixelOffset - -----------------------------------------------------------------------------*/ - float spanLength = (dstP + dstN); - dstN = directionN ? dstN : dstP; - float subPixelOffset = (0.5 + (dstN * (-1.0/spanLength))) * lengthSign; - #if FXAA_DEBUG_OFFSET - float ox = horzSpan ? 0.0 : subPixelOffset*2.0/rcpFrame.x; - float oy = horzSpan ? subPixelOffset*2.0/rcpFrame.y : 0.0; - if(ox < 0.0) return FxaaFilterReturn( - FxaaLerp3(FxaaToFloat3(lumaO), - FxaaFloat3(1.0, 0.0, 0.0), -ox)); - if(ox > 0.0) return FxaaFilterReturn( - FxaaLerp3(FxaaToFloat3(lumaO), - FxaaFloat3(0.0, 0.0, 1.0), ox)); - if(oy < 0.0) return FxaaFilterReturn( - FxaaLerp3(FxaaToFloat3(lumaO), - FxaaFloat3(1.0, 0.6, 0.2), -oy)); - if(oy > 0.0) return FxaaFilterReturn( - FxaaLerp3(FxaaToFloat3(lumaO), - FxaaFloat3(0.2, 0.6, 1.0), oy)); - return FxaaFilterReturn(FxaaFloat3(lumaO, lumaO, lumaO)); - #endif - float3 rgbF = FxaaTexLod0(tex, FxaaFloat2( - pos.x + (horzSpan ? 0.0 : subPixelOffset), - pos.y + (horzSpan ? subPixelOffset : 0.0))).xyz; - #if FXAA_SUBPIX == 0 - return FxaaFilterReturn(rgbF); - #else - return FxaaFilterReturn(FxaaLerp3(rgbL, rgbF, blendL)); - #endif -} - - - -struct v2f { - float4 pos : SV_POSITION; - float2 uv : TEXCOORD0; -}; - -v2f vert (appdata_img v) -{ - v2f o; - o.pos = UnityObjectToClipPos (v.vertex); - o.uv = v.texcoord.xy; - return o; -} - -sampler2D _MainTex; -float4 _MainTex_TexelSize; - -float4 frag (v2f i) : SV_Target -{ - return float4(FxaaPixelShader(i.uv.xy, _MainTex, _MainTex_TexelSize.xy).xyz, 0.0f); -} - -ENDCG - } -} - -Fallback "Hidden/FXAA II" -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_Antialiasing/FXAAPreset2.shader.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_Antialiasing/FXAAPreset2.shader.meta deleted file mode 100644 index a0d603d..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_Antialiasing/FXAAPreset2.shader.meta +++ /dev/null @@ -1,4 +0,0 @@ -fileFormatVersion: 2 -guid: 6f1418cffd12146f2a83be795f6fa5a7 -ShaderImporter: - userData: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_Antialiasing/FXAAPreset3.shader b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_Antialiasing/FXAAPreset3.shader deleted file mode 100644 index e93f454..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_Antialiasing/FXAAPreset3.shader +++ /dev/null @@ -1,830 +0,0 @@ -// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' - -Shader "Hidden/FXAA Preset 3" { -Properties { - _MainTex ("Base (RGB)", 2D) = "white" {} -} - -SubShader { - Pass { - ZTest Always Cull Off ZWrite Off - -CGPROGRAM -#pragma vertex vert -#pragma fragment frag -#include "UnityCG.cginc" -#pragma target 3.0 - -// Not very practical on consoles/mobile, and PS3 Cg takes ages to compile this :( -#pragma exclude_renderers xbox360 ps3 gles - -#define FXAA_HLSL_3 1 -#define FXAA_PRESET 3 - - -// Copyright (c) 2010 NVIDIA Corporation. All rights reserved. -// -// TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THIS SOFTWARE IS PROVIDED -// *AS IS* AND NVIDIA AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES, EITHER EXPRESS -// OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY -// AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL NVIDIA OR ITS SUPPLIERS -// BE LIABLE FOR ANY SPECIAL, INCIDENTAL, INDIRECT, OR CONSEQUENTIAL DAMAGES -// WHATSOEVER (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF BUSINESS PROFITS, -// BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR ANY OTHER PECUNIARY LOSS) -// ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF NVIDIA HAS -// BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - -/*============================================================================ - - FXAA - -============================================================================*/ - -/*============================================================================ - API PORTING -============================================================================*/ -#ifndef FXAA_GLSL_120 - #define FXAA_GLSL_120 0 -#endif -#ifndef FXAA_GLSL_130 - #define FXAA_GLSL_130 0 -#endif -#ifndef FXAA_HLSL_3 - #define FXAA_HLSL_3 0 -#endif -#ifndef FXAA_HLSL_4 - #define FXAA_HLSL_4 0 -#endif -/*--------------------------------------------------------------------------*/ -#if FXAA_GLSL_120 - // Requires, - // #version 120 - // #extension GL_EXT_gpu_shader4 : enable - #define int2 ivec2 - #define float2 vec2 - #define float3 vec3 - #define float4 vec4 - #define FxaaBool3 bvec3 - #define FxaaInt2 ivec2 - #define FxaaFloat2 vec2 - #define FxaaFloat3 vec3 - #define FxaaFloat4 vec4 - #define FxaaBool2Float(a) mix(0.0, 1.0, (a)) - #define FxaaPow3(x, y) pow(x, y) - #define FxaaSel3(f, t, b) mix((f), (t), (b)) - #define FxaaTex sampler2D -#endif -/*--------------------------------------------------------------------------*/ -#if FXAA_GLSL_130 - // Requires "#version 130" or better - #define int2 ivec2 - #define float2 vec2 - #define float3 vec3 - #define float4 vec4 - #define FxaaBool3 bvec3 - #define FxaaInt2 ivec2 - #define FxaaFloat2 vec2 - #define FxaaFloat3 vec3 - #define FxaaFloat4 vec4 - #define FxaaBool2Float(a) mix(0.0, 1.0, (a)) - #define FxaaPow3(x, y) pow(x, y) - #define FxaaSel3(f, t, b) mix((f), (t), (b)) - #define FxaaTex sampler2D -#endif -/*--------------------------------------------------------------------------*/ -#if FXAA_HLSL_3 - #define int2 float2 - #define FxaaInt2 float2 - #define FxaaFloat2 float2 - #define FxaaFloat3 float3 - #define FxaaFloat4 float4 - #define FxaaBool2Float(a) (a) - #define FxaaPow3(x, y) pow(x, y) - #define FxaaSel3(f, t, b) ((f)*(!b) + (t)*(b)) - #define FxaaTex sampler2D -#endif -/*--------------------------------------------------------------------------*/ -#if FXAA_HLSL_4 - #define FxaaInt2 int2 - #define FxaaFloat2 float2 - #define FxaaFloat3 float3 - #define FxaaFloat4 float4 - #define FxaaBool2Float(a) (a) - #define FxaaPow3(x, y) pow(x, y) - #define FxaaSel3(f, t, b) ((f)*(!b) + (t)*(b)) - struct FxaaTex { SamplerState smpl; Texture2D tex; }; -#endif -/*--------------------------------------------------------------------------*/ -#define FxaaToFloat3(a) FxaaFloat3((a), (a), (a)) -/*--------------------------------------------------------------------------*/ -half4 _MainTex_ST; - -float4 FxaaTexLod0(FxaaTex tex, float2 pos) { - #if FXAA_GLSL_120 - return texture2DLod(tex, pos.xy, 0.0); - #endif - #if FXAA_GLSL_130 - return textureLod(tex, pos.xy, 0.0); - #endif - #if FXAA_HLSL_3 - return tex2Dlod(tex, float4(UnityStereoScreenSpaceUVAdjust(pos.xy, _MainTex_ST), 0.0, 0.0)); - #endif - #if FXAA_HLSL_4 - return tex.tex.SampleLevel(tex.smpl, UnityStereoScreenSpaceUVAdjust(pos.xy, _MainTex_ST), 0.0); - #endif -} -/*--------------------------------------------------------------------------*/ -float4 FxaaTexGrad(FxaaTex tex, float2 pos, float2 grad) { - #if FXAA_GLSL_120 - return texture2DGrad(tex, pos.xy, grad, grad); - #endif - #if FXAA_GLSL_130 - return textureGrad(tex, pos.xy, grad, grad); - #endif - #if FXAA_HLSL_3 - return tex2Dgrad(tex, UnityStereoScreenSpaceUVAdjust(pos.xy, _MainTex_ST), grad, grad); - #endif - #if FXAA_HLSL_4 - return tex.tex.SampleGrad(tex.smpl, UnityStereoScreenSpaceUVAdjust(pos.xy, _MainTex_ST), grad, grad); - #endif -} -/*--------------------------------------------------------------------------*/ -float4 FxaaTexOff(FxaaTex tex, float2 pos, int2 off, float2 rcpFrame) { - #if FXAA_GLSL_120 - return texture2DLodOffset(tex, pos.xy, 0.0, off.xy); - #endif - #if FXAA_GLSL_130 - return textureLodOffset(tex, pos.xy, 0.0, off.xy); - #endif - #if FXAA_HLSL_3 - return tex2Dlod(tex, float4(UnityStereoScreenSpaceUVAdjust(pos.xy + (off * rcpFrame), _MainTex_ST), 0, 0)); - #endif - #if FXAA_HLSL_4 - return tex.tex.SampleLevel(tex.smpl, UnityStereoScreenSpaceUVAdjust(pos.xy, _MainTex_ST), 0.0, off.xy); - #endif -} - -/*============================================================================ - SRGB KNOBS ------------------------------------------------------------------------------- -FXAA_SRGB_ROP - Set to 1 when applying FXAA to an sRGB back buffer (DX10/11). - This will do the sRGB to linear transform, - as ROP will expect linear color from this shader, - and this shader works in non-linear color. -============================================================================*/ -#define FXAA_SRGB_ROP 0 - -/*============================================================================ - DEBUG KNOBS ------------------------------------------------------------------------------- -All debug knobs draw FXAA-untouched pixels in FXAA computed luma (monochrome). - -FXAA_DEBUG_PASSTHROUGH - Red for pixels which are filtered by FXAA with a - yellow tint on sub-pixel aliasing filtered by FXAA. -FXAA_DEBUG_HORZVERT - Blue for horizontal edges, gold for vertical edges. -FXAA_DEBUG_PAIR - Blue/green for the 2 pixel pair choice. -FXAA_DEBUG_NEGPOS - Red/blue for which side of center of span. -FXAA_DEBUG_OFFSET - Red/blue for -/+ x, gold/skyblue for -/+ y. -============================================================================*/ -#ifndef FXAA_DEBUG_PASSTHROUGH - #define FXAA_DEBUG_PASSTHROUGH 0 -#endif -#ifndef FXAA_DEBUG_HORZVERT - #define FXAA_DEBUG_HORZVERT 0 -#endif -#ifndef FXAA_DEBUG_PAIR - #define FXAA_DEBUG_PAIR 0 -#endif -#ifndef FXAA_DEBUG_NEGPOS - #define FXAA_DEBUG_NEGPOS 0 -#endif -#ifndef FXAA_DEBUG_OFFSET - #define FXAA_DEBUG_OFFSET 0 -#endif -/*--------------------------------------------------------------------------*/ -#if FXAA_DEBUG_PASSTHROUGH || FXAA_DEBUG_HORZVERT || FXAA_DEBUG_PAIR - #define FXAA_DEBUG 1 -#endif -#if FXAA_DEBUG_NEGPOS || FXAA_DEBUG_OFFSET - #define FXAA_DEBUG 1 -#endif -#ifndef FXAA_DEBUG - #define FXAA_DEBUG 0 -#endif - -/*============================================================================ - COMPILE-IN KNOBS ------------------------------------------------------------------------------- -FXAA_PRESET - Choose compile-in knob preset 0-5. ------------------------------------------------------------------------------- -FXAA_EDGE_THRESHOLD - The minimum amount of local contrast required - to apply algorithm. - 1.0/3.0 - too little - 1.0/4.0 - good start - 1.0/8.0 - applies to more edges - 1.0/16.0 - overkill ------------------------------------------------------------------------------- -FXAA_EDGE_THRESHOLD_MIN - Trims the algorithm from processing darks. - Perf optimization. - 1.0/32.0 - visible limit (smaller isn't visible) - 1.0/16.0 - good compromise - 1.0/12.0 - upper limit (seeing artifacts) ------------------------------------------------------------------------------- -FXAA_SEARCH_STEPS - Maximum number of search steps for end of span. ------------------------------------------------------------------------------- -FXAA_SEARCH_ACCELERATION - How much to accelerate search, - 1 - no acceleration - 2 - skip by 2 pixels - 3 - skip by 3 pixels - 4 - skip by 4 pixels ------------------------------------------------------------------------------- -FXAA_SEARCH_THRESHOLD - Controls when to stop searching. - 1.0/4.0 - seems to be the best quality wise ------------------------------------------------------------------------------- -FXAA_SUBPIX_FASTER - Turn on lower quality but faster subpix path. - Not recomended, but used in preset 0. ------------------------------------------------------------------------------- -FXAA_SUBPIX - Toggle subpix filtering. - 0 - turn off - 1 - turn on - 2 - turn on full (ignores FXAA_SUBPIX_TRIM and CAP) ------------------------------------------------------------------------------- -FXAA_SUBPIX_TRIM - Controls sub-pixel aliasing removal. - 1.0/2.0 - low removal - 1.0/3.0 - medium removal - 1.0/4.0 - default removal - 1.0/8.0 - high removal - 0.0 - complete removal ------------------------------------------------------------------------------- -FXAA_SUBPIX_CAP - Insures fine detail is not completely removed. - This is important for the transition of sub-pixel detail, - like fences and wires. - 3.0/4.0 - default (medium amount of filtering) - 7.0/8.0 - high amount of filtering - 1.0 - no capping of sub-pixel aliasing removal -============================================================================*/ -#ifndef FXAA_PRESET - #define FXAA_PRESET 3 -#endif -/*--------------------------------------------------------------------------*/ -#if (FXAA_PRESET == 0) - #define FXAA_EDGE_THRESHOLD (1.0/4.0) - #define FXAA_EDGE_THRESHOLD_MIN (1.0/12.0) - #define FXAA_SEARCH_STEPS 2 - #define FXAA_SEARCH_ACCELERATION 4 - #define FXAA_SEARCH_THRESHOLD (1.0/4.0) - #define FXAA_SUBPIX 1 - #define FXAA_SUBPIX_FASTER 1 - #define FXAA_SUBPIX_CAP (2.0/3.0) - #define FXAA_SUBPIX_TRIM (1.0/4.0) -#endif -/*--------------------------------------------------------------------------*/ -#if (FXAA_PRESET == 1) - #define FXAA_EDGE_THRESHOLD (1.0/8.0) - #define FXAA_EDGE_THRESHOLD_MIN (1.0/16.0) - #define FXAA_SEARCH_STEPS 4 - #define FXAA_SEARCH_ACCELERATION 3 - #define FXAA_SEARCH_THRESHOLD (1.0/4.0) - #define FXAA_SUBPIX 1 - #define FXAA_SUBPIX_FASTER 0 - #define FXAA_SUBPIX_CAP (3.0/4.0) - #define FXAA_SUBPIX_TRIM (1.0/4.0) -#endif -/*--------------------------------------------------------------------------*/ -#if (FXAA_PRESET == 2) - #define FXAA_EDGE_THRESHOLD (1.0/8.0) - #define FXAA_EDGE_THRESHOLD_MIN (1.0/24.0) - #define FXAA_SEARCH_STEPS 8 - #define FXAA_SEARCH_ACCELERATION 2 - #define FXAA_SEARCH_THRESHOLD (1.0/4.0) - #define FXAA_SUBPIX 1 - #define FXAA_SUBPIX_FASTER 0 - #define FXAA_SUBPIX_CAP (3.0/4.0) - #define FXAA_SUBPIX_TRIM (1.0/4.0) -#endif -/*--------------------------------------------------------------------------*/ -#if (FXAA_PRESET == 3) - #define FXAA_EDGE_THRESHOLD (1.0/8.0) - #define FXAA_EDGE_THRESHOLD_MIN (1.0/24.0) - #define FXAA_SEARCH_STEPS 16 - #define FXAA_SEARCH_ACCELERATION 1 - #define FXAA_SEARCH_THRESHOLD (1.0/4.0) - #define FXAA_SUBPIX 1 - #define FXAA_SUBPIX_FASTER 0 - #define FXAA_SUBPIX_CAP (3.0/4.0) - #define FXAA_SUBPIX_TRIM (1.0/4.0) -#endif -/*--------------------------------------------------------------------------*/ -#if (FXAA_PRESET == 4) - #define FXAA_EDGE_THRESHOLD (1.0/8.0) - #define FXAA_EDGE_THRESHOLD_MIN (1.0/24.0) - #define FXAA_SEARCH_STEPS 24 - #define FXAA_SEARCH_ACCELERATION 1 - #define FXAA_SEARCH_THRESHOLD (1.0/4.0) - #define FXAA_SUBPIX 1 - #define FXAA_SUBPIX_FASTER 0 - #define FXAA_SUBPIX_CAP (3.0/4.0) - #define FXAA_SUBPIX_TRIM (1.0/4.0) -#endif -/*--------------------------------------------------------------------------*/ -#if (FXAA_PRESET == 5) - #define FXAA_EDGE_THRESHOLD (1.0/8.0) - #define FXAA_EDGE_THRESHOLD_MIN (1.0/24.0) - #define FXAA_SEARCH_STEPS 32 - #define FXAA_SEARCH_ACCELERATION 1 - #define FXAA_SEARCH_THRESHOLD (1.0/4.0) - #define FXAA_SUBPIX 1 - #define FXAA_SUBPIX_FASTER 0 - #define FXAA_SUBPIX_CAP (3.0/4.0) - #define FXAA_SUBPIX_TRIM (1.0/4.0) -#endif -/*--------------------------------------------------------------------------*/ -#define FXAA_SUBPIX_TRIM_SCALE (1.0/(1.0 - FXAA_SUBPIX_TRIM)) - -/*============================================================================ - HELPERS -============================================================================*/ -// Return the luma, the estimation of luminance from rgb inputs. -// This approximates luma using one FMA instruction, -// skipping normalization and tossing out blue. -// FxaaLuma() will range 0.0 to 2.963210702. -float FxaaLuma(float3 rgb) { - return rgb.y * (0.587/0.299) + rgb.x; } -/*--------------------------------------------------------------------------*/ -float3 FxaaLerp3(float3 a, float3 b, float amountOfA) { - return (FxaaToFloat3(-amountOfA) * b) + - ((a * FxaaToFloat3(amountOfA)) + b); } -/*--------------------------------------------------------------------------*/ -// Support any extra filtering before returning color. -float3 FxaaFilterReturn(float3 rgb) { - #if FXAA_SRGB_ROP - // Do sRGB encoded value to linear conversion. - return FxaaSel3( - rgb * FxaaToFloat3(1.0/12.92), - FxaaPow3( - rgb * FxaaToFloat3(1.0/1.055) + FxaaToFloat3(0.055/1.055), - FxaaToFloat3(2.4)), - rgb > FxaaToFloat3(0.04045)); - #else - return rgb; - #endif -} - -/*============================================================================ - VERTEX SHADER -============================================================================*/ -float2 FxaaVertexShader( -// Both x and y range {-1.0 to 1.0 across screen}. -float2 inPos) { - float2 pos; - pos.xy = (inPos.xy * FxaaFloat2(0.5, 0.5)) + FxaaFloat2(0.5, 0.5); - return pos; } - -/*============================================================================ - - PIXEL SHADER - -============================================================================*/ -float3 FxaaPixelShader( -// Output of FxaaVertexShader interpolated across screen. -// xy -> actual texture position {0.0 to 1.0} -float2 pos, -// Input texture. -FxaaTex tex, -// RCPFRAME SHOULD PIXEL SHADER CONSTANTS!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -// {1.0/frameWidth, 1.0/frameHeight} -float2 rcpFrame) { - -/*---------------------------------------------------------------------------- - EARLY EXIT IF LOCAL CONTRAST BELOW EDGE DETECT LIMIT ------------------------------------------------------------------------------- -Majority of pixels of a typical image do not require filtering, -often pixels are grouped into blocks which could benefit from early exit -right at the beginning of the algorithm. -Given the following neighborhood, - - N - W M E - S - -If the difference in local maximum and minimum luma (contrast "range") -is lower than a threshold proportional to the maximum local luma ("rangeMax"), -then the shader early exits (no visible aliasing). -This threshold is clamped at a minimum value ("FXAA_EDGE_THRESHOLD_MIN") -to avoid processing in really dark areas. -----------------------------------------------------------------------------*/ - float3 rgbN = FxaaTexOff(tex, pos.xy, FxaaInt2( 0,-1), rcpFrame).xyz; - float3 rgbW = FxaaTexOff(tex, pos.xy, FxaaInt2(-1, 0), rcpFrame).xyz; - float3 rgbM = FxaaTexOff(tex, pos.xy, FxaaInt2( 0, 0), rcpFrame).xyz; - float3 rgbE = FxaaTexOff(tex, pos.xy, FxaaInt2( 1, 0), rcpFrame).xyz; - float3 rgbS = FxaaTexOff(tex, pos.xy, FxaaInt2( 0, 1), rcpFrame).xyz; - float lumaN = FxaaLuma(rgbN); - float lumaW = FxaaLuma(rgbW); - float lumaM = FxaaLuma(rgbM); - float lumaE = FxaaLuma(rgbE); - float lumaS = FxaaLuma(rgbS); - float rangeMin = min(lumaM, min(min(lumaN, lumaW), min(lumaS, lumaE))); - float rangeMax = max(lumaM, max(max(lumaN, lumaW), max(lumaS, lumaE))); - float range = rangeMax - rangeMin; - #if FXAA_DEBUG - float lumaO = lumaM / (1.0 + (0.587/0.299)); - #endif - if(range < max(FXAA_EDGE_THRESHOLD_MIN, rangeMax * FXAA_EDGE_THRESHOLD)) { - #if FXAA_DEBUG - return FxaaFilterReturn(FxaaToFloat3(lumaO)); - #endif - return FxaaFilterReturn(rgbM); } - #if FXAA_SUBPIX > 0 - #if FXAA_SUBPIX_FASTER - float3 rgbL = (rgbN + rgbW + rgbE + rgbS + rgbM) * - FxaaToFloat3(1.0/5.0); - #else - float3 rgbL = rgbN + rgbW + rgbM + rgbE + rgbS; - #endif - #endif - -/*---------------------------------------------------------------------------- - COMPUTE LOWPASS ------------------------------------------------------------------------------- -FXAA computes a local neighborhood lowpass value as follows, - - (N + W + E + S)/4 - -Then uses the ratio of the contrast range of the lowpass -and the range found in the early exit check, -as a sub-pixel aliasing detection filter. -When FXAA detects sub-pixel aliasing (such as single pixel dots), -it later blends in "blendL" amount -of a lowpass value (computed in the next section) to the final result. -----------------------------------------------------------------------------*/ - #if FXAA_SUBPIX != 0 - float lumaL = (lumaN + lumaW + lumaE + lumaS) * 0.25; - float rangeL = abs(lumaL - lumaM); - #endif - #if FXAA_SUBPIX == 1 - float blendL = max(0.0, - (rangeL / range) - FXAA_SUBPIX_TRIM) * FXAA_SUBPIX_TRIM_SCALE; - blendL = min(FXAA_SUBPIX_CAP, blendL); - #endif - #if FXAA_SUBPIX == 2 - float blendL = rangeL / range; - #endif - #if FXAA_DEBUG_PASSTHROUGH - #if FXAA_SUBPIX == 0 - float blendL = 0.0; - #endif - return FxaaFilterReturn( - FxaaFloat3(1.0, blendL/FXAA_SUBPIX_CAP, 0.0)); - #endif - -/*---------------------------------------------------------------------------- - CHOOSE VERTICAL OR HORIZONTAL SEARCH ------------------------------------------------------------------------------- -FXAA uses the following local neighborhood, - - NW N NE - W M E - SW S SE - -To compute an edge amount for both vertical and horizontal directions. -Note edge detect filters like Sobel fail on single pixel lines through M. -FXAA takes the weighted average magnitude of the high-pass values -for rows and columns as an indication of local edge amount. - -A lowpass value for anti-sub-pixel-aliasing is computed as - (N+W+E+S+M+NW+NE+SW+SE)/9. -This full box pattern has higher quality than other options. - -Note following this block, both vertical and horizontal cases -flow in parallel (reusing the horizontal variables). -----------------------------------------------------------------------------*/ - float3 rgbNW = FxaaTexOff(tex, pos.xy, FxaaInt2(-1,-1), rcpFrame).xyz; - float3 rgbNE = FxaaTexOff(tex, pos.xy, FxaaInt2( 1,-1), rcpFrame).xyz; - float3 rgbSW = FxaaTexOff(tex, pos.xy, FxaaInt2(-1, 1), rcpFrame).xyz; - float3 rgbSE = FxaaTexOff(tex, pos.xy, FxaaInt2( 1, 1), rcpFrame).xyz; - #if (FXAA_SUBPIX_FASTER == 0) && (FXAA_SUBPIX > 0) - rgbL += (rgbNW + rgbNE + rgbSW + rgbSE); - rgbL *= FxaaToFloat3(1.0/9.0); - #endif - float lumaNW = FxaaLuma(rgbNW); - float lumaNE = FxaaLuma(rgbNE); - float lumaSW = FxaaLuma(rgbSW); - float lumaSE = FxaaLuma(rgbSE); - float edgeVert = - abs((0.25 * lumaNW) + (-0.5 * lumaN) + (0.25 * lumaNE)) + - abs((0.50 * lumaW ) + (-1.0 * lumaM) + (0.50 * lumaE )) + - abs((0.25 * lumaSW) + (-0.5 * lumaS) + (0.25 * lumaSE)); - float edgeHorz = - abs((0.25 * lumaNW) + (-0.5 * lumaW) + (0.25 * lumaSW)) + - abs((0.50 * lumaN ) + (-1.0 * lumaM) + (0.50 * lumaS )) + - abs((0.25 * lumaNE) + (-0.5 * lumaE) + (0.25 * lumaSE)); - bool horzSpan = edgeHorz >= edgeVert; - #if FXAA_DEBUG_HORZVERT - if(horzSpan) return FxaaFilterReturn(FxaaFloat3(1.0, 0.75, 0.0)); - else return FxaaFilterReturn(FxaaFloat3(0.0, 0.50, 1.0)); - #endif - float lengthSign = horzSpan ? -rcpFrame.y : -rcpFrame.x; - if(!horzSpan) lumaN = lumaW; - if(!horzSpan) lumaS = lumaE; - float gradientN = abs(lumaN - lumaM); - float gradientS = abs(lumaS - lumaM); - lumaN = (lumaN + lumaM) * 0.5; - lumaS = (lumaS + lumaM) * 0.5; - -/*---------------------------------------------------------------------------- - CHOOSE SIDE OF PIXEL WHERE GRADIENT IS HIGHEST ------------------------------------------------------------------------------- -This chooses a pixel pair. -For "horzSpan == true" this will be a vertical pair, - - [N] N - [M] or [M] - S [S] - -Note following this block, both {N,M} and {S,M} cases -flow in parallel (reusing the {N,M} variables). - -This pair of image rows or columns is searched below -in the positive and negative direction -until edge status changes -(or the maximum number of search steps is reached). -----------------------------------------------------------------------------*/ - bool pairN = gradientN >= gradientS; - #if FXAA_DEBUG_PAIR - if(pairN) return FxaaFilterReturn(FxaaFloat3(0.0, 0.0, 1.0)); - else return FxaaFilterReturn(FxaaFloat3(0.0, 1.0, 0.0)); - #endif - if(!pairN) lumaN = lumaS; - if(!pairN) gradientN = gradientS; - if(!pairN) lengthSign *= -1.0; - float2 posN; - posN.x = pos.x + (horzSpan ? 0.0 : lengthSign * 0.5); - posN.y = pos.y + (horzSpan ? lengthSign * 0.5 : 0.0); - -/*---------------------------------------------------------------------------- - CHOOSE SEARCH LIMITING VALUES ------------------------------------------------------------------------------- -Search limit (+/- gradientN) is a function of local gradient. -----------------------------------------------------------------------------*/ - gradientN *= FXAA_SEARCH_THRESHOLD; - -/*---------------------------------------------------------------------------- - SEARCH IN BOTH DIRECTIONS UNTIL FIND LUMA PAIR AVERAGE IS OUT OF RANGE ------------------------------------------------------------------------------- -This loop searches either in vertical or horizontal directions, -and in both the negative and positive direction in parallel. -This loop fusion is faster than searching separately. - -The search is accelerated using FXAA_SEARCH_ACCELERATION length box filter -via anisotropic filtering with specified texture gradients. -----------------------------------------------------------------------------*/ - float2 posP = posN; - float2 offNP = horzSpan ? - FxaaFloat2(rcpFrame.x, 0.0) : - FxaaFloat2(0.0f, rcpFrame.y); - float lumaEndN = lumaN; - float lumaEndP = lumaN; - bool doneN = false; - bool doneP = false; - #if FXAA_SEARCH_ACCELERATION == 1 - posN += offNP * FxaaFloat2(-1.0, -1.0); - posP += offNP * FxaaFloat2( 1.0, 1.0); - #endif - #if FXAA_SEARCH_ACCELERATION == 2 - posN += offNP * FxaaFloat2(-1.5, -1.5); - posP += offNP * FxaaFloat2( 1.5, 1.5); - offNP *= FxaaFloat2(2.0, 2.0); - #endif - #if FXAA_SEARCH_ACCELERATION == 3 - posN += offNP * FxaaFloat2(-2.0, -2.0); - posP += offNP * FxaaFloat2( 2.0, 2.0); - offNP *= FxaaFloat2(3.0, 3.0); - #endif - #if FXAA_SEARCH_ACCELERATION == 4 - posN += offNP * FxaaFloat2(-2.5, -2.5); - posP += offNP * FxaaFloat2( 2.5, 2.5); - offNP *= FxaaFloat2(4.0, 4.0); - #endif - for(int i = 0; i < FXAA_SEARCH_STEPS; i++) { - #if FXAA_SEARCH_ACCELERATION == 1 - if(!doneN) lumaEndN = - FxaaLuma(FxaaTexLod0(tex, posN.xy).xyz); - if(!doneP) lumaEndP = - FxaaLuma(FxaaTexLod0(tex, posP.xy).xyz); - #else - if(!doneN) lumaEndN = - FxaaLuma(FxaaTexGrad(tex, posN.xy, offNP).xyz); - if(!doneP) lumaEndP = - FxaaLuma(FxaaTexGrad(tex, posP.xy, offNP).xyz); - #endif - doneN = doneN || (abs(lumaEndN - lumaN) >= gradientN); - doneP = doneP || (abs(lumaEndP - lumaN) >= gradientN); - if(doneN && doneP) break; - if(!doneN) posN -= offNP; - if(!doneP) posP += offNP; } - -/*---------------------------------------------------------------------------- - HANDLE IF CENTER IS ON POSITIVE OR NEGATIVE SIDE ------------------------------------------------------------------------------- -FXAA uses the pixel's position in the span -in combination with the values (lumaEnd*) at the ends of the span, -to determine filtering. - -This step computes which side of the span the pixel is on. -On negative side if dstN < dstP, - - posN pos posP - |-----------|------|------------------| - | | | | - |<--dstN--->|<---------dstP---------->| - | - span center - -----------------------------------------------------------------------------*/ - float dstN = horzSpan ? pos.x - posN.x : pos.y - posN.y; - float dstP = horzSpan ? posP.x - pos.x : posP.y - pos.y; - bool directionN = dstN < dstP; - #if FXAA_DEBUG_NEGPOS - if(directionN) return FxaaFilterReturn(FxaaFloat3(1.0, 0.0, 0.0)); - else return FxaaFilterReturn(FxaaFloat3(0.0, 0.0, 1.0)); - #endif - lumaEndN = directionN ? lumaEndN : lumaEndP; - -/*---------------------------------------------------------------------------- - CHECK IF PIXEL IS IN SECTION OF SPAN WHICH GETS NO FILTERING ------------------------------------------------------------------------------- -If both the pair luma at the end of the span (lumaEndN) -and middle pixel luma (lumaM) -are on the same side of the middle pair average luma (lumaN), -then don't filter. - -Cases, - -(1.) "L", - - lumaM - | - V XXXXXXXX <- other line averaged - XXXXXXX[X]XXXXXXXXXXX <- source pixel line - | . | - -------------------------- - [ ]xxxxxx[x]xx[X]XXXXXX <- pair average - -------------------------- - ^ ^ ^ ^ - | | | | - . |<---->|<---------- no filter region - . | | | - . center | | - . | lumaEndN - . | . - . lumaN . - . . - |<--- span -->| - - -(2.) "^" and "-", - - <- other line averaged - XXXXX[X]XXX <- source pixel line - | | | - -------------------------- - [ ]xxxx[x]xx[ ] <- pair average - -------------------------- - | | | - |<--->|<--->|<---------- filter both sides - - -(3.) "v" and inverse of "-", - - XXXXXX XXXXXXXXX <- other line averaged - XXXXXXXXXXX[X]XXXXXXXXXXXX <- source pixel line - | | | - -------------------------- - XXXX[X]xxxx[x]xx[X]XXXXXXX <- pair average - -------------------------- - | | | - |<--->|<--->|<---------- don't filter both! - - -Note the "v" case for FXAA requires no filtering. -This is because the inverse of the "-" case is the "v". -Filtering "v" case turns open spans like this, - - XXXXXXXXX - -Into this (which is not desired), - - x+. .+x - XXXXXXXXX - -----------------------------------------------------------------------------*/ - if(((lumaM - lumaN) < 0.0) == ((lumaEndN - lumaN) < 0.0)) - lengthSign = 0.0; - -/*---------------------------------------------------------------------------- - COMPUTE SUB-PIXEL OFFSET AND FILTER SPAN ------------------------------------------------------------------------------- -FXAA filters using a bilinear texture fetch offset -from the middle pixel M towards the center of the pair (NM below). -Maximum filtering will be half way between pair. -Reminder, at this point in the code, -the {N,M} pair is also reused for all cases: {S,M}, {W,M}, and {E,M}. - - +-------+ - | | 0.5 offset - | N | | - | | V - +-------+....--- - | | - | M...|....--- - | | ^ - +-------+ | - . . 0.0 offset - . S . - . . - ......... - -Position on span is used to compute sub-pixel filter offset using simple ramp, - - posN posP - |\ |<------- 0.5 pixel offset into pair pixel - | \ | - | \ | - ---.......|...\..........|<------- 0.25 pixel offset into pair pixel - ^ | ^\ | - | | | \ | - V | | \ | - ---.......|===|==========|<------- 0.0 pixel offset (ie M pixel) - ^ . | ^ . - | . pos | . - | . . | . - | . . center . - | . . . - | |<->|<---------.-------- dstN - | . . . - | . |<-------->|<------- dstP - | . . - | |<------------>|<------- spanLength - | - subPixelOffset - -----------------------------------------------------------------------------*/ - float spanLength = (dstP + dstN); - dstN = directionN ? dstN : dstP; - float subPixelOffset = (0.5 + (dstN * (-1.0/spanLength))) * lengthSign; - #if FXAA_DEBUG_OFFSET - float ox = horzSpan ? 0.0 : subPixelOffset*2.0/rcpFrame.x; - float oy = horzSpan ? subPixelOffset*2.0/rcpFrame.y : 0.0; - if(ox < 0.0) return FxaaFilterReturn( - FxaaLerp3(FxaaToFloat3(lumaO), - FxaaFloat3(1.0, 0.0, 0.0), -ox)); - if(ox > 0.0) return FxaaFilterReturn( - FxaaLerp3(FxaaToFloat3(lumaO), - FxaaFloat3(0.0, 0.0, 1.0), ox)); - if(oy < 0.0) return FxaaFilterReturn( - FxaaLerp3(FxaaToFloat3(lumaO), - FxaaFloat3(1.0, 0.6, 0.2), -oy)); - if(oy > 0.0) return FxaaFilterReturn( - FxaaLerp3(FxaaToFloat3(lumaO), - FxaaFloat3(0.2, 0.6, 1.0), oy)); - return FxaaFilterReturn(FxaaFloat3(lumaO, lumaO, lumaO)); - #endif - float3 rgbF = FxaaTexLod0(tex, FxaaFloat2( - pos.x + (horzSpan ? 0.0 : subPixelOffset), - pos.y + (horzSpan ? subPixelOffset : 0.0))).xyz; - #if FXAA_SUBPIX == 0 - return FxaaFilterReturn(rgbF); - #else - return FxaaFilterReturn(FxaaLerp3(rgbL, rgbF, blendL)); - #endif -} - - - -struct v2f { - float4 pos : SV_POSITION; - float2 uv : TEXCOORD0; -}; - -v2f vert (appdata_img v) -{ - v2f o; - o.pos = UnityObjectToClipPos (v.vertex); - o.uv = v.texcoord.xy; - return o; -} - -sampler2D _MainTex; -float4 _MainTex_TexelSize; - -float4 frag (v2f i) : SV_Target -{ - return float4(FxaaPixelShader(i.uv.xy, _MainTex, _MainTex_TexelSize.xy).xyz, 0.0f); -} - -ENDCG - } -} - -Fallback "Hidden/FXAA II" -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_Antialiasing/FXAAPreset3.shader.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_Antialiasing/FXAAPreset3.shader.meta deleted file mode 100644 index 053bdbf..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_Antialiasing/FXAAPreset3.shader.meta +++ /dev/null @@ -1,4 +0,0 @@ -fileFormatVersion: 2 -guid: c182fa94a5a0a4c02870641efcd38cd5 -ShaderImporter: - userData: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_Antialiasing/NFAA.shader b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_Antialiasing/NFAA.shader deleted file mode 100644 index 567b33a..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_Antialiasing/NFAA.shader +++ /dev/null @@ -1,151 +0,0 @@ -// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' - - -Shader "Hidden/NFAA" { -Properties { - _MainTex ("Base (RGB)", 2D) = "white" {} - _BlurTex ("Base (RGB)", 2D) = "white" {} - -} - -CGINCLUDE - -#include "UnityCG.cginc" - -uniform sampler2D _MainTex; -uniform float4 _MainTex_TexelSize; -half4 _MainTex_ST; -uniform float _OffsetScale; -uniform float _BlurRadius; - -struct v2f { - float4 pos : SV_POSITION; - float2 uv[8] : TEXCOORD0; -}; - - v2f vert( appdata_img v ) - { - v2f o; - o.pos = UnityObjectToClipPos (v.vertex); - - float2 uv = v.texcoord.xy; - - float2 up = float2(0.0, _MainTex_TexelSize.y) * _OffsetScale; - float2 right = float2(_MainTex_TexelSize.x, 0.0) * _OffsetScale; - - o.uv[0].xy = uv + up; - o.uv[1].xy = uv - up; - o.uv[2].xy = uv + right; - o.uv[3].xy = uv - right; - o.uv[4].xy = uv - right + up; - o.uv[5].xy = uv - right -up; - o.uv[6].xy = uv + right + up; - o.uv[7].xy = uv + right -up; - - return o; - } - - half4 frag (v2f i) : SV_Target - { - // get luminance values - // maybe: experiment with different luminance calculations - float topL = Luminance( tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv[0], _MainTex_ST)).rgb ); - float bottomL = Luminance( tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv[1], _MainTex_ST)).rgb ); - float rightL = Luminance( tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv[2], _MainTex_ST)).rgb ); - float leftL = Luminance( tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv[3], _MainTex_ST)).rgb ); - float leftTopL = Luminance( tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv[4], _MainTex_ST)).rgb ); - float leftBottomL = Luminance( tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv[5], _MainTex_ST)).rgb ); - float rightBottomL = Luminance( tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv[6], _MainTex_ST)).rgb ); - float rightTopL = Luminance( tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv[7], _MainTex_ST)).rgb ); - - // 2 triangle subtractions - float sum0 = dot(float3(1,1,1), float3(rightTopL,bottomL,leftTopL)); - float sum1 = dot(float3(1,1,1), float3(leftBottomL,topL,rightBottomL)); - float sum2 = dot(float3(1,1,1), float3(leftTopL,rightL,leftBottomL)); - float sum3 = dot(float3(1,1,1), float3(rightBottomL,leftL,rightTopL)); - - // figure out "normal" - float2 blurDir = half2((sum0-sum1), (sum3-sum2)); - blurDir *= _MainTex_TexelSize.xy * _BlurRadius; - - // reconstruct normal uv - float2 uv_ = (i.uv[0] + i.uv[1]) * 0.5; - - float4 returnColor = tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(uv_, _MainTex_ST)); - returnColor += tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(uv_+ blurDir.xy, _MainTex_ST)); - returnColor += tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(uv_ - blurDir.xy, _MainTex_ST)); - returnColor += tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(uv_ + float2(blurDir.x, -blurDir.y), _MainTex_ST)); - returnColor += tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(uv_ - float2(blurDir.x, -blurDir.y), _MainTex_ST)); - - return returnColor * 0.2; - } - - half4 fragDebug (v2f i) : SV_Target - { - // get luminance values - // maybe: experiment with different luminance calculations - float topL = Luminance( tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv[0], _MainTex_ST)).rgb ); - float bottomL = Luminance( tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv[1], _MainTex_ST)).rgb ); - float rightL = Luminance( tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv[2], _MainTex_ST)).rgb ); - float leftL = Luminance( tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv[3], _MainTex_ST)).rgb ); - float leftTopL = Luminance( tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv[4], _MainTex_ST)).rgb ); - float leftBottomL = Luminance( tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv[5], _MainTex_ST)).rgb ); - float rightBottomL = Luminance( tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv[6], _MainTex_ST)).rgb ); - float rightTopL = Luminance( tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv[7], _MainTex_ST)).rgb ); - - // 2 triangle subtractions - float sum0 = dot(float3(1,1,1), float3(rightTopL,bottomL,leftTopL)); - float sum1 = dot(float3(1,1,1), float3(leftBottomL,topL,rightBottomL)); - float sum2 = dot(float3(1,1,1), float3(leftTopL,rightL,leftBottomL)); - float sum3 = dot(float3(1,1,1), float3(rightBottomL,leftL,rightTopL)); - - // figure out "normal" - float2 blurDir = half2((sum0-sum1), (sum3-sum2)); - blurDir *= _MainTex_TexelSize.xy * _BlurRadius; - - // reconstruct normal uv - float2 uv_ = (i.uv[0] + i.uv[1]) * 0.5; - - float4 returnColor = tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(uv_, _MainTex_ST)); - returnColor += tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(uv_+ blurDir.xy, _MainTex_ST)); - returnColor += tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(uv_ - blurDir.xy, _MainTex_ST)); - returnColor += tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(uv_ + float2(blurDir.x, -blurDir.y), _MainTex_ST)); - returnColor += tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(uv_ - float2(blurDir.x, -blurDir.y), _MainTex_ST)); - - blurDir = half2((sum0-sum1), (sum3-sum2)) * _BlurRadius; - return half4(normalize( half3(blurDir,1) * 0.5 + 0.5), 1); - return returnColor * 0.2; - } - -ENDCG - -SubShader { - Pass { - ZTest Always Cull Off ZWrite Off - - CGPROGRAM - - #pragma vertex vert - #pragma fragment frag - #pragma target 3.0 - #pragma exclude_renderers d3d11_9x - - ENDCG - } - Pass { - ZTest Always Cull Off ZWrite Off - - CGPROGRAM - - #pragma vertex vert - #pragma fragment fragDebug - #pragma target 3.0 - #pragma exclude_renderers d3d11_9x - - ENDCG - } -} - -Fallback off - -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_Antialiasing/NFAA.shader.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_Antialiasing/NFAA.shader.meta deleted file mode 100644 index af7b4b6..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_Antialiasing/NFAA.shader.meta +++ /dev/null @@ -1,4 +0,0 @@ -fileFormatVersion: 2 -guid: ce0cb2621f6d84e21a87414e471a3cce -ShaderImporter: - userData: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_Antialiasing/SSAA.shader b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_Antialiasing/SSAA.shader deleted file mode 100644 index d4029d2..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_Antialiasing/SSAA.shader +++ /dev/null @@ -1,88 +0,0 @@ -// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' - - -Shader "Hidden/SSAA" { -Properties { - _MainTex ("Base (RGB)", 2D) = "white" {} -} - -// very simple & fast AA by Emmanuel Julien - -SubShader { - Pass { - - ZTest Always Cull Off ZWrite Off - - CGPROGRAM - - #pragma vertex vert - #pragma fragment frag - - #include "UnityCG.cginc" - - uniform sampler2D _MainTex; - uniform float4 _MainTex_TexelSize; - half4 _MainTex_ST; - - struct v2f { - float4 pos : SV_POSITION; - float2 uv[5] : TEXCOORD0; - }; - - v2f vert( appdata_img v ) { - v2f o; - o.pos = UnityObjectToClipPos (v.vertex); - - float2 uv = v.texcoord.xy; - - float w = 1.75; - - float2 up = float2(0.0, _MainTex_TexelSize.y) * w; - float2 right = float2(_MainTex_TexelSize.x, 0.0) * w; - - o.uv[0].xy = uv - up; - o.uv[1].xy = uv - right; - o.uv[2].xy = uv + right; - o.uv[3].xy = uv + up; - - o.uv[4].xy = uv; - - return o; - } - - half4 frag (v2f i) : SV_Target - { - half4 outColor; - - float t = Luminance( tex2D( _MainTex, UnityStereoScreenSpaceUVAdjust(i.uv[0], _MainTex_ST)).xyz ); - float l = Luminance( tex2D( _MainTex, UnityStereoScreenSpaceUVAdjust(i.uv[1], _MainTex_ST)).xyz); - float r = Luminance( tex2D( _MainTex, UnityStereoScreenSpaceUVAdjust(i.uv[2], _MainTex_ST)).xyz); - float b = Luminance( tex2D( _MainTex, UnityStereoScreenSpaceUVAdjust(i.uv[3], _MainTex_ST)).xyz); - - half2 n = half2( -( t - b ), r - l ); - float nl = length( n ); - - if ( nl < (1.0 / 16.0) ) - outColor = tex2D( _MainTex, UnityStereoScreenSpaceUVAdjust(i.uv[4], _MainTex_ST) ); - else { - n *= _MainTex_TexelSize.xy / nl; - - half4 o = tex2D( _MainTex, UnityStereoScreenSpaceUVAdjust(i.uv[4], _MainTex_ST)); - half4 t0 = tex2D( _MainTex, UnityStereoScreenSpaceUVAdjust(i.uv[4] + n * 0.5, _MainTex_ST)) * 0.9; - half4 t1 = tex2D( _MainTex, UnityStereoScreenSpaceUVAdjust(i.uv[4] - n * 0.5, _MainTex_ST)) * 0.9; - half4 t2 = tex2D( _MainTex, UnityStereoScreenSpaceUVAdjust(i.uv[4] + n, _MainTex_ST)) * 0.75; - half4 t3 = tex2D( _MainTex, UnityStereoScreenSpaceUVAdjust(i.uv[4] - n, _MainTex_ST)) * 0.75; - - outColor = (o + t0 + t1 + t2 + t3) / 4.3; - } - - return outColor; - } - - ENDCG - } -} - -Fallback off - -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_Antialiasing/SSAA.shader.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_Antialiasing/SSAA.shader.meta deleted file mode 100644 index e972317..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_Antialiasing/SSAA.shader.meta +++ /dev/null @@ -1,4 +0,0 @@ -fileFormatVersion: 2 -guid: b3728d1488b02490cbd196c7941bf1f8 -ShaderImporter: - userData: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_BloomAndFlares.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_BloomAndFlares.meta deleted file mode 100644 index 3bdce38..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_BloomAndFlares.meta +++ /dev/null @@ -1,2 +0,0 @@ -fileFormatVersion: 2 -guid: d6ef58fc6f637406bbe6814a19c377f8 diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_BloomAndFlares/Blend.shader b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_BloomAndFlares/Blend.shader deleted file mode 100644 index 3505652..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_BloomAndFlares/Blend.shader +++ /dev/null @@ -1,118 +0,0 @@ -// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' - -Shader "Hidden/Blend" { - Properties { - _MainTex ("Screen Blended", 2D) = "" {} - _ColorBuffer ("Color", 2D) = "" {} - } - - CGINCLUDE - - #include "UnityCG.cginc" - - struct v2f { - float4 pos : SV_POSITION; - float2 uv[2] : TEXCOORD0; - }; - struct v2f_mt { - float4 pos : SV_POSITION; - float2 uv[4] : TEXCOORD0; - }; - - sampler2D _ColorBuffer; - sampler2D _MainTex; - - half _Intensity; - half4 _ColorBuffer_TexelSize; - half4 _ColorBuffer_ST; - half4 _MainTex_TexelSize; - half4 _MainTex_ST; - - v2f vert( appdata_img v ) { - v2f o; - o.pos = UnityObjectToClipPos(v.vertex); - o.uv[0] = v.texcoord.xy; - o.uv[1] = v.texcoord.xy; - - #if UNITY_UV_STARTS_AT_TOP - if (_ColorBuffer_TexelSize.y < 0) - o.uv[1].y = 1-o.uv[1].y; - #endif - - return o; - } - - v2f_mt vertMultiTap( appdata_img v ) { - v2f_mt o; - o.pos = UnityObjectToClipPos(v.vertex); - o.uv[0] = v.texcoord.xy + _MainTex_TexelSize.xy * 0.5; - o.uv[1] = v.texcoord.xy - _MainTex_TexelSize.xy * 0.5; - o.uv[2] = v.texcoord.xy - _MainTex_TexelSize.xy * half2(1,-1) * 0.5; - o.uv[3] = v.texcoord.xy + _MainTex_TexelSize.xy * half2(1,-1) * 0.5; - return o; - } - - half4 fragScreen (v2f i) : SV_Target { - half4 toBlend = saturate (tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv[0], _MainTex_ST)) * _Intensity); - return 1-(1-toBlend)*(1-tex2D(_ColorBuffer, UnityStereoScreenSpaceUVAdjust(i.uv[1], _ColorBuffer_ST))); - } - - half4 fragAdd (v2f i) : SV_Target { - return tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv[0].xy, _MainTex_ST)) * _Intensity + tex2D(_ColorBuffer, UnityStereoScreenSpaceUVAdjust(i.uv[1], _ColorBuffer_ST)); - } - - half4 fragVignetteBlend (v2f i) : SV_Target { - return tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv[0].xy, _MainTex_ST)) * tex2D(_ColorBuffer, UnityStereoScreenSpaceUVAdjust(i.uv[0], _ColorBuffer_ST)); - } - - half4 fragMultiTap (v2f_mt i) : SV_Target { - half4 outColor = tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv[0].xy, _MainTex_ST)); - outColor += tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv[1].xy, _MainTex_ST)); - outColor += tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv[2].xy, _MainTex_ST)); - outColor += tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv[3].xy, _MainTex_ST)); - return outColor * 0.25; - } - - ENDCG - -Subshader { - ZTest Always Cull Off ZWrite Off - - // 0: nicer & softer "screen" blend mode - Pass { - - CGPROGRAM - #pragma vertex vert - #pragma fragment fragScreen - ENDCG - } - - // 1: simple "add" blend mode - Pass { - - CGPROGRAM - #pragma vertex vert - #pragma fragment fragAdd - ENDCG - } - // 2: used for "stable" downsampling - Pass { - - CGPROGRAM - #pragma vertex vertMultiTap - #pragma fragment fragMultiTap - ENDCG - } - // 3: vignette blending - Pass { - - CGPROGRAM - #pragma vertex vert - #pragma fragment fragVignetteBlend - ENDCG - } -} - -Fallback off - -} // shader diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_BloomAndFlares/Blend.shader.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_BloomAndFlares/Blend.shader.meta deleted file mode 100644 index e9a742b..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_BloomAndFlares/Blend.shader.meta +++ /dev/null @@ -1,4 +0,0 @@ -fileFormatVersion: 2 -guid: 53b3960ee3d3d4a5caa8d5473d120187 -ShaderImporter: - userData: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_BloomAndFlares/BlendForBloom.shader b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_BloomAndFlares/BlendForBloom.shader deleted file mode 100644 index a1b020c..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_BloomAndFlares/BlendForBloom.shader +++ /dev/null @@ -1,224 +0,0 @@ -// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' - -Shader "Hidden/BlendForBloom" { - Properties { - _MainTex ("Screen Blended", 2D) = "" {} - _ColorBuffer ("Color", 2D) = "" {} - } - - CGINCLUDE - - #include "UnityCG.cginc" - - struct v2f { - float4 pos : SV_POSITION; - float2 uv[2] : TEXCOORD0; - }; - struct v2f_mt { - float4 pos : SV_POSITION; - float2 uv[5] : TEXCOORD0; - }; - - sampler2D _ColorBuffer; - sampler2D _MainTex; - - half _Intensity; - half4 _ColorBuffer_TexelSize; - half4 _ColorBuffer_ST; - half4 _MainTex_TexelSize; - half4 _MainTex_ST; - - v2f vert( appdata_img v ) { - v2f o; - o.pos = UnityObjectToClipPos(v.vertex); - o.uv[0] = v.texcoord.xy; - o.uv[1] = v.texcoord.xy; - - #if UNITY_UV_STARTS_AT_TOP - if (_ColorBuffer_TexelSize.y < 0) - o.uv[1].y = 1-o.uv[1].y; - #endif - - return o; - } - - v2f_mt vertMultiTap( appdata_img v ) { - v2f_mt o; - o.pos = UnityObjectToClipPos(v.vertex); - o.uv[4] = v.texcoord.xy; - o.uv[0] = v.texcoord.xy + _MainTex_TexelSize.xy * 0.5; - o.uv[1] = v.texcoord.xy - _MainTex_TexelSize.xy * 0.5; - o.uv[2] = v.texcoord.xy - _MainTex_TexelSize.xy * half2(1,-1) * 0.5; - o.uv[3] = v.texcoord.xy + _MainTex_TexelSize.xy * half2(1,-1) * 0.5; - return o; - } - - half4 fragScreen (v2f i) : SV_Target { - half4 addedbloom = tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv[0].xy, _MainTex_ST)) * _Intensity; - half4 screencolor = tex2D(_ColorBuffer, UnityStereoScreenSpaceUVAdjust(i.uv[1], _ColorBuffer_ST)); - return 1-(1-addedbloom)*(1-screencolor); - } - - half4 fragScreenCheap(v2f i) : SV_Target { - half4 addedbloom = tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv[0].xy, _MainTex_ST)) * _Intensity; - half4 screencolor = tex2D(_ColorBuffer, UnityStereoScreenSpaceUVAdjust(i.uv[1], _ColorBuffer_ST)); - return 1-(1-addedbloom)*(1-screencolor); - } - - half4 fragAdd (v2f i) : SV_Target { - half4 addedbloom = tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv[0].xy, _MainTex_ST)); - half4 screencolor = tex2D(_ColorBuffer, UnityStereoScreenSpaceUVAdjust(i.uv[1], _ColorBuffer_ST)); - return _Intensity * addedbloom + screencolor; - } - - half4 fragAddCheap (v2f i) : SV_Target { - half4 addedbloom = tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv[0].xy, _MainTex_ST)); - half4 screencolor = tex2D(_ColorBuffer, UnityStereoScreenSpaceUVAdjust(i.uv[1], _ColorBuffer_ST)); - return _Intensity * addedbloom + screencolor; - } - - half4 fragVignetteMul (v2f i) : SV_Target { - return tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv[0].xy, _MainTex_ST)) * tex2D(_ColorBuffer, UnityStereoScreenSpaceUVAdjust(i.uv[0], _ColorBuffer_ST)); - } - - half4 fragVignetteBlend (v2f i) : SV_Target { - return half4(1,1,1, tex2D(_ColorBuffer, UnityStereoScreenSpaceUVAdjust(i.uv[0], _ColorBuffer_ST)).r); - } - - half4 fragClear (v2f i) : SV_Target { - return 0; - } - - half4 fragAddOneOne (v2f i) : SV_Target { - half4 addedColors = tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv[0].xy, _MainTex_ST)); - return addedColors * _Intensity; - } - - half4 frag1Tap (v2f i) : SV_Target { - return tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv[0].xy, _MainTex_ST)); - } - - half4 fragMultiTapMax (v2f_mt i) : SV_Target { - half4 outColor = tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv[4].xy, _MainTex_ST)); - outColor = max(outColor, tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv[0].xy, _MainTex_ST))); - outColor = max(outColor, tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv[1].xy, _MainTex_ST))); - outColor = max(outColor, tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv[2].xy, _MainTex_ST))); - outColor = max(outColor, tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv[3].xy, _MainTex_ST))); - return outColor; - } - - half4 fragMultiTapBlur (v2f_mt i) : SV_Target { - half4 outColor = 0; - outColor += tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv[0].xy, _MainTex_ST)); - outColor += tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv[1].xy, _MainTex_ST)); - outColor += tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv[2].xy, _MainTex_ST)); - outColor += tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv[3].xy, _MainTex_ST)); - return outColor/4; - } - - ENDCG - -Subshader { - ZTest Always Cull Off ZWrite Off - - // 0: nicer & softer "screen" blend mode - Pass { - - CGPROGRAM - #pragma vertex vert - #pragma fragment fragScreen - ENDCG - } - - // 1: "add" blend mode - Pass { - - CGPROGRAM - #pragma vertex vert - #pragma fragment fragAdd - ENDCG - } - // 2: several taps, maxxed - Pass { - - CGPROGRAM - #pragma vertex vertMultiTap - #pragma fragment fragMultiTapMax - ENDCG - } - // 3: vignette blending - Pass { - - CGPROGRAM - #pragma vertex vert - #pragma fragment fragVignetteMul - ENDCG - } - // 4: nicer & softer "screen" blend mode(cheapest) - Pass { - - CGPROGRAM - #pragma vertex vert - #pragma fragment fragScreenCheap - ENDCG - } - // 5: "add" blend mode (cheapest) - Pass { - - CGPROGRAM - #pragma vertex vert - #pragma fragment fragAddCheap - ENDCG - } - // 6: used for "stable" downsampling (blur) - Pass { - - CGPROGRAM - #pragma vertex vertMultiTap - #pragma fragment fragMultiTapBlur - ENDCG - } - // 7: vignette blending (blend to dest) - Pass { - - Blend Zero SrcAlpha - - CGPROGRAM - #pragma vertex vert - #pragma fragment fragVignetteBlend - ENDCG - } - // 8: clear - Pass { - - CGPROGRAM - #pragma vertex vert - #pragma fragment fragClear - ENDCG - } - // 9: fragAddOneOne - Pass { - - Blend One One - - CGPROGRAM - #pragma vertex vert - #pragma fragment fragAddOneOne - ENDCG - } - // 10: max blend - Pass { - - BlendOp Max - Blend One One - - CGPROGRAM - #pragma vertex vert - #pragma fragment frag1Tap - ENDCG - } -} - -Fallback off - -} // shader diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_BloomAndFlares/BlendForBloom.shader.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_BloomAndFlares/BlendForBloom.shader.meta deleted file mode 100644 index 1737d9f..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_BloomAndFlares/BlendForBloom.shader.meta +++ /dev/null @@ -1,4 +0,0 @@ -fileFormatVersion: 2 -guid: 7856cbff0a0ca45c787d5431eb805bb0 -ShaderImporter: - userData: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_BloomAndFlares/BlendOneOne.shader b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_BloomAndFlares/BlendOneOne.shader deleted file mode 100644 index 8b4620a..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_BloomAndFlares/BlendOneOne.shader +++ /dev/null @@ -1,51 +0,0 @@ -// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' - -Shader "Hidden/BlendOneOne" { - Properties { - _MainTex ("-", 2D) = "" {} - } - - CGINCLUDE - - #include "UnityCG.cginc" - - struct v2f { - float4 pos : SV_POSITION; - float2 uv : TEXCOORD0; - }; - - sampler2D _MainTex; - half4 _MainTex_ST; - half _Intensity; - - v2f vert( appdata_img v ) { - v2f o; - o.pos = UnityObjectToClipPos(v.vertex); - o.uv = UnityStereoScreenSpaceUVAdjust(v.texcoord.xy, _MainTex_ST); - return o; - } - - half4 frag(v2f i) : SV_Target { - return tex2D(_MainTex, i.uv) * _Intensity; - } - - ENDCG - -Subshader { - - Pass { - BlendOp Add - Blend One One - - ZTest Always Cull Off ZWrite Off - - CGPROGRAM - #pragma vertex vert - #pragma fragment frag - ENDCG - } -} - -Fallback off - -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_BloomAndFlares/BlendOneOne.shader.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_BloomAndFlares/BlendOneOne.shader.meta deleted file mode 100644 index 007df7f..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_BloomAndFlares/BlendOneOne.shader.meta +++ /dev/null @@ -1,4 +0,0 @@ -fileFormatVersion: 2 -guid: f7898d203e9b94c0dbe2bf9dd5cb32c0 -ShaderImporter: - userData: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_BloomAndFlares/BlurAndFlares.shader b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_BloomAndFlares/BlurAndFlares.shader deleted file mode 100644 index c525eeb..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_BloomAndFlares/BlurAndFlares.shader +++ /dev/null @@ -1,205 +0,0 @@ -// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' - -Shader "Hidden/BlurAndFlares" { - Properties { - _MainTex ("Base (RGB)", 2D) = "" {} - _NonBlurredTex ("Base (RGB)", 2D) = "" {} - } - - CGINCLUDE - - #include "UnityCG.cginc" - - struct v2f { - half4 pos : SV_POSITION; - half2 uv : TEXCOORD0; - }; - - struct v2f_opts { - half4 pos : SV_POSITION; - half2 uv[7] : TEXCOORD0; - }; - - struct v2f_blur { - half4 pos : SV_POSITION; - half2 uv : TEXCOORD0; - half4 uv01 : TEXCOORD1; - half4 uv23 : TEXCOORD2; - half4 uv45 : TEXCOORD3; - half4 uv67 : TEXCOORD4; - }; - - half4 _Offsets; - half4 _TintColor; - - half _StretchWidth; - half2 _Threshhold; - half _Saturation; - - half4 _MainTex_TexelSize; - half4 _MainTex_ST; - - sampler2D _MainTex; - sampler2D _NonBlurredTex; - - v2f vert (appdata_img v) { - v2f o; - o.pos = UnityObjectToClipPos(v.vertex); - o.uv = v.texcoord.xy; - return o; - } - - v2f_blur vertWithMultiCoords2 (appdata_img v) { - v2f_blur o; - o.pos = UnityObjectToClipPos(v.vertex); - o.uv.xy = UnityStereoScreenSpaceUVAdjust(v.texcoord.xy, _MainTex_ST); - o.uv01 = UnityStereoScreenSpaceUVAdjust(v.texcoord.xyxy + _Offsets.xyxy * half4(1,1, -1,-1), _MainTex_ST); - o.uv23 = UnityStereoScreenSpaceUVAdjust(v.texcoord.xyxy + _Offsets.xyxy * half4(1,1, -1,-1) * 2.0, _MainTex_ST); - o.uv45 = UnityStereoScreenSpaceUVAdjust(v.texcoord.xyxy + _Offsets.xyxy * half4(1,1, -1,-1) * 3.0, _MainTex_ST); - o.uv67 = UnityStereoScreenSpaceUVAdjust(v.texcoord.xyxy + _Offsets.xyxy * half4(1,1, -1,-1) * 4.0, _MainTex_ST); - o.uv67 = UnityStereoScreenSpaceUVAdjust(v.texcoord.xyxy + _Offsets.xyxy * half4(1,1, -1,-1) * 5.0, _MainTex_ST); - return o; - } - - v2f_opts vertStretch (appdata_img v) { - v2f_opts o; - o.pos = UnityObjectToClipPos(v.vertex); - half b = _StretchWidth; - o.uv[0] = UnityStereoScreenSpaceUVAdjust(v.texcoord.xy, _MainTex_ST); - o.uv[1] = UnityStereoScreenSpaceUVAdjust(v.texcoord.xy + b * 2.0 * _Offsets.xy, _MainTex_ST); - o.uv[2] = UnityStereoScreenSpaceUVAdjust(v.texcoord.xy - b * 2.0 * _Offsets.xy, _MainTex_ST); - o.uv[3] = UnityStereoScreenSpaceUVAdjust(v.texcoord.xy + b * 4.0 * _Offsets.xy, _MainTex_ST); - o.uv[4] = UnityStereoScreenSpaceUVAdjust(v.texcoord.xy - b * 4.0 * _Offsets.xy, _MainTex_ST); - o.uv[5] = UnityStereoScreenSpaceUVAdjust(v.texcoord.xy + b * 6.0 * _Offsets.xy, _MainTex_ST); - o.uv[6] = UnityStereoScreenSpaceUVAdjust(v.texcoord.xy - b * 6.0 * _Offsets.xy, _MainTex_ST); - return o; - } - - v2f_opts vertWithMultiCoords (appdata_img v) { - v2f_opts o; - o.pos = UnityObjectToClipPos(v.vertex); - o.uv[0] = UnityStereoScreenSpaceUVAdjust(v.texcoord.xy, _MainTex_ST); - o.uv[1] = UnityStereoScreenSpaceUVAdjust(v.texcoord.xy + 0.5 * _MainTex_TexelSize.xy * _Offsets.xy, _MainTex_ST); - o.uv[2] = UnityStereoScreenSpaceUVAdjust(v.texcoord.xy - 0.5 * _MainTex_TexelSize.xy * _Offsets.xy, _MainTex_ST); - o.uv[3] = UnityStereoScreenSpaceUVAdjust(v.texcoord.xy + 1.5 * _MainTex_TexelSize.xy * _Offsets.xy, _MainTex_ST); - o.uv[4] = UnityStereoScreenSpaceUVAdjust(v.texcoord.xy - 1.5 * _MainTex_TexelSize.xy * _Offsets.xy, _MainTex_ST); - o.uv[5] = UnityStereoScreenSpaceUVAdjust(v.texcoord.xy + 2.5 * _MainTex_TexelSize.xy * _Offsets.xy, _MainTex_ST); - o.uv[6] = UnityStereoScreenSpaceUVAdjust(v.texcoord.xy - 2.5 * _MainTex_TexelSize.xy * _Offsets.xy, _MainTex_ST); - return o; - } - - half4 fragPostNoBlur (v2f i) : SV_Target { - half4 color = tex2D (_MainTex, i.uv); - return color * 1.0/(1.0 + Luminance(color.rgb) + 0.5); // this also makes it a little noisy - } - - half4 fragGaussBlur (v2f_blur i) : SV_Target { - half4 color = half4 (0,0,0,0); - color += 0.225 * tex2D (_MainTex, i.uv); - color += 0.150 * tex2D (_MainTex, i.uv01.xy); - color += 0.150 * tex2D (_MainTex, i.uv01.zw); - color += 0.110 * tex2D (_MainTex, i.uv23.xy); - color += 0.110 * tex2D (_MainTex, i.uv23.zw); - color += 0.075 * tex2D (_MainTex, i.uv45.xy); - color += 0.075 * tex2D (_MainTex, i.uv45.zw); - color += 0.0525 * tex2D (_MainTex, i.uv67.xy); - color += 0.0525 * tex2D (_MainTex, i.uv67.zw); - return color; - } - - half4 fragPreAndCut (v2f_opts i) : SV_Target { - half4 color = tex2D (_MainTex, i.uv[0]); - color += tex2D (_MainTex, i.uv[1]); - color += tex2D (_MainTex, i.uv[2]); - color += tex2D (_MainTex, i.uv[3]); - color += tex2D (_MainTex, i.uv[4]); - color += tex2D (_MainTex, i.uv[5]); - color += tex2D (_MainTex, i.uv[6]); - color = max(color / 7.0 - _Threshhold.xxxx, float4(0,0,0,0)); - half lum = Luminance(color.rgb); - color.rgb = lerp(half3(lum,lum,lum), color.rgb, _Saturation) * _TintColor.rgb; - return color; - } - - half4 fragStretch (v2f_opts i) : SV_Target { - half4 color = tex2D (_MainTex, i.uv[0]); - color = max (color, tex2D (_MainTex, i.uv[1])); - color = max (color, tex2D (_MainTex, i.uv[2])); - color = max (color, tex2D (_MainTex, i.uv[3])); - color = max (color, tex2D (_MainTex, i.uv[4])); - color = max (color, tex2D (_MainTex, i.uv[5])); - color = max (color, tex2D (_MainTex, i.uv[6])); - return color; - } - - half4 fragPost (v2f_opts i) : SV_Target { - half4 color = tex2D (_MainTex, i.uv[0]); - color += tex2D (_MainTex, i.uv[1]); - color += tex2D (_MainTex, i.uv[2]); - color += tex2D (_MainTex, i.uv[3]); - color += tex2D (_MainTex, i.uv[4]); - color += tex2D (_MainTex, i.uv[5]); - color += tex2D (_MainTex, i.uv[6]); - return color * 1.0/(7.0 + Luminance(color.rgb) + 0.5); // this also makes it a little noisy - } - - ENDCG - -Subshader { - ZTest Always Cull Off ZWrite Off - Pass { - - CGPROGRAM - - #pragma vertex vert - #pragma fragment fragPostNoBlur - - ENDCG - } - - Pass { - - CGPROGRAM - - #pragma vertex vertStretch - #pragma fragment fragStretch - - ENDCG - } - - // 2 - Pass { - - CGPROGRAM - - #pragma vertex vertWithMultiCoords - #pragma fragment fragPreAndCut - - ENDCG - } - - // 3 - Pass { - - CGPROGRAM - - #pragma vertex vertWithMultiCoords - #pragma fragment fragPost - - ENDCG - } - // 4 - Pass { - - CGPROGRAM - - #pragma vertex vertWithMultiCoords2 - #pragma fragment fragGaussBlur - - ENDCG - } -} - -Fallback off - -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_BloomAndFlares/BlurAndFlares.shader.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_BloomAndFlares/BlurAndFlares.shader.meta deleted file mode 100644 index a0ed0ba..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_BloomAndFlares/BlurAndFlares.shader.meta +++ /dev/null @@ -1,4 +0,0 @@ -fileFormatVersion: 2 -guid: be6e39cf196f146d5be72fbefb18ed75 -ShaderImporter: - userData: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_BloomAndFlares/BrightPassFilter.shader b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_BloomAndFlares/BrightPassFilter.shader deleted file mode 100644 index 7f0404f..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_BloomAndFlares/BrightPassFilter.shader +++ /dev/null @@ -1,60 +0,0 @@ -// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' - -Shader "Hidden/BrightPassFilterForBloom" -{ - Properties - { - _MainTex ("Base (RGB)", 2D) = "" {} - } - - CGINCLUDE - - #include "UnityCG.cginc" - - struct v2f - { - float4 pos : SV_POSITION; - float2 uv : TEXCOORD0; - }; - - sampler2D _MainTex; - half4 _MainTex_ST; - - half4 threshold; - half useSrcAlphaAsMask; - - v2f vert( appdata_img v ) - { - v2f o; - o.pos = UnityObjectToClipPos(v.vertex); - o.uv = UnityStereoScreenSpaceUVAdjust(v.texcoord.xy, _MainTex_ST); - return o; - } - - half4 frag(v2f i) : SV_Target - { - half4 color = tex2D(_MainTex, i.uv); - //color = color * saturate((color-threshhold.x) * 75.0); // didn't go well with HDR and din't make sense - color = color * lerp(1.0, color.a, useSrcAlphaAsMask); - color = max(half4(0,0,0,0), color-threshold.x); - return color; - } - - ENDCG - - Subshader - { - Pass - { - ZTest Always Cull Off ZWrite Off - - CGPROGRAM - - #pragma vertex vert - #pragma fragment frag - - ENDCG - } - } - Fallback off -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_BloomAndFlares/BrightPassFilter.shader.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_BloomAndFlares/BrightPassFilter.shader.meta deleted file mode 100644 index 35204d1..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_BloomAndFlares/BrightPassFilter.shader.meta +++ /dev/null @@ -1,4 +0,0 @@ -fileFormatVersion: 2 -guid: 186c4c0d31e314f049595dcbaf4ca129 -ShaderImporter: - userData: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_BloomAndFlares/BrightPassFilter2.shader b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_BloomAndFlares/BrightPassFilter2.shader deleted file mode 100644 index b076e92..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_BloomAndFlares/BrightPassFilter2.shader +++ /dev/null @@ -1,77 +0,0 @@ -// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' - -Shader "Hidden/BrightPassFilter2" -{ - Properties - { - _MainTex ("Base (RGB)", 2D) = "" {} - } - - CGINCLUDE - - #include "UnityCG.cginc" - - struct v2f - { - float4 pos : SV_POSITION; - float2 uv : TEXCOORD0; - }; - - sampler2D _MainTex; - half4 _MainTex_ST; - - half4 _Threshhold; - - v2f vert( appdata_img v ) - { - v2f o; - o.pos = UnityObjectToClipPos(v.vertex); - o.uv = UnityStereoScreenSpaceUVAdjust(v.texcoord.xy, _MainTex_ST); - return o; - } - - half4 fragScalarThresh(v2f i) : SV_Target - { - half4 color = tex2D(_MainTex, i.uv); - color.rgb = color.rgb; - color.rgb = max(half3(0,0,0), color.rgb-_Threshhold.xxx); - return color; - } - - half4 fragColorThresh(v2f i) : SV_Target - { - half4 color = tex2D(_MainTex, i.uv); - color.rgb = max(half3(0,0,0), color.rgb-_Threshhold.rgb); - return color; - } - - ENDCG - - Subshader - { - Pass - { - ZTest Always Cull Off ZWrite Off - - CGPROGRAM - - #pragma vertex vert - #pragma fragment fragScalarThresh - - ENDCG - } - - Pass - { - ZTest Always Cull Off ZWrite Off - - CGPROGRAM - - #pragma vertex vert - #pragma fragment fragColorThresh - - ENDCG - } - } - Fallback off -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_BloomAndFlares/BrightPassFilter2.shader.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_BloomAndFlares/BrightPassFilter2.shader.meta deleted file mode 100644 index b55de0e..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_BloomAndFlares/BrightPassFilter2.shader.meta +++ /dev/null @@ -1,4 +0,0 @@ -fileFormatVersion: 2 -guid: 0aeaa4cb29f5d4e9c8455f04c8575c8c -ShaderImporter: - userData: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_BloomAndFlares/LensFlareCreate.shader b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_BloomAndFlares/LensFlareCreate.shader deleted file mode 100644 index bacc63f..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_BloomAndFlares/LensFlareCreate.shader +++ /dev/null @@ -1,63 +0,0 @@ -// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' - -Shader "Hidden/LensFlareCreate" { - Properties { - _MainTex ("Base (RGB)", 2D) = "" {} - } - - CGINCLUDE - - #include "UnityCG.cginc" - - struct v2f { - float4 pos : SV_POSITION; - float2 uv[4] : TEXCOORD0; - }; - - fixed4 colorA; - fixed4 colorB; - fixed4 colorC; - fixed4 colorD; - - sampler2D _MainTex; - half4 _MainTex_ST; - - v2f vert( appdata_img v ) { - v2f o; - o.pos = UnityObjectToClipPos(v.vertex); - - o.uv[0] = UnityStereoScreenSpaceUVAdjust(( ( v.texcoord.xy - 0.5 ) * -0.85 ) + 0.5, _MainTex_ST); - o.uv[1] = UnityStereoScreenSpaceUVAdjust(( ( v.texcoord.xy - 0.5 ) * -1.45 ) + 0.5, _MainTex_ST); - o.uv[2] = UnityStereoScreenSpaceUVAdjust(( ( v.texcoord.xy - 0.5 ) * -2.55 ) + 0.5, _MainTex_ST); - o.uv[3] = UnityStereoScreenSpaceUVAdjust(( ( v.texcoord.xy - 0.5 ) * -4.15 ) + 0.5, _MainTex_ST); - return o; - } - - fixed4 frag(v2f i) : SV_Target { - fixed4 color = float4 (0,0,0,0); - color += tex2D(_MainTex, i.uv[0] ) * colorA; - color += tex2D(_MainTex, i.uv[1] ) * colorB; - color += tex2D(_MainTex, i.uv[2] ) * colorC; - color += tex2D(_MainTex, i.uv[3] ) * colorD; - return color; - } - - ENDCG - -Subshader { - Blend One One - Pass { - ZTest Always Cull Off ZWrite Off - - CGPROGRAM - - #pragma vertex vert - #pragma fragment frag - - ENDCG - } -} - -Fallback off - -} // shader diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_BloomAndFlares/LensFlareCreate.shader.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_BloomAndFlares/LensFlareCreate.shader.meta deleted file mode 100644 index cd9c241..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_BloomAndFlares/LensFlareCreate.shader.meta +++ /dev/null @@ -1,4 +0,0 @@ -fileFormatVersion: 2 -guid: 459fe69d2f6d74ddb92f04dbf45a866b -ShaderImporter: - userData: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_BloomAndFlares/MobileBloom.shader b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_BloomAndFlares/MobileBloom.shader deleted file mode 100644 index 4152986..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_BloomAndFlares/MobileBloom.shader +++ /dev/null @@ -1,289 +0,0 @@ -// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' - - -Shader "Hidden/FastBloom" { - Properties { - _MainTex ("Base (RGB)", 2D) = "white" {} - _Bloom ("Bloom (RGB)", 2D) = "black" {} - } - - CGINCLUDE - - #include "UnityCG.cginc" - - sampler2D _MainTex; - sampler2D _Bloom; - - uniform half4 _MainTex_TexelSize; - half4 _MainTex_ST; - - uniform half4 _Parameter; - uniform half4 _OffsetsA; - uniform half4 _OffsetsB; - - #define ONE_MINUS_THRESHHOLD_TIMES_INTENSITY _Parameter.w - #define THRESHHOLD _Parameter.z - - struct v2f_simple - { - float4 pos : SV_POSITION; - half2 uv : TEXCOORD0; - - #if UNITY_UV_STARTS_AT_TOP - half2 uv2 : TEXCOORD1; - #endif - }; - - v2f_simple vertBloom ( appdata_img v ) - { - v2f_simple o; - - o.pos = UnityObjectToClipPos (v.vertex); - o.uv = UnityStereoScreenSpaceUVAdjust(v.texcoord, _MainTex_ST); - - #if UNITY_UV_STARTS_AT_TOP - o.uv2 = o.uv; - if (_MainTex_TexelSize.y < 0.0) - o.uv.y = 1.0 - o.uv.y; - #endif - - return o; - } - - struct v2f_tap - { - float4 pos : SV_POSITION; - half2 uv20 : TEXCOORD0; - half2 uv21 : TEXCOORD1; - half2 uv22 : TEXCOORD2; - half2 uv23 : TEXCOORD3; - }; - - v2f_tap vert4Tap ( appdata_img v ) - { - v2f_tap o; - - o.pos = UnityObjectToClipPos (v.vertex); - o.uv20 = UnityStereoScreenSpaceUVAdjust(v.texcoord + _MainTex_TexelSize.xy, _MainTex_ST); - o.uv21 = UnityStereoScreenSpaceUVAdjust(v.texcoord + _MainTex_TexelSize.xy * half2(-0.5h,-0.5h), _MainTex_ST); - o.uv22 = UnityStereoScreenSpaceUVAdjust(v.texcoord + _MainTex_TexelSize.xy * half2(0.5h,-0.5h), _MainTex_ST); - o.uv23 = UnityStereoScreenSpaceUVAdjust(v.texcoord + _MainTex_TexelSize.xy * half2(-0.5h,0.5h), _MainTex_ST); - - return o; - } - - fixed4 fragBloom ( v2f_simple i ) : SV_Target - { - #if UNITY_UV_STARTS_AT_TOP - - fixed4 color = tex2D(_MainTex, i.uv2); - return color + tex2D(_Bloom, i.uv); - - #else - - fixed4 color = tex2D(_MainTex, i.uv); - return color + tex2D(_Bloom, i.uv); - - #endif - } - - fixed4 fragDownsample ( v2f_tap i ) : SV_Target - { - fixed4 color = tex2D (_MainTex, i.uv20); - color += tex2D (_MainTex, i.uv21); - color += tex2D (_MainTex, i.uv22); - color += tex2D (_MainTex, i.uv23); - return max(color/4 - THRESHHOLD, 0) * ONE_MINUS_THRESHHOLD_TIMES_INTENSITY; - } - - // weight curves - - static const half curve[7] = { 0.0205, 0.0855, 0.232, 0.324, 0.232, 0.0855, 0.0205 }; // gauss'ish blur weights - - static const half4 curve4[7] = { half4(0.0205,0.0205,0.0205,0), half4(0.0855,0.0855,0.0855,0), half4(0.232,0.232,0.232,0), - half4(0.324,0.324,0.324,1), half4(0.232,0.232,0.232,0), half4(0.0855,0.0855,0.0855,0), half4(0.0205,0.0205,0.0205,0) }; - - struct v2f_withBlurCoords8 - { - float4 pos : SV_POSITION; - half4 uv : TEXCOORD0; - half2 offs : TEXCOORD1; - }; - - struct v2f_withBlurCoordsSGX - { - float4 pos : SV_POSITION; - half2 uv : TEXCOORD0; - half4 offs[3] : TEXCOORD1; - }; - - v2f_withBlurCoords8 vertBlurHorizontal (appdata_img v) - { - v2f_withBlurCoords8 o; - o.pos = UnityObjectToClipPos (v.vertex); - - o.uv = half4(v.texcoord.xy,1,1); - o.offs = _MainTex_TexelSize.xy * half2(1.0, 0.0) * _Parameter.x; - - return o; - } - - v2f_withBlurCoords8 vertBlurVertical (appdata_img v) - { - v2f_withBlurCoords8 o; - o.pos = UnityObjectToClipPos (v.vertex); - - o.uv = half4(v.texcoord.xy,1,1); - o.offs = _MainTex_TexelSize.xy * half2(0.0, 1.0) * _Parameter.x; - - return o; - } - - half4 fragBlur8 ( v2f_withBlurCoords8 i ) : SV_Target - { - half2 uv = i.uv.xy; - half2 netFilterWidth = i.offs; - half2 coords = uv - netFilterWidth * 3.0; - - half4 color = 0; - for( int l = 0; l < 7; l++ ) - { - half4 tap = tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(coords, _MainTex_ST)); - color += tap * curve4[l]; - coords += netFilterWidth; - } - return color; - } - - - v2f_withBlurCoordsSGX vertBlurHorizontalSGX (appdata_img v) - { - v2f_withBlurCoordsSGX o; - o.pos = UnityObjectToClipPos (v.vertex); - - o.uv = v.texcoord.xy; - - half offsetMagnitude = _MainTex_TexelSize.x * _Parameter.x; - o.offs[0] = v.texcoord.xyxy + offsetMagnitude * half4(-3.0h, 0.0h, 3.0h, 0.0h); - o.offs[1] = v.texcoord.xyxy + offsetMagnitude * half4(-2.0h, 0.0h, 2.0h, 0.0h); - o.offs[2] = v.texcoord.xyxy + offsetMagnitude * half4(-1.0h, 0.0h, 1.0h, 0.0h); - - return o; - } - - v2f_withBlurCoordsSGX vertBlurVerticalSGX (appdata_img v) - { - v2f_withBlurCoordsSGX o; - o.pos = UnityObjectToClipPos (v.vertex); - - o.uv = half4(v.texcoord.xy,1,1); - - half offsetMagnitude = _MainTex_TexelSize.y * _Parameter.x; - o.offs[0] = v.texcoord.xyxy + offsetMagnitude * half4(0.0h, -3.0h, 0.0h, 3.0h); - o.offs[1] = v.texcoord.xyxy + offsetMagnitude * half4(0.0h, -2.0h, 0.0h, 2.0h); - o.offs[2] = v.texcoord.xyxy + offsetMagnitude * half4(0.0h, -1.0h, 0.0h, 1.0h); - - return o; - } - - half4 fragBlurSGX ( v2f_withBlurCoordsSGX i ) : SV_Target - { - half2 uv = i.uv.xy; - - half4 color = tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv, _MainTex_ST)) * curve4[3]; - - for( int l = 0; l < 3; l++ ) - { - half4 tapA = tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(i.offs[l].xy, _MainTex_ST)); - half4 tapB = tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(i.offs[l].zw, _MainTex_ST)); - color += (tapA + tapB) * curve4[l]; - } - - return color; - - } - - ENDCG - - SubShader { - ZTest Off Cull Off ZWrite Off Blend Off - - // 0 - Pass { - - CGPROGRAM - #pragma vertex vertBloom - #pragma fragment fragBloom - - ENDCG - - } - - // 1 - Pass { - - CGPROGRAM - - #pragma vertex vert4Tap - #pragma fragment fragDownsample - - ENDCG - - } - - // 2 - Pass { - ZTest Always - Cull Off - - CGPROGRAM - - #pragma vertex vertBlurVertical - #pragma fragment fragBlur8 - - ENDCG - } - - // 3 - Pass { - ZTest Always - Cull Off - - CGPROGRAM - - #pragma vertex vertBlurHorizontal - #pragma fragment fragBlur8 - - ENDCG - } - - // alternate blur - // 4 - Pass { - ZTest Always - Cull Off - - CGPROGRAM - - #pragma vertex vertBlurVerticalSGX - #pragma fragment fragBlurSGX - - ENDCG - } - - // 5 - Pass { - ZTest Always - Cull Off - - CGPROGRAM - - #pragma vertex vertBlurHorizontalSGX - #pragma fragment fragBlurSGX - - ENDCG - } - } - - FallBack Off -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_BloomAndFlares/MobileBloom.shader.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_BloomAndFlares/MobileBloom.shader.meta deleted file mode 100644 index db93b36..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_BloomAndFlares/MobileBloom.shader.meta +++ /dev/null @@ -1,4 +0,0 @@ -fileFormatVersion: 2 -guid: 68a00c837b82e4c6d92e7da765dc5f1d -ShaderImporter: - userData: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_BloomAndFlares/MobileBlur.shader b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_BloomAndFlares/MobileBlur.shader deleted file mode 100644 index f51ccce..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_BloomAndFlares/MobileBlur.shader +++ /dev/null @@ -1,236 +0,0 @@ -// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' - - -Shader "Hidden/FastBlur" { - Properties { - _MainTex ("Base (RGB)", 2D) = "white" {} - _Bloom ("Bloom (RGB)", 2D) = "black" {} - } - - CGINCLUDE - - #include "UnityCG.cginc" - - sampler2D _MainTex; - sampler2D _Bloom; - - uniform half4 _MainTex_TexelSize; - half4 _MainTex_ST; - - half4 _Bloom_ST; - - uniform half4 _Parameter; - - - - struct v2f_tap - { - float4 pos : SV_POSITION; - half2 uv20 : TEXCOORD0; - half2 uv21 : TEXCOORD1; - half2 uv22 : TEXCOORD2; - half2 uv23 : TEXCOORD3; - }; - - v2f_tap vert4Tap ( appdata_img v ) - { - v2f_tap o; - - o.pos = UnityObjectToClipPos (v.vertex); - o.uv20 = UnityStereoScreenSpaceUVAdjust(v.texcoord + _MainTex_TexelSize.xy, _MainTex_ST); - o.uv21 = UnityStereoScreenSpaceUVAdjust(v.texcoord + _MainTex_TexelSize.xy * half2(-0.5h,-0.5h), _MainTex_ST); - o.uv22 = UnityStereoScreenSpaceUVAdjust(v.texcoord + _MainTex_TexelSize.xy * half2(0.5h,-0.5h), _MainTex_ST); - o.uv23 = UnityStereoScreenSpaceUVAdjust(v.texcoord + _MainTex_TexelSize.xy * half2(-0.5h,0.5h), _MainTex_ST); - - return o; - } - - fixed4 fragDownsample ( v2f_tap i ) : SV_Target - { - fixed4 color = tex2D (_MainTex, i.uv20); - color += tex2D (_MainTex, i.uv21); - color += tex2D (_MainTex, i.uv22); - color += tex2D (_MainTex, i.uv23); - return color / 4; - } - - // weight curves - - static const half curve[7] = { 0.0205, 0.0855, 0.232, 0.324, 0.232, 0.0855, 0.0205 }; // gauss'ish blur weights - - static const half4 curve4[7] = { half4(0.0205,0.0205,0.0205,0), half4(0.0855,0.0855,0.0855,0), half4(0.232,0.232,0.232,0), - half4(0.324,0.324,0.324,1), half4(0.232,0.232,0.232,0), half4(0.0855,0.0855,0.0855,0), half4(0.0205,0.0205,0.0205,0) }; - - struct v2f_withBlurCoords8 - { - float4 pos : SV_POSITION; - half4 uv : TEXCOORD0; - half2 offs : TEXCOORD1; - }; - - struct v2f_withBlurCoordsSGX - { - float4 pos : SV_POSITION; - half2 uv : TEXCOORD0; - half4 offs[3] : TEXCOORD1; - }; - - v2f_withBlurCoords8 vertBlurHorizontal (appdata_img v) - { - v2f_withBlurCoords8 o; - o.pos = UnityObjectToClipPos (v.vertex); - - o.uv = half4(v.texcoord.xy,1,1); - o.offs = _MainTex_TexelSize.xy * half2(1.0, 0.0) * _Parameter.x; - - return o; - } - - v2f_withBlurCoords8 vertBlurVertical (appdata_img v) - { - v2f_withBlurCoords8 o; - o.pos = UnityObjectToClipPos (v.vertex); - - o.uv = half4(v.texcoord.xy,1,1); - o.offs = _MainTex_TexelSize.xy * half2(0.0, 1.0) * _Parameter.x; - - return o; - } - - half4 fragBlur8 ( v2f_withBlurCoords8 i ) : SV_Target - { - half2 uv = i.uv.xy; - half2 netFilterWidth = i.offs; - half2 coords = uv - netFilterWidth * 3.0; - - half4 color = 0; - for( int l = 0; l < 7; l++ ) - { - half4 tap = tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(coords, _MainTex_ST)); - color += tap * curve4[l]; - coords += netFilterWidth; - } - return color; - } - - - v2f_withBlurCoordsSGX vertBlurHorizontalSGX (appdata_img v) - { - v2f_withBlurCoordsSGX o; - o.pos = UnityObjectToClipPos (v.vertex); - - o.uv = UnityStereoScreenSpaceUVAdjust(v.texcoord.xy, _MainTex_ST); - - half offsetMagnitude = _MainTex_TexelSize.x * _Parameter.x; - o.offs[0] = UnityStereoScreenSpaceUVAdjust(v.texcoord.xyxy + offsetMagnitude * half4(-3.0h, 0.0h, 3.0h, 0.0h), _MainTex_ST); - o.offs[1] = UnityStereoScreenSpaceUVAdjust(v.texcoord.xyxy + offsetMagnitude * half4(-2.0h, 0.0h, 2.0h, 0.0h), _MainTex_ST); - o.offs[2] = UnityStereoScreenSpaceUVAdjust(v.texcoord.xyxy + offsetMagnitude * half4(-1.0h, 0.0h, 1.0h, 0.0h), _MainTex_ST); - - return o; - } - - v2f_withBlurCoordsSGX vertBlurVerticalSGX (appdata_img v) - { - v2f_withBlurCoordsSGX o; - o.pos = UnityObjectToClipPos (v.vertex); - - o.uv = half4(UnityStereoScreenSpaceUVAdjust(v.texcoord.xy, _MainTex_ST),1,1); - - half offsetMagnitude = _MainTex_TexelSize.y * _Parameter.x; - o.offs[0] = UnityStereoScreenSpaceUVAdjust(v.texcoord.xyxy + offsetMagnitude * half4(0.0h, -3.0h, 0.0h, 3.0h), _MainTex_ST); - o.offs[1] = UnityStereoScreenSpaceUVAdjust(v.texcoord.xyxy + offsetMagnitude * half4(0.0h, -2.0h, 0.0h, 2.0h), _MainTex_ST); - o.offs[2] = UnityStereoScreenSpaceUVAdjust(v.texcoord.xyxy + offsetMagnitude * half4(0.0h, -1.0h, 0.0h, 1.0h), _MainTex_ST); - - return o; - } - - half4 fragBlurSGX ( v2f_withBlurCoordsSGX i ) : SV_Target - { - half2 uv = i.uv.xy; - - half4 color = tex2D(_MainTex, i.uv) * curve4[3]; - - for( int l = 0; l < 3; l++ ) - { - half4 tapA = tex2D(_MainTex, i.offs[l].xy); - half4 tapB = tex2D(_MainTex, i.offs[l].zw); - color += (tapA + tapB) * curve4[l]; - } - - return color; - - } - - ENDCG - - SubShader { - ZTest Off Cull Off ZWrite Off Blend Off - - // 0 - Pass { - - CGPROGRAM - - #pragma vertex vert4Tap - #pragma fragment fragDownsample - - ENDCG - - } - - // 1 - Pass { - ZTest Always - Cull Off - - CGPROGRAM - - #pragma vertex vertBlurVertical - #pragma fragment fragBlur8 - - ENDCG - } - - // 2 - Pass { - ZTest Always - Cull Off - - CGPROGRAM - - #pragma vertex vertBlurHorizontal - #pragma fragment fragBlur8 - - ENDCG - } - - // alternate blur - // 3 - Pass { - ZTest Always - Cull Off - - CGPROGRAM - - #pragma vertex vertBlurVerticalSGX - #pragma fragment fragBlurSGX - - ENDCG - } - - // 4 - Pass { - ZTest Always - Cull Off - - CGPROGRAM - - #pragma vertex vertBlurHorizontalSGX - #pragma fragment fragBlurSGX - - ENDCG - } - } - - FallBack Off -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_BloomAndFlares/MobileBlur.shader.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_BloomAndFlares/MobileBlur.shader.meta deleted file mode 100644 index 6770288..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_BloomAndFlares/MobileBlur.shader.meta +++ /dev/null @@ -1,4 +0,0 @@ -fileFormatVersion: 2 -guid: f9d5fa183cd6b45eeb1491f74863cd91 -ShaderImporter: - userData: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_BloomAndFlares/MultiPassHollywoodFlares.shader b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_BloomAndFlares/MultiPassHollywoodFlares.shader deleted file mode 100644 index 1516913..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_BloomAndFlares/MultiPassHollywoodFlares.shader +++ /dev/null @@ -1,157 +0,0 @@ -// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' - -Shader "Hidden/MultipassHollywoodFlares" { - Properties { - _MainTex ("Base (RGB)", 2D) = "" {} - _NonBlurredTex ("Base (RGB)", 2D) = "" {} - } - - CGINCLUDE - - #include "UnityCG.cginc" - - struct v2f { - half4 pos : SV_POSITION; - half2 uv : TEXCOORD0; - }; - - struct v2f_opts { - half4 pos : SV_POSITION; - half2 uv[7] : TEXCOORD0; - }; - - half4 offsets; - half4 tintColor; - - half stretchWidth; - half2 _Threshhold; - - half4 _MainTex_TexelSize; - half4 _MainTex_ST; - - sampler2D _MainTex; - sampler2D _NonBlurredTex; - - v2f vert (appdata_img v) { - v2f o; - o.pos = UnityObjectToClipPos(v.vertex); - o.uv = v.texcoord.xy; - return o; - } - - v2f_opts vertStretch (appdata_img v) { - v2f_opts o; - o.pos = UnityObjectToClipPos(v.vertex); - half b = stretchWidth; - o.uv[0] = UnityStereoScreenSpaceUVAdjust(v.texcoord.xy, _MainTex_ST); - o.uv[1] = UnityStereoScreenSpaceUVAdjust(v.texcoord.xy + b * 2.0 * offsets.xy, _MainTex_ST); - o.uv[2] = UnityStereoScreenSpaceUVAdjust(v.texcoord.xy - b * 2.0 * offsets.xy, _MainTex_ST); - o.uv[3] = UnityStereoScreenSpaceUVAdjust(v.texcoord.xy + b * 4.0 * offsets.xy, _MainTex_ST); - o.uv[4] = UnityStereoScreenSpaceUVAdjust(v.texcoord.xy - b * 4.0 * offsets.xy, _MainTex_ST); - o.uv[5] = UnityStereoScreenSpaceUVAdjust(v.texcoord.xy + b * 6.0 * offsets.xy, _MainTex_ST); - o.uv[6] = UnityStereoScreenSpaceUVAdjust(v.texcoord.xy - b * 6.0 * offsets.xy, _MainTex_ST); - return o; - } - - v2f_opts vertVerticalCoords (appdata_img v) { - v2f_opts o; - o.pos = UnityObjectToClipPos(v.vertex); - o.uv[0] = UnityStereoScreenSpaceUVAdjust(v.texcoord.xy, _MainTex_ST); - o.uv[1] = UnityStereoScreenSpaceUVAdjust(v.texcoord.xy + 0.5 * _MainTex_TexelSize.xy * half2(0,1), _MainTex_ST); - o.uv[2] = UnityStereoScreenSpaceUVAdjust(v.texcoord.xy - 0.5 * _MainTex_TexelSize.xy * half2(0,1), _MainTex_ST); - o.uv[3] = UnityStereoScreenSpaceUVAdjust(v.texcoord.xy + 1.5 * _MainTex_TexelSize.xy * half2(0,1), _MainTex_ST); - o.uv[4] = UnityStereoScreenSpaceUVAdjust(v.texcoord.xy - 1.5 * _MainTex_TexelSize.xy * half2(0,1), _MainTex_ST); - o.uv[5] = UnityStereoScreenSpaceUVAdjust(v.texcoord.xy + 2.5 * _MainTex_TexelSize.xy * half2(0,1), _MainTex_ST); - o.uv[6] = UnityStereoScreenSpaceUVAdjust(v.texcoord.xy - 2.5 * _MainTex_TexelSize.xy * half2(0,1), _MainTex_ST); - return o; - } - - // deprecated - half4 fragPrepare (v2f i) : SV_Target { - half4 color = tex2D (_MainTex, i.uv); - half4 colorNb = tex2D (_NonBlurredTex, i.uv); - return color * tintColor * 0.5 + colorNb * normalize (tintColor) * 0.5; - } - - - half4 fragPreAndCut (v2f_opts i) : SV_Target { - half4 color = tex2D (_MainTex, i.uv[0]); - color += tex2D (_MainTex, i.uv[1]); - color += tex2D (_MainTex, i.uv[2]); - color += tex2D (_MainTex, i.uv[3]); - color += tex2D (_MainTex, i.uv[4]); - color += tex2D (_MainTex, i.uv[5]); - color += tex2D (_MainTex, i.uv[6]); - return max(color / 7.0 - _Threshhold.x, 0.0) * _Threshhold.y * tintColor; - } - - half4 fragStretch (v2f_opts i) : SV_Target { - half4 color = tex2D (_MainTex, i.uv[0]); - color = max (color, tex2D (_MainTex, i.uv[1])); - color = max (color, tex2D (_MainTex, i.uv[2])); - color = max (color, tex2D (_MainTex, i.uv[3])); - color = max (color, tex2D (_MainTex, i.uv[4])); - color = max (color, tex2D (_MainTex, i.uv[5])); - color = max (color, tex2D (_MainTex, i.uv[6])); - return color; - } - - half4 fragPost (v2f_opts i) : SV_Target { - half4 color = tex2D (_MainTex, i.uv[0]); - color += tex2D (_MainTex, i.uv[1]); - color += tex2D (_MainTex, i.uv[2]); - color += tex2D (_MainTex, i.uv[3]); - color += tex2D (_MainTex, i.uv[4]); - color += tex2D (_MainTex, i.uv[5]); - color += tex2D (_MainTex, i.uv[6]); - return color * 1.0/(7.0 + Luminance(color.rgb) + 0.5); // this also makes it a little noisy - } - - ENDCG - -Subshader { - ZTest Always Cull Off ZWrite Off - Pass { - - CGPROGRAM - - #pragma vertex vert - #pragma fragment fragPrepare - - ENDCG - } - - Pass { - - CGPROGRAM - - #pragma vertex vertStretch - #pragma fragment fragStretch - - ENDCG - } - - Pass { - - CGPROGRAM - - #pragma vertex vertVerticalCoords - #pragma fragment fragPreAndCut - - ENDCG - } - - Pass { - - CGPROGRAM - - #pragma vertex vertVerticalCoords - #pragma fragment fragPost - - ENDCG - } -} - -Fallback off - -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_BloomAndFlares/MultiPassHollywoodFlares.shader.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_BloomAndFlares/MultiPassHollywoodFlares.shader.meta deleted file mode 100644 index 62c6a79..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_BloomAndFlares/MultiPassHollywoodFlares.shader.meta +++ /dev/null @@ -1,4 +0,0 @@ -fileFormatVersion: 2 -guid: e2baf3cae8edc4daf94c9adc2154be00 -ShaderImporter: - userData: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_BloomAndFlares/SeparableBlurPlus.shader b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_BloomAndFlares/SeparableBlurPlus.shader deleted file mode 100644 index ba3c60b..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_BloomAndFlares/SeparableBlurPlus.shader +++ /dev/null @@ -1,72 +0,0 @@ -// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' - -Shader "Hidden/SeparableBlurPlus" { - Properties { - _MainTex ("Base (RGB)", 2D) = "" {} - } - - CGINCLUDE - - #include "UnityCG.cginc" - - struct v2f { - half4 pos : SV_POSITION; - half2 uv : TEXCOORD0; - half4 uv01 : TEXCOORD1; - half4 uv23 : TEXCOORD2; - half4 uv45 : TEXCOORD3; - half4 uv67 : TEXCOORD4; - }; - - half4 offsets; - - sampler2D _MainTex; - half4 _MainTex_ST; - - v2f vert (appdata_img v) { - v2f o; - o.pos = UnityObjectToClipPos(v.vertex); - - o.uv.xy = v.texcoord.xy; - - o.uv01 = v.texcoord.xyxy + offsets.xyxy * half4(1,1, -1,-1); - o.uv23 = v.texcoord.xyxy + offsets.xyxy * half4(1,1, -1,-1) * 2.0; - o.uv45 = v.texcoord.xyxy + offsets.xyxy * half4(1,1, -1,-1) * 3.0; - o.uv67 = v.texcoord.xyxy + offsets.xyxy * half4(1,1, -1,-1) * 4.5; - o.uv67 = v.texcoord.xyxy + offsets.xyxy * half4(1,1, -1,-1) * 6.5; - - return o; - } - - half4 frag (v2f i) : SV_Target { - half4 color = half4 (0,0,0,0); - - color += 0.225 * tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv, _MainTex_ST)); - color += 0.150 * tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv01.xy, _MainTex_ST)); - color += 0.150 * tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv01.zw, _MainTex_ST)); - color += 0.110 * tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv23.xy, _MainTex_ST)); - color += 0.110 * tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv23.zw, _MainTex_ST)); - color += 0.075 * tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv45.xy, _MainTex_ST)); - color += 0.075 * tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv45.zw, _MainTex_ST)); - color += 0.0525 * tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv67.xy, _MainTex_ST)); - color += 0.0525 * tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv67.zw, _MainTex_ST)); - - return color; - } - - ENDCG - -Subshader { - Pass { - ZTest Always Cull Off ZWrite Off - - CGPROGRAM - #pragma vertex vert - #pragma fragment frag - ENDCG - } -} - -Fallback off - -} // shader diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_BloomAndFlares/SeparableBlurPlus.shader.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_BloomAndFlares/SeparableBlurPlus.shader.meta deleted file mode 100644 index f675def..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_BloomAndFlares/SeparableBlurPlus.shader.meta +++ /dev/null @@ -1,4 +0,0 @@ -fileFormatVersion: 2 -guid: a9df009a214e24a5ebbf271595f8d5b6 -ShaderImporter: - userData: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_BloomAndFlares/VignetteShader.shader b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_BloomAndFlares/VignetteShader.shader deleted file mode 100644 index cf3624f..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_BloomAndFlares/VignetteShader.shader +++ /dev/null @@ -1,59 +0,0 @@ -// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' - -Shader "Hidden/VignetteShader" { - Properties { - _MainTex ("Base (RGB)", 2D) = "" {} - } - - CGINCLUDE - - #include "UnityCG.cginc" - - struct v2f { - float4 pos : SV_POSITION; - float2 uv : TEXCOORD0; - }; - - sampler2D _MainTex; - - float4 _MainTex_TexelSize; - float vignetteIntensity; - - v2f vert( appdata_img v ) { - v2f o; - o.pos = UnityObjectToClipPos(v.vertex); - - o.uv = v.texcoord.xy; - return o; - } - - half4 frag(v2f i) : SV_Target { - half2 coords = i.uv; - half2 uv = i.uv; - - coords = (coords - 0.5) * 2.0; - half coordDot = dot (coords,coords); - half4 color = tex2D (_MainTex, uv); - - float mask = 1.0 - coordDot * vignetteIntensity; - return color * mask; - } - - ENDCG - -Subshader { - Pass { - ZTest Always Cull Off ZWrite Off - - CGPROGRAM - - #pragma vertex vert - #pragma fragment frag - - ENDCG - } -} - -Fallback off - -} // shader diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_BloomAndFlares/VignetteShader.shader.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_BloomAndFlares/VignetteShader.shader.meta deleted file mode 100644 index 63b6b76..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_BloomAndFlares/VignetteShader.shader.meta +++ /dev/null @@ -1,4 +0,0 @@ -fileFormatVersion: 2 -guid: 562f620336e024ac99992ff05725a89a -ShaderImporter: - userData: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_DepthOfField.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_DepthOfField.meta deleted file mode 100644 index 955cea4..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_DepthOfField.meta +++ /dev/null @@ -1,2 +0,0 @@ -fileFormatVersion: 2 -guid: d9cccf980fcb7441d85b8b3b5c2d2c34 diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_DepthOfField/Bokeh34.shader b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_DepthOfField/Bokeh34.shader deleted file mode 100644 index 7fdb621..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_DepthOfField/Bokeh34.shader +++ /dev/null @@ -1,79 +0,0 @@ - -Shader "Hidden/Dof/Bokeh34" { -Properties { - _MainTex ("Base (RGB)", 2D) = "white" {} - _Source ("Base (RGB)", 2D) = "black" {} -} - -SubShader { - CGINCLUDE - - #include "UnityCG.cginc" - - sampler2D _MainTex; - sampler2D _Source; - - uniform half4 _ArScale; - uniform half _Intensity; - uniform half4 _Source_TexelSize; - half4 _Source_ST; - - struct v2f { - half4 pos : SV_POSITION; - half2 uv2 : TEXCOORD0; - half4 source : TEXCOORD1; - }; - - #define COC bokeh.a - - v2f vert (appdata_full v) - { - v2f o; - - o.pos = v.vertex; - - o.uv2.xy = v.texcoord.xy;// * 2.0; <- needed when using Triangles.js and not Quads.js - - #if UNITY_UV_STARTS_AT_TOP - float4 bokeh = tex2Dlod (_Source, half4 (UnityStereoScreenSpaceUVAdjust(v.texcoord1.xy * half2(1,-1) + half2(0,1), _Source_ST), 0, 0)); - #else - float4 bokeh = tex2Dlod (_Source, half4 (UnityStereoScreenSpaceUVAdjust(v.texcoord1.xy, _Source_ST), 0, 0)); - #endif - - o.source = bokeh; - - o.pos.xy += (v.texcoord.xy * 2.0 - 1.0) * _ArScale.xy * COC;// + _ArScale.zw * coc; - o.source.rgb *= _Intensity; - - return o; - } - - - half4 frag (v2f i) : SV_Target - { - half4 color = tex2D (_MainTex, i.uv2.xy); - color.rgb *= i.source.rgb; - color.a *= Luminance(i.source.rgb*0.25); - return color; - } - - ENDCG - - Pass { - Blend OneMinusDstColor One - ZTest Always Cull Off ZWrite Off - - CGPROGRAM - - #pragma target 3.0 - #pragma vertex vert - #pragma fragment frag - - ENDCG - } - -} - -Fallback off - -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_DepthOfField/Bokeh34.shader.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_DepthOfField/Bokeh34.shader.meta deleted file mode 100644 index f8047da..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_DepthOfField/Bokeh34.shader.meta +++ /dev/null @@ -1,4 +0,0 @@ -fileFormatVersion: 2 -guid: 57cdacf9b217546aaa18edf39a6151c0 -ShaderImporter: - userData: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_DepthOfField/DepthOfField34.shader b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_DepthOfField/DepthOfField34.shader deleted file mode 100644 index 77efdfe..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_DepthOfField/DepthOfField34.shader +++ /dev/null @@ -1,481 +0,0 @@ -// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' - - Shader "Hidden/Dof/DepthOfField34" { - Properties { - _MainTex ("Base", 2D) = "" {} - _TapLowBackground ("TapLowBackground", 2D) = "" {} - _TapLowForeground ("TapLowForeground", 2D) = "" {} - _TapMedium ("TapMedium", 2D) = "" {} - } - - CGINCLUDE - - #include "UnityCG.cginc" - - struct v2f { - half4 pos : SV_POSITION; - half2 uv1 : TEXCOORD0; - }; - - struct v2fDofApply { - half4 pos : SV_POSITION; - half2 uv : TEXCOORD0; - }; - - struct v2fRadius { - half4 pos : SV_POSITION; - half2 uv : TEXCOORD0; - half4 uv1[4] : TEXCOORD1; - }; - - struct v2fDown { - half4 pos : SV_POSITION; - half2 uv0 : TEXCOORD0; - half2 uv[2] : TEXCOORD1; - }; - - sampler2D _MainTex; - sampler2D_float _CameraDepthTexture; - sampler2D _TapLowBackground; - sampler2D _TapLowForeground; - sampler2D _TapMedium; - - half4 _CurveParams; - half _ForegroundBlurExtrude; - uniform half3 _Threshhold; - uniform float4 _MainTex_TexelSize; - half4 _MainTex_ST; - uniform float2 _InvRenderTargetSize; - half4 _CameraDepthTexture_ST; - half4 _TapLowBackground_ST; - half4 _TapLowForeground_ST; - half4 _TapMedium_ST; - - v2f vert( appdata_img v ) { - v2f o; - o.pos = UnityObjectToClipPos (v.vertex); - o.uv1.xy = v.texcoord.xy; - return o; - } - - v2fRadius vertWithRadius( appdata_img v ) { - v2fRadius o; - o.pos = UnityObjectToClipPos(v.vertex); - o.uv.xy = UnityStereoScreenSpaceUVAdjust(v.texcoord.xy, _MainTex_ST); - - const half2 blurOffsets[4] = { - half2(-0.5, +1.5), - half2(+0.5, -1.5), - half2(+1.5, +0.5), - half2(-1.5, -0.5) - }; - - o.uv1[0].xy = UnityStereoScreenSpaceUVAdjust(v.texcoord.xy + 5.0 * _MainTex_TexelSize.xy * blurOffsets[0], _MainTex_ST); - o.uv1[1].xy = UnityStereoScreenSpaceUVAdjust(v.texcoord.xy + 5.0 * _MainTex_TexelSize.xy * blurOffsets[1], _MainTex_ST); - o.uv1[2].xy = UnityStereoScreenSpaceUVAdjust(v.texcoord.xy + 5.0 * _MainTex_TexelSize.xy * blurOffsets[2], _MainTex_ST); - o.uv1[3].xy = UnityStereoScreenSpaceUVAdjust(v.texcoord.xy + 5.0 * _MainTex_TexelSize.xy * blurOffsets[3], _MainTex_ST); - - o.uv1[0].zw = UnityStereoScreenSpaceUVAdjust(v.texcoord.xy + 3.0 * _MainTex_TexelSize.xy * blurOffsets[0], _MainTex_ST); - o.uv1[1].zw = UnityStereoScreenSpaceUVAdjust(v.texcoord.xy + 3.0 * _MainTex_TexelSize.xy * blurOffsets[1], _MainTex_ST); - o.uv1[2].zw = UnityStereoScreenSpaceUVAdjust(v.texcoord.xy + 3.0 * _MainTex_TexelSize.xy * blurOffsets[2], _MainTex_ST); - o.uv1[3].zw = UnityStereoScreenSpaceUVAdjust(v.texcoord.xy + 3.0 * _MainTex_TexelSize.xy * blurOffsets[3], _MainTex_ST); - - return o; - } - - v2fDofApply vertDofApply( appdata_img v ) { - v2fDofApply o; - o.pos = UnityObjectToClipPos(v.vertex); - o.uv.xy = v.texcoord.xy; - return o; - } - - v2fDown vertDownsampleWithCocConserve(appdata_img v) { - v2fDown o; - o.pos = UnityObjectToClipPos(v.vertex); - o.uv0.xy = v.texcoord.xy; - o.uv[0].xy = v.texcoord.xy + half2(-1.0,-1.0) * _InvRenderTargetSize; - o.uv[1].xy = v.texcoord.xy + half2(1.0,-1.0) * _InvRenderTargetSize; - return o; - } - - half4 BokehPrereqs (sampler2D tex, half4 uv1[4], half4 center, half considerCoc) { - - // @NOTE 1: - // we are checking for 3 things in order to create a bokeh. - // goal is to get the highest bang for the buck. - // 1.) contrast/frequency should be very high (otherwise bokeh mostly unvisible) - // 2.) luminance should be high - // 3.) no occluder nearby (stored in alpha channel) - - // @NOTE 2: about the alpha channel in littleBlur: - // the alpha channel stores an heuristic on how likely it is - // that there is no bokeh occluder nearby. - // if we didn't' check for that, we'd get very noise bokeh - // popping because of the sudden contrast changes - - half4 sampleA = tex2D(tex, uv1[0].zw); - half4 sampleB = tex2D(tex, uv1[1].zw); - half4 sampleC = tex2D(tex, uv1[2].zw); - half4 sampleD = tex2D(tex, uv1[3].zw); - - half4 littleBlur = 0.125 * (sampleA + sampleB + sampleC + sampleD); - - sampleA = tex2D(tex, uv1[0].xy); - sampleB = tex2D(tex, uv1[1].xy); - sampleC = tex2D(tex, uv1[2].xy); - sampleD = tex2D(tex, uv1[3].xy); - - littleBlur += 0.125 * (sampleA + sampleB + sampleC + sampleD); - - littleBlur = lerp (littleBlur, center, saturate(100.0 * considerCoc * abs(littleBlur.a - center.a))); - - return littleBlur; - } - - half4 fragDownsampleWithCocConserve(v2fDown i) : SV_Target { - half2 rowOfs[4]; - - rowOfs[0] = half2(0.0, 0.0); - rowOfs[1] = half2(0.0, _InvRenderTargetSize.y); - rowOfs[2] = half2(0.0, _InvRenderTargetSize.y) * 2.0; - rowOfs[3] = half2(0.0, _InvRenderTargetSize.y) * 3.0; - - half4 color = tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv0.xy, _MainTex_ST)); - - half4 sampleA = tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv[0].xy + rowOfs[0], _MainTex_ST)); - half4 sampleB = tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv[1].xy + rowOfs[0], _MainTex_ST)); - half4 sampleC = tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv[0].xy + rowOfs[2], _MainTex_ST)); - half4 sampleD = tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv[1].xy + rowOfs[2], _MainTex_ST)); - - color += sampleA + sampleB + sampleC + sampleD; - color *= 0.2; - - // @NOTE we are doing max on the alpha channel for 2 reasons: - // 1) foreground blur likes a slightly bigger radius - // 2) otherwise we get an ugly outline between high blur- and medium blur-areas - // drawback: we get a little bit of color bleeding - - color.a = max(max(sampleA.a, sampleB.a), max(sampleC.a, sampleD.a)); - - return color; - } - - half4 fragDofApplyBg (v2fDofApply i) : SV_Target { - half4 tapHigh = tex2D (_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv.xy, _MainTex_ST)); - - #if UNITY_UV_STARTS_AT_TOP - if (_MainTex_TexelSize.y < 0) - i.uv.xy = i.uv.xy * half2(1,-1)+half2(0,1); - #endif - - half4 tapLow = tex2D (_TapLowBackground, UnityStereoScreenSpaceUVAdjust(i.uv.xy, _TapLowBackground_ST)); // already mixed with medium blur - tapHigh = lerp (tapHigh, tapLow, tapHigh.a); - return tapHigh; - } - - half4 fragDofApplyBgDebug (v2fDofApply i) : SV_Target { - half4 tapHigh = tex2D (_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv.xy, _MainTex_ST)); - - half4 tapLow = tex2D (_TapLowBackground, UnityStereoScreenSpaceUVAdjust(i.uv.xy, _TapLowBackground_ST)); - - half4 tapMedium = tex2D (_TapMedium, UnityStereoScreenSpaceUVAdjust(i.uv.xy, _TapMedium_ST)); - tapMedium.rgb = (tapMedium.rgb + half3 (1, 1, 0)) * 0.5; - tapLow.rgb = (tapLow.rgb + half3 (0, 1, 0)) * 0.5; - - tapLow = lerp (tapMedium, tapLow, saturate (tapLow.a * tapLow.a)); - tapLow = tapLow * 0.5 + tex2D (_TapLowBackground, UnityStereoScreenSpaceUVAdjust(i.uv.xy, _TapLowBackground_ST)) * 0.5; - - return lerp (tapHigh, tapLow, tapHigh.a); - } - - half4 fragDofApplyFg (v2fDofApply i) : SV_Target { - half4 fgBlur = tex2D(_TapLowForeground, UnityStereoScreenSpaceUVAdjust(i.uv.xy, _TapLowForeground_ST)); - - #if UNITY_UV_STARTS_AT_TOP - if (_MainTex_TexelSize.y < 0) - i.uv.xy = i.uv.xy * half2(1,-1)+half2(0,1); - #endif - - half4 fgColor = tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv.xy, _MainTex_ST)); - - //fgBlur.a = saturate(fgBlur.a*_ForegroundBlurWeight+saturate(fgColor.a-fgBlur.a)); - //fgBlur.a = max (fgColor.a, (2.0 * fgBlur.a - fgColor.a)) * _ForegroundBlurExtrude; - fgBlur.a = max(fgColor.a, fgBlur.a * _ForegroundBlurExtrude); //max (fgColor.a, (2.0*fgBlur.a-fgColor.a)) * _ForegroundBlurExtrude; - - return lerp (fgColor, fgBlur, saturate(fgBlur.a)); - } - - half4 fragDofApplyFgDebug (v2fDofApply i) : SV_Target { - half4 fgBlur = tex2D(_TapLowForeground, UnityStereoScreenSpaceUVAdjust(i.uv.xy, _TapLowForeground_ST)); - - half4 fgColor = tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv.xy, _MainTex_ST)); - - fgBlur.a = max(fgColor.a, fgBlur.a * _ForegroundBlurExtrude); //max (fgColor.a, (2.0*fgBlur.a-fgColor.a)) * _ForegroundBlurExtrude; - - half4 tapMedium = half4 (1, 1, 0, fgBlur.a); - tapMedium.rgb = 0.5 * (tapMedium.rgb + fgColor.rgb); - - fgBlur.rgb = 0.5 * (fgBlur.rgb + half3(0,1,0)); - fgBlur.rgb = lerp (tapMedium.rgb, fgBlur.rgb, saturate (fgBlur.a * fgBlur.a)); - - return lerp ( fgColor, fgBlur, saturate(fgBlur.a)); - } - - half4 fragCocBg (v2f i) : SV_Target { - - float d = SAMPLE_DEPTH_TEXTURE (_CameraDepthTexture, UnityStereoScreenSpaceUVAdjust(i.uv1.xy, _MainTex_ST)); - d = Linear01Depth (d); - half coc = 0.0; - - half focalDistance01 = _CurveParams.w + _CurveParams.z; - - if (d > focalDistance01) - coc = (d - focalDistance01); - - coc = saturate (coc * _CurveParams.y); - return coc; - } - - half4 fragCocFg (v2f i) : SV_Target { - half4 color = tex2D (_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv1.xy, _MainTex_ST)); - color.a = 0.0; - - #if UNITY_UV_STARTS_AT_TOP - if (_MainTex_TexelSize.y < 0) - i.uv1.xy = i.uv1.xy * half2(1,-1)+half2(0,1); - #endif - - float d = SAMPLE_DEPTH_TEXTURE (_CameraDepthTexture, UnityStereoScreenSpaceUVAdjust(i.uv1.xy, _MainTex_ST)); - d = Linear01Depth (d); - - half focalDistance01 = (_CurveParams.w - _CurveParams.z); - - if (d < focalDistance01) - color.a = (focalDistance01 - d); - - color.a = saturate (color.a * _CurveParams.x); - return color; - } - - // not being used atm - - half4 fragMask (v2f i) : SV_Target { - return half4(0,0,0,0); - } - - // used for simple one one blend - - half4 fragAddBokeh (v2f i) : SV_Target { - half4 from = tex2D( _MainTex, UnityStereoScreenSpaceUVAdjust(i.uv1.xy, _MainTex_ST) ); - return from; - } - - half4 fragAddFgBokeh (v2f i) : SV_Target { - half4 from = tex2D( _MainTex, UnityStereoScreenSpaceUVAdjust(i.uv1.xy, _MainTex_ST) ); - return from; - } - - half4 fragDarkenForBokeh(v2fRadius i) : SV_Target { - half4 fromOriginal = tex2D(_MainTex, i.uv.xy); - half4 lowRez = BokehPrereqs (_MainTex, i.uv1, fromOriginal, _Threshhold.z); - half4 outColor = half4(0,0,0, fromOriginal.a); - half modulate = fromOriginal.a; - - // this code imitates the if-then-else conditions below - half2 conditionCheck = half2( dot(abs(fromOriginal.rgb-lowRez.rgb), half3(0.3,0.5,0.2)), Luminance(fromOriginal.rgb)); - conditionCheck *= fromOriginal.a; - conditionCheck = saturate(_Threshhold.xy - conditionCheck); - outColor = lerp (outColor, fromOriginal, saturate (dot(conditionCheck, half2(1000.0,1000.0)))); - - /* - if ( abs(dot(fromOriginal.rgb - lowRez.rgb, half3 (0.3,0.5,0.2))) * modulate < _Threshhold.x) - outColor = fromOriginal; // no darkening - if (Luminance(fromOriginal.rgb) * modulate < _Threshhold.y) - outColor = fromOriginal; // no darkening - if (lowRez.a < _Threshhold.z) // need to make foreground not cast false bokeh's - outColor = fromOriginal; // no darkenin - */ - - return outColor; - } - - half4 fragExtractAndAddToBokeh (v2fRadius i) : SV_Target { - half4 from = tex2D(_MainTex, i.uv.xy); - half4 lowRez = BokehPrereqs(_MainTex, i.uv1, from, _Threshhold.z); - half4 outColor = from; - - // this code imitates the if-then-else conditions below - half2 conditionCheck = half2( dot(abs(from.rgb-lowRez.rgb), half3(0.3,0.5,0.2)), Luminance(from.rgb)); - conditionCheck *= from.a; - conditionCheck = saturate(_Threshhold.xy - conditionCheck); - outColor = lerp (outColor, half4(0,0,0,0), saturate (dot(conditionCheck, half2(1000.0,1000.0)))); - - /* - if ( abs(dot(from.rgb - lowRez.rgb, half3 (0.3,0.5,0.2))) * modulate < _Threshhold.x) - outColor = half4(0,0,0,0); // don't add - if (Luminance(from.rgb) * modulate < _Threshhold.y) - outColor = half4(0,0,0,0); // don't add - if (lowRez.a < _Threshhold.z) // need to make foreground not cast false bokeh's - outColor = half4(0,0,0,0); // don't add - */ - - return outColor; - } - - ENDCG - -Subshader { - - // pass 0 - - Pass { - ZTest Always Cull Off ZWrite Off - - CGPROGRAM - #pragma vertex vertDofApply - #pragma fragment fragDofApplyBg - ENDCG - } - - // pass 1 - - Pass { - ZTest Always Cull Off ZWrite Off - ColorMask RGB - - CGPROGRAM - #pragma vertex vertDofApply - #pragma fragment fragDofApplyFgDebug - ENDCG - } - - // pass 2 - - Pass { - ZTest Always Cull Off ZWrite Off - ColorMask RGB - - CGPROGRAM - #pragma vertex vertDofApply - #pragma fragment fragDofApplyBgDebug - ENDCG - } - - - - // pass 3 - - Pass { - ZTest Always Cull Off ZWrite Off - ColorMask A - - CGPROGRAM - #pragma vertex vert - #pragma fragment fragCocBg - ENDCG - } - - - // pass 4 - - - Pass { - ZTest Always Cull Off ZWrite Off - ColorMask RGB - //Blend One One - - CGPROGRAM - #pragma vertex vertDofApply - #pragma fragment fragDofApplyFg - ENDCG - } - - // pass 5 - - Pass { - ZTest Always Cull Off ZWrite Off - ColorMask ARGB - - CGPROGRAM - #pragma vertex vert - #pragma fragment fragCocFg - ENDCG - } - - // pass 6 - - Pass { - ZTest Always Cull Off ZWrite Off - - CGPROGRAM - #pragma vertex vertDownsampleWithCocConserve - #pragma fragment fragDownsampleWithCocConserve - ENDCG - } - - // pass 7 - // not being used atm - - Pass { - ZTest Always Cull Off ZWrite Off - ColorMask RGBA - - CGPROGRAM - #pragma vertex vert - #pragma fragment fragMask - ENDCG - } - - // pass 8 - - Pass { - ZTest Always Cull Off ZWrite Off - Blend SrcAlpha OneMinusSrcAlpha - ColorMask RGB - - CGPROGRAM - #pragma vertex vert - #pragma fragment fragAddBokeh - ENDCG - } - - // pass 9 - - Pass { - ZTest Always Cull Off ZWrite Off - Blend One One - ColorMask RGB - - CGPROGRAM - #pragma vertex vertWithRadius - #pragma fragment fragExtractAndAddToBokeh - ENDCG - } - - // pass 10 - - Pass { - ZTest Always Cull Off ZWrite Off - - CGPROGRAM - #pragma vertex vertWithRadius - #pragma fragment fragDarkenForBokeh - ENDCG - } - - // pass 11 - - Pass { - ZTest Always Cull Off ZWrite Off - - CGPROGRAM - #pragma vertex vertWithRadius - #pragma fragment fragExtractAndAddToBokeh - ENDCG - } - } - -Fallback off - -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_DepthOfField/DepthOfField34.shader.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_DepthOfField/DepthOfField34.shader.meta deleted file mode 100644 index b86195b..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_DepthOfField/DepthOfField34.shader.meta +++ /dev/null @@ -1,4 +0,0 @@ -fileFormatVersion: 2 -guid: 987fb0677d01f43ce8a9dbf12271e668 -ShaderImporter: - userData: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_DepthOfField/DepthOfFieldDX11.shader b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_DepthOfField/DepthOfFieldDX11.shader deleted file mode 100644 index b62ca13..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_DepthOfField/DepthOfFieldDX11.shader +++ /dev/null @@ -1,261 +0,0 @@ -// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' - - -/* - DX11 Depth Of Field - pretty much just does bokeh texture splatting - - basic algorithm: - - * find bright spots - * verify high frequency (otherwise dont care) - * if possitive, replace with black pixel and add to append buffer - * box blur buffer (thus smearing black pixels) - * blend bokeh texture sprites via append buffer on top of box blurred buffer - * composite with frame buffer -*/ - -Shader "Hidden/Dof/DX11Dof" -{ - Properties - { - _MainTex ("", 2D) = "white" {} - _BlurredColor ("", 2D) = "white" {} - _FgCocMask ("", 2D) = "white" {} - } - - CGINCLUDE - - #define BOKEH_ZERO_VEC (float4(0,0,0,0)) - #define BOKEH_ONE_VEC (float4(1,1,1,1)) - - float4 _BokehParams; // legend: dx11BokehScale, dx11BokehIntensity,dx11BokehThreshhold, internalBlurWidth - float4 _MainTex_TexelSize; - float3 _Screen; - float _SpawnHeuristic; - - sampler2D_float _CameraDepthTexture; - sampler2D _BlurredColor; - sampler2D _MainTex; - sampler2D _FgCocMask; - - half4 _MainTex_ST; - - - struct appendStruct { - float3 pos; - float4 color; - }; - - struct gs_out { - float4 pos : SV_POSITION; - float3 uv : TEXCOORD0; - float4 color : TEXCOORD1; - float4 misc : TEXCOORD2; - }; - - // TODO: activate border clamp tex sampler state instead? - inline float4 clampBorderColor(float2 uv) - { -#if 1 - if(uv.x<=0) return BOKEH_ZERO_VEC; if(uv.x>=1) return BOKEH_ZERO_VEC; - if(uv.y<=0) return BOKEH_ZERO_VEC; if(uv.y>=1) return BOKEH_ZERO_VEC; -#endif - return BOKEH_ONE_VEC; - } - - struct vs_out { - float4 pos : SV_POSITION; - float4 color : TEXCOORD1; - float cocOverlap : TEXCOORD2; - }; - - StructuredBuffer pointBuffer; - - vs_out vertApply (uint id : SV_VertexID) - { - vs_out o; - float2 pos = pointBuffer[id].pos.xy ; - o.pos = float4(pos * 2.0 - 1.0, 0, 1); - o.color = pointBuffer[id].color; - #if UNITY_UV_STARTS_AT_TOP - o.pos.y *= -1; - #endif - o.cocOverlap = pointBuffer[id].pos.z; - - return o; - } - - [maxvertexcount(4)] - void geom (point vs_out input[1], inout TriangleStream outStream) - { - // NEW ENERGY CONSERVATION: - - float2 scale2 = _BokehParams.ww * input[0].color.aa * _BokehParams.xx; - float4 offs = 0; - offs.xy = float2(3.0, 3.0) + 2.0f * floor(scale2 + float2(0.5,0.5)); - - float2 rs = ((float2(1.0, 1.0) + 2.0f * (scale2 + float2(0.5,0.5))));; - float2 f2 = offs.xy / rs; - - float energyAdjustment = (_BokehParams.y) / (rs.x*rs.y); - offs.xy *= _Screen.xy; - - gs_out output; - - output.pos = input[0].pos + offs*float4(-1,1,0,0); - output.misc = float4(f2,0,0); - output.uv = float3(0, 1, input[0].cocOverlap); - output.color = input[0].color * energyAdjustment; - outStream.Append (output); - - output.pos = input[0].pos + offs*float4(1,1,0,0); - output.misc = float4(f2,0,0); - output.uv = float3(1, 1, input[0].cocOverlap); - output.color = input[0].color * energyAdjustment; - outStream.Append (output); - - output.pos = input[0].pos + offs*float4(-1,-1,0,0); - output.misc = float4(f2,0,0); - output.uv = float3(0, 0, input[0].cocOverlap); - output.color = input[0].color * energyAdjustment; - outStream.Append (output); - - output.pos = input[0].pos + offs*float4(1,-1,0,0); - output.misc = float4(f2,0,0); - output.uv = float3(1, 0, input[0].cocOverlap); - output.color = input[0].color * energyAdjustment; - outStream.Append (output); - - outStream.RestartStrip(); - } - -ENDCG - -SubShader -{ - -// pass 0: append buffer "collect" - -Pass -{ - ZWrite Off ZTest Always Cull Off - - CGPROGRAM - - #pragma vertex vert - #pragma fragment frag - #pragma target 5.0 - - #include "UnityCG.cginc" - - struct appdata { - float4 vertex : POSITION; - float2 texcoord : TEXCOORD0; - }; - - struct v2f { - float4 pos : SV_POSITION; - float2 uv_flip : TEXCOORD0; - float2 uv : TEXCOORD1; - }; - - v2f vert (appdata v) - { - v2f o; - o.pos = UnityObjectToClipPos (v.vertex); - o.uv = UnityStereoScreenSpaceUVAdjust(v.texcoord, _MainTex_ST); - o.uv_flip = UnityStereoScreenSpaceUVAdjust(v.texcoord, _MainTex_ST); - #if UNITY_UV_STARTS_AT_TOP - if(_MainTex_TexelSize.y<0) - o.uv_flip.y = 1.0-o.uv_flip.y; - if(_MainTex_TexelSize.y<0) - o.pos.y *= -1.0; - #endif - return o; - } - - AppendStructuredBuffer pointBufferOutput : register(u1); - - float4 frag (v2f i) : SV_Target - { - float4 c = tex2D (_MainTex, i.uv_flip); - float lumc = Luminance (c.rgb); - - float4 cblurred = tex2D (_BlurredColor, i.uv); - float lumblurred = Luminance (cblurred.rgb); - - float fgCoc = tex2D(_FgCocMask, i.uv).a; - - [branch] - if (c.a * _BokehParams.w > 1 && cblurred.a > 0.1 && lumc > _BokehParams.z && abs(lumc-lumblurred) > _SpawnHeuristic) - { - appendStruct append; - append.pos = float3(i.uv, fgCoc); - append.color.rgba = float4(c.rgb * saturate(c.a*4), c.a); - pointBufferOutput.Append (append); - return float4(c.rgb * saturate(1-c.a*4), c.a); - } - - return c; - } - ENDCG -} - -// pass 1: bokeh splatting (low resolution) - -Pass { - - ZWrite Off ZTest Always Cull Off - Blend One One, One One - ColorMask RGBA - - CGPROGRAM - - #pragma target 5.0 - #pragma vertex vertApply - #pragma geometry geom - #pragma fragment frag - - #include "UnityCG.cginc" - - fixed4 frag (gs_out i) : SV_Target - { - float2 uv = UnityStereoScreenSpaceUVAdjust((i.uv.xy) * i.misc.xy + (float2(1,1)-i.misc.xy) * 0.5, _MainTex_ST); // smooth uv scale - return float4(i.color.rgb, 1) * float4(tex2D(_MainTex, uv.xy).rgb, i.uv.z) * clampBorderColor (uv); - } - - ENDCG -} - -// pass 2: bokeh splatting (high resolution) - -Pass { - - ZWrite Off ZTest Always Cull Off - BlendOp Add, Add - Blend DstAlpha One, Zero One - ColorMask RGBA - - CGPROGRAM - - #pragma target 5.0 - #pragma vertex vertApply - #pragma geometry geom - #pragma fragment frag - - #include "UnityCG.cginc" - - fixed4 frag (gs_out i) : SV_Target - { - float2 uv = UnityStereoScreenSpaceUVAdjust((i.uv.xy) * i.misc.xy + (float2(1,1)-i.misc.xy) * 0.5, _MainTex_ST); // smooth uv scale - return float4(i.color.rgb, 1) * float4(tex2D(_MainTex, uv.xy).rgb, i.uv.z) * clampBorderColor (uv); - } - - ENDCG -} - -} - -Fallback Off -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_DepthOfField/DepthOfFieldDX11.shader.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_DepthOfField/DepthOfFieldDX11.shader.meta deleted file mode 100644 index 15935f1..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_DepthOfField/DepthOfFieldDX11.shader.meta +++ /dev/null @@ -1,4 +0,0 @@ -fileFormatVersion: 2 -guid: d8e82664aa8686642a424c88ab10164a -ShaderImporter: - userData: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_DepthOfField/DepthOfFieldScatter.shader b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_DepthOfField/DepthOfFieldScatter.shader deleted file mode 100644 index 6623699..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_DepthOfField/DepthOfFieldScatter.shader +++ /dev/null @@ -1,941 +0,0 @@ -// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' - - Shader "Hidden/Dof/DepthOfFieldHdr" { - Properties { - _MainTex ("-", 2D) = "black" {} - _FgOverlap ("-", 2D) = "black" {} - _LowRez ("-", 2D) = "black" {} - } - - CGINCLUDE - - #include "UnityCG.cginc" - - struct v2f { - float4 pos : SV_POSITION; - float2 uv : TEXCOORD0; - float2 uv1 : TEXCOORD1; - }; - - struct v2fRadius { - float4 pos : SV_POSITION; - float2 uv : TEXCOORD0; - float4 uv1[4] : TEXCOORD1; - }; - - struct v2fBlur { - float4 pos : SV_POSITION; - float2 uv : TEXCOORD0; - float4 uv01 : TEXCOORD1; - float4 uv23 : TEXCOORD2; - float4 uv45 : TEXCOORD3; - float4 uv67 : TEXCOORD4; - float4 uv89 : TEXCOORD5; - }; - - uniform sampler2D _MainTex; - uniform sampler2D_float _CameraDepthTexture; - uniform sampler2D _FgOverlap; - uniform sampler2D _LowRez; - uniform float4 _CurveParams; - uniform float4 _MainTex_TexelSize; - half4 _MainTex_ST; - uniform float4 _Offsets; - - half4 _CameraDepthTexture_ST; - half4 _LowRez_ST; - half4 _FgOverlap_ST; - - v2f vert( appdata_img v ) - { - v2f o; - o.pos = UnityObjectToClipPos (v.vertex); - o.uv1.xy = v.texcoord.xy; - o.uv.xy = v.texcoord.xy; - - #if UNITY_UV_STARTS_AT_TOP - if (_MainTex_TexelSize.y < 0) - o.uv.y = 1-o.uv.y; - #endif - - return o; - } - - v2f vertFlip( appdata_img v ) - { - v2f o; - o.pos = UnityObjectToClipPos (v.vertex); - o.uv1.xy = v.texcoord.xy; - o.uv.xy = v.texcoord.xy; - - #if UNITY_UV_STARTS_AT_TOP - if (_MainTex_TexelSize.y < 0) - o.uv.y = 1-o.uv.y; - if (_MainTex_TexelSize.y < 0) - o.uv1.y = 1-o.uv1.y; - #endif - - return o; - } - - v2fBlur vertBlurPlusMinus (appdata_img v) - { - v2fBlur o; - o.pos = UnityObjectToClipPos(v.vertex); - o.uv.xy = UnityStereoScreenSpaceUVAdjust(v.texcoord.xy, _MainTex_ST); - o.uv01 = UnityStereoScreenSpaceUVAdjust(v.texcoord.xyxy + _Offsets.xyxy * float4(1,1, -1,-1) * _MainTex_TexelSize.xyxy / 6.0, _MainTex_ST); - o.uv23 = UnityStereoScreenSpaceUVAdjust(v.texcoord.xyxy + _Offsets.xyxy * float4(2,2, -2,-2) * _MainTex_TexelSize.xyxy / 6.0, _MainTex_ST); - o.uv45 = UnityStereoScreenSpaceUVAdjust(v.texcoord.xyxy + _Offsets.xyxy * float4(3,3, -3,-3) * _MainTex_TexelSize.xyxy / 6.0, _MainTex_ST); - o.uv67 = UnityStereoScreenSpaceUVAdjust(v.texcoord.xyxy + _Offsets.xyxy * float4(4,4, -4,-4) * _MainTex_TexelSize.xyxy / 6.0, _MainTex_ST); - o.uv89 = UnityStereoScreenSpaceUVAdjust(v.texcoord.xyxy + _Offsets.xyxy * float4(5,5, -5,-5) * _MainTex_TexelSize.xyxy / 6.0, _MainTex_ST); - return o; - } - - #define SCATTER_OVERLAP_SMOOTH (-0.265) - - inline float BokehWeightDisc(float4 theSample, float sampleDistance, float4 centerSample) - { - return smoothstep(SCATTER_OVERLAP_SMOOTH, 0.0, theSample.a - centerSample.a*sampleDistance); - } - - inline float2 BokehWeightDisc2(float4 sampleA, float4 sampleB, float2 sampleDistance2, float4 centerSample) - { - return smoothstep(float2(SCATTER_OVERLAP_SMOOTH, SCATTER_OVERLAP_SMOOTH), float2(0.0,0.0), float2(sampleA.a, sampleB.a) - centerSample.aa*sampleDistance2); } - - static const int SmallDiscKernelSamples = 12; - static const float2 SmallDiscKernel[SmallDiscKernelSamples] = - { - float2(-0.326212,-0.40581), - float2(-0.840144,-0.07358), - float2(-0.695914,0.457137), - float2(-0.203345,0.620716), - float2(0.96234,-0.194983), - float2(0.473434,-0.480026), - float2(0.519456,0.767022), - float2(0.185461,-0.893124), - float2(0.507431,0.064425), - float2(0.89642,0.412458), - float2(-0.32194,-0.932615), - float2(-0.791559,-0.59771) - }; - - static const int NumDiscSamples = 28; - static const float3 DiscKernel[NumDiscSamples] = - { - float3(0.62463,0.54337,0.82790), - float3(-0.13414,-0.94488,0.95435), - float3(0.38772,-0.43475,0.58253), - float3(0.12126,-0.19282,0.22778), - float3(-0.20388,0.11133,0.23230), - float3(0.83114,-0.29218,0.88100), - float3(0.10759,-0.57839,0.58831), - float3(0.28285,0.79036,0.83945), - float3(-0.36622,0.39516,0.53876), - float3(0.75591,0.21916,0.78704), - float3(-0.52610,0.02386,0.52664), - float3(-0.88216,-0.24471,0.91547), - float3(-0.48888,-0.29330,0.57011), - float3(0.44014,-0.08558,0.44838), - float3(0.21179,0.51373,0.55567), - float3(0.05483,0.95701,0.95858), - float3(-0.59001,-0.70509,0.91938), - float3(-0.80065,0.24631,0.83768), - float3(-0.19424,-0.18402,0.26757), - float3(-0.43667,0.76751,0.88304), - float3(0.21666,0.11602,0.24577), - float3(0.15696,-0.85600,0.87027), - float3(-0.75821,0.58363,0.95682), - float3(0.99284,-0.02904,0.99327), - float3(-0.22234,-0.57907,0.62029), - float3(0.55052,-0.66984,0.86704), - float3(0.46431,0.28115,0.54280), - float3(-0.07214,0.60554,0.60982), - }; - - float4 fragBlurInsaneMQ (v2f i) : SV_Target - { - float4 centerTap = tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv1.xy, _MainTex_ST)); - float4 sum = centerTap; - float4 poissonScale = _MainTex_TexelSize.xyxy * centerTap.a * _Offsets.w; - - float sampleCount = max(centerTap.a * 0.25, _Offsets.z); // <- weighing with 0.25 looks nicer for small high freq spec - sum *= sampleCount; - - float weights = 0; - - for(int l=0; l < NumDiscSamples; l++) - { - float2 sampleUV = i.uv1.xy + DiscKernel[l].xy * poissonScale.xy; - float4 sample0 = tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(sampleUV.xy, _MainTex_ST)); - - if( sample0.a > 0.0 ) - { - weights = BokehWeightDisc(sample0, DiscKernel[l].z, centerTap); - sum += sample0 * weights; - sampleCount += weights; - } - } - - float4 returnValue = sum / sampleCount; - returnValue.a = centerTap.a; - - return returnValue; - } - - float4 fragBlurInsaneHQ (v2f i) : SV_Target - { - float4 centerTap = tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv1.xy, _MainTex_ST)); - float4 sum = centerTap; - float4 poissonScale = _MainTex_TexelSize.xyxy * centerTap.a * _Offsets.w; - - float sampleCount = max(centerTap.a * 0.25, _Offsets.z); // <- weighing with 0.25 looks nicer for small high freq spec - sum *= sampleCount; - - float2 weights = 0; - - for(int l=0; l < NumDiscSamples; l++) - { - float4 sampleUV = i.uv1.xyxy + DiscKernel[l].xyxy * poissonScale.xyxy / float4(1.2,1.2,DiscKernel[l].zz); - - float4 sample0 = tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(sampleUV.xy, _MainTex_ST)); - float4 sample1 = tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(sampleUV.zw, _MainTex_ST)); - - if( (sample0.a + sample1.a) > 0.0 ) - { - weights = BokehWeightDisc2(sample0, sample1, float2(DiscKernel[l].z/1.2, 1.0), centerTap); - sum += sample0 * weights.x + sample1 * weights.y; - sampleCount += dot(weights, 1); - } - } - - float4 returnValue = sum / sampleCount; - returnValue.a = centerTap.a; - - return returnValue; - } - - inline float4 BlendLowWithHighHQ(float coc, float4 low, float4 high) - { - float blend = smoothstep(0.65,0.85, coc); - return lerp(low, high, blend); - } - - inline float4 BlendLowWithHighMQ(float coc, float4 low, float4 high) - { - float blend = smoothstep(0.4,0.6, coc); - return lerp(low, high, blend); - } - - float4 fragBlurUpsampleCombineHQ (v2f i) : SV_Target - { - float4 bigBlur = tex2D(_LowRez, UnityStereoScreenSpaceUVAdjust(i.uv1.xy, _LowRez_ST)); - float4 centerTap = tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv1.xy, _MainTex_ST)); - - float4 smallBlur = centerTap; - float4 poissonScale = _MainTex_TexelSize.xyxy * centerTap.a * _Offsets.w ; - - float sampleCount = max(centerTap.a * 0.25, 0.1f); // <- weighing with 0.25 looks nicer for small high freq spec - smallBlur *= sampleCount; - - for(int l=0; l < NumDiscSamples; l++) - { - float2 sampleUV = i.uv1.xy + DiscKernel[l].xy * poissonScale.xy; - - float4 sample0 = tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(sampleUV, _MainTex_ST)); - float weight0 = BokehWeightDisc(sample0, DiscKernel[l].z, centerTap); - smallBlur += sample0 * weight0; sampleCount += weight0; - } - - smallBlur /= (sampleCount+1e-5f); - smallBlur = BlendLowWithHighHQ(centerTap.a, smallBlur, bigBlur); - - return centerTap.a < 1e-2f ? centerTap : float4(smallBlur.rgb,centerTap.a); - } - - float4 fragBlurUpsampleCombineMQ (v2f i) : SV_Target - { - float4 bigBlur = tex2D(_LowRez, UnityStereoScreenSpaceUVAdjust(i.uv1.xy, _LowRez_ST)); - float4 centerTap = tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv1.xy, _MainTex_ST)); - - float4 smallBlur = centerTap; - float4 poissonScale = _MainTex_TexelSize.xyxy * centerTap.a * _Offsets.w ; - - float sampleCount = max(centerTap.a * 0.25, 0.1f); // <- weighing with 0.25 looks nicer for small high freq spec - smallBlur *= sampleCount; - - for(int l=0; l < SmallDiscKernelSamples; l++) - { - float2 sampleUV = i.uv1.xy + SmallDiscKernel[l].xy * poissonScale.xy*1.1; - - float4 sample0 = tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(sampleUV, _MainTex_ST)); - float weight0 = BokehWeightDisc(sample0, length(SmallDiscKernel[l].xy*1.1), centerTap); - smallBlur += sample0 * weight0; sampleCount += weight0; - } - - smallBlur /= (sampleCount+1e-5f); - - smallBlur = BlendLowWithHighMQ(centerTap.a, smallBlur, bigBlur); - - return centerTap.a < 1e-2f ? centerTap : float4(smallBlur.rgb,centerTap.a); - } - - float4 fragBlurUpsampleCheap (v2f i) : SV_Target - { - float4 centerTap = tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv1.xy, _MainTex_ST)); - float4 bigBlur = tex2D(_LowRez, UnityStereoScreenSpaceUVAdjust(i.uv1.xy, _LowRez_ST)); - - float fgCoc = tex2D(_FgOverlap, UnityStereoScreenSpaceUVAdjust(i.uv1.xy, _FgOverlap_ST)).a; - float4 smallBlur = lerp(centerTap, bigBlur, saturate( max(centerTap.a,fgCoc)*8.0 )); - - return float4(smallBlur.rgb, centerTap.a); - } - - float4 fragBlurBox (v2f i) : SV_Target - { - const int TAPS = 12; - - float4 centerTap = tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv1.xy, _MainTex_ST)); - - // TODO: important ? breaks when HR blur is being used - //centerTap.a = max(centerTap.a, 0.1f); - - float sampleCount = centerTap.a; - float4 sum = centerTap * sampleCount; - - float2 lenStep = centerTap.aa * (1.0 / (TAPS-1.0)); - float4 steps = (_Offsets.xyxy * _MainTex_TexelSize.xyxy) * lenStep.xyxy * float4(1,1, -1,-1); - - for(int l=1; l 1e-5f) outColor.rgb = color.rgb/sumWeights; - - return outColor; - } - - float4 fragCaptureColorAndSignedCoc (v2f i) : SV_Target - { - float4 color = tex2D (_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv1.xy, _MainTex_ST)); - float d = SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture, UnityStereoScreenSpaceUVAdjust(i.uv1.xy, _CameraDepthTexture_ST)); - d = Linear01Depth (d); - color.a = _CurveParams.z * abs(d - _CurveParams.w) / (d + 1e-5f); - color.a = clamp( max(0.0, color.a - _CurveParams.y), 0.0, _CurveParams.x) * sign(d - _CurveParams.w); - - return color; - } - - float4 fragCaptureCoc (v2f i) : SV_Target - { - float4 color = float4(0,0,0,0); //tex2D (_MainTex, i.uv1.xy); - float d = SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture, UnityStereoScreenSpaceUVAdjust(i.uv1.xy, _CameraDepthTexture_ST)); - d = Linear01Depth (d); - color.a = _CurveParams.z * abs(d - _CurveParams.w) / (d + 1e-5f); - color.a = clamp( max(0.0, color.a - _CurveParams.y), 0.0, _CurveParams.x); - - return color; - } - - float4 AddFgCoc (v2f i) : SV_Target - { - return tex2D (_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv1.xy, _MainTex_ST)); - } - - float4 fragMergeCoc (v2f i) : SV_Target - { - float4 color = tex2D (_FgOverlap, UnityStereoScreenSpaceUVAdjust(i.uv.xy, _FgOverlap_ST)); // this is the foreground overlap value - float fgCoc = color.a; - - float d = SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture, UnityStereoScreenSpaceUVAdjust(i.uv1.xy, _CameraDepthTexture_ST)); - d = Linear01Depth (d); - color.a = _CurveParams.z * abs(d - _CurveParams.w) / (d + 1e-5f); - color.a = clamp( max(0.0, color.a - _CurveParams.y), 0.0, _CurveParams.x); - - return max(color.aaaa, float4(fgCoc,fgCoc,fgCoc,fgCoc)); - } - - float4 fragCombineCocWithMaskBlur (v2f i) : SV_Target - { - float bgAndFgCoc = tex2D (_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv1.xy, _MainTex_ST)).a; - float fgOverlapCoc = tex2D (_FgOverlap, UnityStereoScreenSpaceUVAdjust(i.uv1.xy, _FgOverlap_ST)).a; - - return (bgAndFgCoc < 0.01) * saturate(fgOverlapCoc-bgAndFgCoc); - } - - float4 fragCaptureForegroundCoc (v2f i) : SV_Target - { - float4 color = float4(0,0,0,0); //tex2D (_MainTex, i.uv1.xy); - float d = SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture, UnityStereoScreenSpaceUVAdjust(i.uv1.xy, _CameraDepthTexture_ST)); - d = Linear01Depth (d); - color.a = _CurveParams.z * (_CurveParams.w-d) / (d + 1e-5f); - color.a = clamp(max(0.0, color.a - _CurveParams.y), 0.0, _CurveParams.x); - - return color; - } - - float4 fragCaptureForegroundCocMask (v2f i) : SV_Target - { - float4 color = float4(0,0,0,0); - float d = SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture, UnityStereoScreenSpaceUVAdjust(i.uv1.xy, _CameraDepthTexture_ST)); - d = Linear01Depth (d); - color.a = _CurveParams.z * (_CurveParams.w-d) / (d + 1e-5f); - color.a = clamp(max(0.0, color.a - _CurveParams.y), 0.0, _CurveParams.x); - - return color.a > 0; - } - - float4 fragBlendInHighRez (v2f i) : SV_Target - { - float4 tapHighRez = tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv.xy, _MainTex_ST)); - return float4(tapHighRez.rgb, 1.0-saturate(tapHighRez.a*5.0)); - } - - float4 fragBlendInLowRezParts (v2f i) : SV_Target - { - float4 from = tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv1.xy, _MainTex_ST)); - from.a = saturate(from.a * _Offsets.w) / (_CurveParams.x + 1e-5f); - float square = from.a * from.a; - from.a = square * square * _CurveParams.x; - return from; - } - - float4 fragUpsampleWithAlphaMask(v2f i) : SV_Target - { - float4 c = tex2D(_MainTex, i.uv1.xy); - return c; - } - - float4 fragAlphaMask(v2f i) : SV_Target - { - float4 c = tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv1.xy, _MainTex_ST)); - c.a = saturate(c.a*100.0); - return c; - } - - ENDCG - -Subshader -{ - - // pass 0 - - Pass { - ZTest Always Cull Off ZWrite Off - ColorMask A - - CGPROGRAM - - #pragma target 3.0 - #pragma vertex vert - #pragma fragment fragCaptureCoc - - ENDCG - } - - // pass 1 - - Pass - { - ZTest Always Cull Off ZWrite Off - - CGPROGRAM - - #pragma target 3.0 - #pragma vertex vertBlurPlusMinus - #pragma fragment fragGaussBlur - - ENDCG - } - - // pass 2 - - Pass { - ZTest Always Cull Off ZWrite Off - - CGPROGRAM - - #pragma target 3.0 - #pragma vertex vertBlurPlusMinus - #pragma fragment fragBlurForFgCoc - - ENDCG - } - - - // pass 3 - - Pass - { - ZTest Always Cull Off ZWrite Off - ColorMask A - BlendOp Max, Max - Blend One One, One One - - CGPROGRAM - - #pragma target 3.0 - #pragma vertex vert - #pragma fragment AddFgCoc - - ENDCG - } - - - // pass 4 - - Pass - { - ZTest Always Cull Off ZWrite Off - ColorMask A - - CGPROGRAM - - #pragma target 3.0 - #pragma vertex vert - #pragma fragment fragCaptureForegroundCoc - - ENDCG - } - - // pass 5 - - Pass { - ZTest Always Cull Off ZWrite Off - - CGPROGRAM - - #pragma target 3.0 - #pragma vertex vert - #pragma fragment fragBlurBox - - ENDCG - } - - // pass 6 - - Pass { - ZTest Always Cull Off ZWrite Off - - CGPROGRAM - - #pragma target 3.0 - #pragma vertex vert - #pragma fragment frag4TapBlurForLRSpawn - - ENDCG - } - - // pass 7 - - Pass { - ZTest Always Cull Off ZWrite Off - ColorMask RGB - Blend SrcAlpha OneMinusSrcAlpha - - CGPROGRAM - - #pragma target 3.0 - #pragma vertex vert - #pragma fragment fragBlendInHighRez - - ENDCG - } - - // pass 8 - - Pass - { - ZTest Always Cull Off ZWrite Off - ColorMask A - - CGPROGRAM - - #pragma target 3.0 - #pragma vertex vert - #pragma fragment fragCaptureForegroundCocMask - - ENDCG - } - - - // pass 9 - - Pass { - ZTest Always Cull Off ZWrite Off - - CGPROGRAM - - #pragma target 3.0 - #pragma vertex vert - #pragma fragment fragBlurUpsampleCheap - - ENDCG - } - - // pass 10 - - Pass { - ZTest Always Cull Off ZWrite Off - - CGPROGRAM - - #pragma target 3.0 - #pragma vertex vert - #pragma fragment fragCaptureColorAndSignedCoc - - ENDCG - } - - // pass 11 - - Pass { - ZTest Always Cull Off ZWrite Off - - CGPROGRAM - - #pragma target 3.0 - #pragma vertex vert - #pragma fragment fragBlurInsaneMQ - - ENDCG - } - - // pass 12 - - Pass { - ZTest Always Cull Off ZWrite Off - - CGPROGRAM - - #pragma target 3.0 - #pragma vertex vert - #pragma fragment fragBlurUpsampleCombineMQ - - ENDCG - } - - // pass 13 - Pass { - ZTest Always Cull Off ZWrite Off - - ColorMask A - - CGPROGRAM - - #pragma target 3.0 - #pragma vertex vert - #pragma fragment fragMergeCoc - - ENDCG - } - - // pass 14 - - Pass { - ZTest Always Cull Off ZWrite Off - - ColorMask A - BlendOp Max, Max - Blend One One, One One - - CGPROGRAM - - #pragma target 3.0 - #pragma vertex vert - #pragma fragment fragCombineCocWithMaskBlur - - ENDCG - } - - // pass 15 - - Pass { - ZTest Always Cull Off ZWrite Off - - CGPROGRAM - - #pragma target 3.0 - #pragma vertex vert - #pragma fragment fragBoxDownsample - - ENDCG - } - - // pass 16 - Pass { - ZTest Always Cull Off ZWrite Off - - CGPROGRAM - - #pragma target 3.0 - #pragma vertex vert - #pragma fragment fragVisualize - - ENDCG - } - - // pass 17 - - Pass { - ZTest Always Cull Off ZWrite Off - - CGPROGRAM - - #pragma target 3.0 - #pragma vertex vert - #pragma fragment fragBlurInsaneHQ - - ENDCG - } - - // pass 18 - - Pass { - ZTest Always Cull Off ZWrite Off - - CGPROGRAM - - #pragma target 3.0 - #pragma vertex vert - #pragma fragment fragBlurUpsampleCombineHQ - - ENDCG - } - - // pass 19 - - Pass { - ZTest Always Cull Off ZWrite Off - - CGPROGRAM - - #pragma target 3.0 - #pragma vertex vertBlurPlusMinus - #pragma fragment fragBlurAlphaWeighted - - ENDCG - } - - // pass 20 - - Pass { - ZTest Always Cull Off ZWrite Off - - CGPROGRAM - - #pragma target 3.0 - #pragma vertex vert - #pragma fragment fragAlphaMask - - ENDCG - } - - // pass 21 - - Pass { - ZTest Always Cull Off ZWrite Off - - BlendOp Add, Add - Blend DstAlpha OneMinusDstAlpha, Zero One - - CGPROGRAM - - #pragma target 3.0 - #pragma vertex vertFlip - #pragma fragment fragBlurBox - - ENDCG - } - - // pass 22 - - Pass { - ZTest Always Cull Off ZWrite Off - - // destination alpha needs to stay intact as we have layed alpha before - BlendOp Add, Add - Blend DstAlpha One, Zero One - - CGPROGRAM - - #pragma target 3.0 - #pragma vertex vert - #pragma fragment fragUpsampleWithAlphaMask - - ENDCG - } -} - -Fallback off - -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_DepthOfField/DepthOfFieldScatter.shader.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_DepthOfField/DepthOfFieldScatter.shader.meta deleted file mode 100644 index b38c974..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_DepthOfField/DepthOfFieldScatter.shader.meta +++ /dev/null @@ -1,4 +0,0 @@ -fileFormatVersion: 2 -guid: acd613035ff3e455e8abf23fdc8c8c24 -ShaderImporter: - userData: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_DepthOfField/SeparableBlur.shader b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_DepthOfField/SeparableBlur.shader deleted file mode 100644 index 7c8713e..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_DepthOfField/SeparableBlur.shader +++ /dev/null @@ -1,69 +0,0 @@ -// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' - -Shader "Hidden/SeparableBlur" { - Properties { - _MainTex ("Base (RGB)", 2D) = "" {} - } - - CGINCLUDE - - #include "UnityCG.cginc" - - struct v2f { - float4 pos : SV_POSITION; - float2 uv : TEXCOORD0; - - float4 uv01 : TEXCOORD1; - float4 uv23 : TEXCOORD2; - float4 uv45 : TEXCOORD3; - }; - - float4 offsets; - - sampler2D _MainTex; - half4 _MainTex_ST; - - v2f vert (appdata_img v) { - v2f o; - o.pos = UnityObjectToClipPos(v.vertex); - - o.uv.xy = UnityStereoScreenSpaceUVAdjust(v.texcoord.xy, _MainTex_ST); - - o.uv01 = UnityStereoScreenSpaceUVAdjust(v.texcoord.xyxy + offsets.xyxy * float4(1,1, -1,-1), _MainTex_ST); - o.uv23 = UnityStereoScreenSpaceUVAdjust(v.texcoord.xyxy + offsets.xyxy * float4(1,1, -1,-1) * 2.0, _MainTex_ST); - o.uv45 = UnityStereoScreenSpaceUVAdjust(v.texcoord.xyxy + offsets.xyxy * float4(1,1, -1,-1) * 3.0, _MainTex_ST); - - return o; - } - - half4 frag (v2f i) : SV_Target { - half4 color = float4 (0,0,0,0); - - color += 0.40 * tex2D (_MainTex, i.uv); - color += 0.15 * tex2D (_MainTex, i.uv01.xy); - color += 0.15 * tex2D (_MainTex, i.uv01.zw); - color += 0.10 * tex2D (_MainTex, i.uv23.xy); - color += 0.10 * tex2D (_MainTex, i.uv23.zw); - color += 0.05 * tex2D (_MainTex, i.uv45.xy); - color += 0.05 * tex2D (_MainTex, i.uv45.zw); - - return color; - } - - ENDCG - -Subshader { - Pass { - ZTest Always Cull Off ZWrite Off - - CGPROGRAM - #pragma vertex vert - #pragma fragment frag - ENDCG - } -} - -Fallback off - - -} // shader diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_DepthOfField/SeparableBlur.shader.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_DepthOfField/SeparableBlur.shader.meta deleted file mode 100644 index b9f6a84..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_DepthOfField/SeparableBlur.shader.meta +++ /dev/null @@ -1,4 +0,0 @@ -fileFormatVersion: 2 -guid: e97c14fbb5ea04c3a902cc533d7fc5d1 -ShaderImporter: - userData: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_DepthOfField/SeparableWeightedBlurDof34.shader b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_DepthOfField/SeparableWeightedBlurDof34.shader deleted file mode 100644 index 1fe8cfb..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_DepthOfField/SeparableWeightedBlurDof34.shader +++ /dev/null @@ -1,244 +0,0 @@ -// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' - -Shader "Hidden/SeparableWeightedBlurDof34" { - Properties { - _MainTex ("Base (RGB)", 2D) = "" {} - _TapMedium ("TapMedium (RGB)", 2D) = "" {} - _TapLow ("TapLow (RGB)", 2D) = "" {} - _TapHigh ("TapHigh (RGB)", 2D) = "" {} - } - - CGINCLUDE - - #include "UnityCG.cginc" - - half4 offsets; - half4 _Threshhold; - sampler2D _MainTex; - sampler2D _TapHigh; - - half4 _MainTex_ST; - - struct v2f { - half4 pos : SV_POSITION; - half2 uv : TEXCOORD0; - half4 uv01 : TEXCOORD1; - half4 uv23 : TEXCOORD2; - half4 uv45 : TEXCOORD3; - }; - - struct v2fSingle { - half4 pos : SV_POSITION; - half2 uv : TEXCOORD0; - }; - - // - // VERT PROGRAMS - // - - v2f vert (appdata_img v) { - v2f o; - o.pos = UnityObjectToClipPos(v.vertex); - o.uv.xy = UnityStereoScreenSpaceUVAdjust(v.texcoord.xy, _MainTex_ST); - o.uv01 = UnityStereoScreenSpaceUVAdjust(v.texcoord.xyxy + offsets.xyxy * half4(1,1, -1,-1), _MainTex_ST); - o.uv23 = UnityStereoScreenSpaceUVAdjust(v.texcoord.xyxy + offsets.xyxy * half4(1,1, -1,-1) * 2.0, _MainTex_ST); - o.uv45 = UnityStereoScreenSpaceUVAdjust(v.texcoord.xyxy + offsets.xyxy * half4(1,1, -1,-1) * 3.0, _MainTex_ST); - - return o; - } - - v2fSingle vertSingleTex (appdata_img v) { - v2fSingle o; - o.pos = UnityObjectToClipPos(v.vertex); - o.uv.xy = v.texcoord.xy; - return o; - } - - // - // FRAG PROGRAMS - // - - // mostly used for foreground, so more gaussian-like - - half4 fragBlurUnweighted (v2f i) : SV_Target { - half4 blurredColor = half4 (0,0,0,0); - - half4 sampleA = tex2D(_MainTex, i.uv.xy); - half4 sampleB = tex2D(_MainTex, i.uv01.xy); - half4 sampleC = tex2D(_MainTex, i.uv01.zw); - half4 sampleD = tex2D(_MainTex, i.uv23.xy); - half4 sampleE = tex2D(_MainTex, i.uv23.zw); - - blurredColor += sampleA; - blurredColor += sampleB; - blurredColor += sampleC; - blurredColor += sampleD; - blurredColor += sampleE; - - blurredColor *= 0.2; - - blurredColor.a = max(UNITY_SAMPLE_1CHANNEL(_TapHigh, i.uv.xy), blurredColor.a); - - return blurredColor; - } - - // used for background, so more bone curve-like - - half4 fragBlurWeighted (v2f i) : SV_Target { - half4 blurredColor = half4 (0,0,0,0); - - half4 sampleA = tex2D(_MainTex, i.uv.xy); - half4 sampleB = tex2D(_MainTex, i.uv01.xy); - half4 sampleC = tex2D(_MainTex, i.uv01.zw); - half4 sampleD = tex2D(_MainTex, i.uv23.xy); - half4 sampleE = tex2D(_MainTex, i.uv23.zw); - - half sum = sampleA.a + dot (half4 (1.25, 1.25, 1.5, 1.5), half4 (sampleB.a,sampleC.a,sampleD.a,sampleE.a)); - - sampleA.rgb = sampleA.rgb * sampleA.a; - sampleB.rgb = sampleB.rgb * sampleB.a * 1.25; - sampleC.rgb = sampleC.rgb * sampleC.a * 1.25; - sampleD.rgb = sampleD.rgb * sampleD.a * 1.5; - sampleE.rgb = sampleE.rgb * sampleE.a * 1.5; - - blurredColor += sampleA; - blurredColor += sampleB; - blurredColor += sampleC; - blurredColor += sampleD; - blurredColor += sampleE; - - blurredColor /= sum; - half4 color = blurredColor; - - color.a = sampleA.a; - - return color; - } - - half4 fragBlurDark (v2f i) : SV_Target { - half4 blurredColor = half4 (0,0,0,0); - - half4 sampleA = tex2D(_MainTex, i.uv.xy); - half4 sampleB = tex2D(_MainTex, i.uv01.xy); - half4 sampleC = tex2D(_MainTex, i.uv01.zw); - half4 sampleD = tex2D(_MainTex, i.uv23.xy); - half4 sampleE = tex2D(_MainTex, i.uv23.zw); - - half sum = sampleA.a + dot (half4 (0.75, 0.75, 0.5, 0.5), half4 (sampleB.a,sampleC.a,sampleD.a,sampleE.a)); - - sampleA.rgb = sampleA.rgb * sampleA.a; - sampleB.rgb = sampleB.rgb * sampleB.a * 0.75; - sampleC.rgb = sampleC.rgb * sampleC.a * 0.75; - sampleD.rgb = sampleD.rgb * sampleD.a * 0.5; - sampleE.rgb = sampleE.rgb * sampleE.a * 0.5; - - blurredColor += sampleA; - blurredColor += sampleB; - blurredColor += sampleC; - blurredColor += sampleD; - blurredColor += sampleE; - - blurredColor /= sum; - half4 color = blurredColor; - - color.a = sampleA.a; - - return color; - } - - // not used atm - - half4 fragBlurUnweightedDark (v2f i) : SV_Target { - half4 blurredColor = half4 (0,0,0,0); - - half4 sampleA = tex2D(_MainTex, i.uv.xy); - half4 sampleB = tex2D(_MainTex, i.uv01.xy); - half4 sampleC = tex2D(_MainTex, i.uv01.zw); - half4 sampleD = tex2D(_MainTex, i.uv23.xy); - half4 sampleE = tex2D(_MainTex, i.uv23.zw); - - blurredColor += sampleA; - blurredColor += sampleB * 0.75; - blurredColor += sampleC * 0.75; - blurredColor += sampleD * 0.5; - blurredColor += sampleE * 0.5; - - blurredColor /= 3.5; - - blurredColor.a = max(UNITY_SAMPLE_1CHANNEL(_TapHigh, i.uv.xy), blurredColor.a); - - return blurredColor; - } - - // fragMixMediumAndLowTap - // happens before applying final coc/blur result to screen, - // mixes defocus buffers of different resolutions / bluriness - - sampler2D _TapMedium; - sampler2D _TapLow; - - half4 _TapMedium_ST; - half4 _TapLow_ST; - - half4 fragMixMediumAndLowTap (v2fSingle i) : SV_Target - { - half4 tapMedium = tex2D (_TapMedium, UnityStereoScreenSpaceUVAdjust(i.uv.xy, _TapMedium_ST)); - half4 tapLow = tex2D (_TapLow, UnityStereoScreenSpaceUVAdjust(i.uv.xy, _TapLow_ST)); - tapMedium.a *= tapMedium.a; - - tapLow.rgb = lerp (tapMedium.rgb, tapLow.rgb, (tapMedium.a * tapMedium.a)); - return tapLow; - } - - ENDCG - -Subshader { - ZTest Always Cull Off ZWrite Off - - Pass { - - CGPROGRAM - - #pragma vertex vert - #pragma fragment fragBlurWeighted - ENDCG - } - Pass { - CGPROGRAM - - #pragma vertex vert - #pragma fragment fragBlurUnweighted - ENDCG - } - - // 2 - - Pass { - CGPROGRAM - - #pragma vertex vert - #pragma fragment fragBlurUnweightedDark - ENDCG - } - Pass { - CGPROGRAM - - #pragma vertex vertSingleTex - #pragma fragment fragMixMediumAndLowTap - ENDCG - } - - // 4 - - Pass { - CGPROGRAM - - #pragma vertex vert - #pragma fragment fragBlurDark - ENDCG - } -} - -Fallback off - -} // shader diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_DepthOfField/SeparableWeightedBlurDof34.shader.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_DepthOfField/SeparableWeightedBlurDof34.shader.meta deleted file mode 100644 index 2fae7fc..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_DepthOfField/SeparableWeightedBlurDof34.shader.meta +++ /dev/null @@ -1,4 +0,0 @@ -fileFormatVersion: 2 -guid: bb4af680337344a4abad65a4e8873c50 -ShaderImporter: - userData: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_DepthOfField/TiltShiftHdrLensBlur.shader b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_DepthOfField/TiltShiftHdrLensBlur.shader deleted file mode 100644 index 5d2c3c1..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/_DepthOfField/TiltShiftHdrLensBlur.shader +++ /dev/null @@ -1,382 +0,0 @@ -// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' - - - Shader "Hidden/Dof/TiltShiftHdrLensBlur" { - Properties { - _MainTex ("-", 2D) = "" {} - _Blurred ("-", 2D) = "" {} - } - - CGINCLUDE - - #include "UnityCG.cginc" - - struct v2f - { - float4 pos : SV_POSITION; - float2 uv : TEXCOORD0; - float2 uv1 : TEXCOORD1; - }; - - sampler2D _MainTex; - sampler2D _Blurred; - - float4 _MainTex_TexelSize; - half4 _MainTex_ST; - half4 _Blurred_ST; - float _BlurSize; - float _BlurArea; - - #if defined(SHADER_API_D3D11) || defined(SHADER_API_GLCORE) || defined(SHADER_API_METAL) - #define SAMPLE_TEX(sampler, uv) tex2Dlod(sampler, float4(uv,0,1)) - #else - #define SAMPLE_TEX(sampler, uv) tex2D(sampler, uv) - #endif - - v2f vert (appdata_img v) - { - v2f o; - o.pos = UnityObjectToClipPos (v.vertex); - o.uv.xy = v.texcoord; - o.uv1.xy = v.texcoord; - - #if UNITY_UV_STARTS_AT_TOP - if (_MainTex_TexelSize.y < 0) - o.uv1.y = 1-o.uv1.y; - #else - - #endif - - return o; - } - - static const int SmallDiscKernelSamples = 12; - static const float2 SmallDiscKernel[SmallDiscKernelSamples] = - { - float2(-0.326212,-0.40581), - float2(-0.840144,-0.07358), - float2(-0.695914,0.457137), - float2(-0.203345,0.620716), - float2(0.96234,-0.194983), - float2(0.473434,-0.480026), - float2(0.519456,0.767022), - float2(0.185461,-0.893124), - float2(0.507431,0.064425), - float2(0.89642,0.412458), - float2(-0.32194,-0.932615), - float2(-0.791559,-0.59771) - }; - - static const int NumDiscSamples = 28; - static const float3 DiscKernel[NumDiscSamples] = - { - float3(0.62463,0.54337,0.82790), - float3(-0.13414,-0.94488,0.95435), - float3(0.38772,-0.43475,0.58253), - float3(0.12126,-0.19282,0.22778), - float3(-0.20388,0.11133,0.23230), - float3(0.83114,-0.29218,0.88100), - float3(0.10759,-0.57839,0.58831), - float3(0.28285,0.79036,0.83945), - float3(-0.36622,0.39516,0.53876), - float3(0.75591,0.21916,0.78704), - float3(-0.52610,0.02386,0.52664), - float3(-0.88216,-0.24471,0.91547), - float3(-0.48888,-0.29330,0.57011), - float3(0.44014,-0.08558,0.44838), - float3(0.21179,0.51373,0.55567), - float3(0.05483,0.95701,0.95858), - float3(-0.59001,-0.70509,0.91938), - float3(-0.80065,0.24631,0.83768), - float3(-0.19424,-0.18402,0.26757), - float3(-0.43667,0.76751,0.88304), - float3(0.21666,0.11602,0.24577), - float3(0.15696,-0.85600,0.87027), - float3(-0.75821,0.58363,0.95682), - float3(0.99284,-0.02904,0.99327), - float3(-0.22234,-0.57907,0.62029), - float3(0.55052,-0.66984,0.86704), - float3(0.46431,0.28115,0.54280), - float3(-0.07214,0.60554,0.60982), - }; - - float WeightFieldMode (float2 uv) - { - float2 tapCoord = uv*2.0-1.0; - return (abs(tapCoord.y * _BlurArea)); - } - - float WeightIrisMode (float2 uv) - { - float2 tapCoord = (uv*2.0-1.0); - return dot(tapCoord, tapCoord) * _BlurArea; - } - - float4 fragIrisPreview (v2f i) : SV_Target - { - return WeightIrisMode(i.uv.xy) * 0.5; - } - - float4 fragFieldPreview (v2f i) : SV_Target - { - return WeightFieldMode(i.uv.xy) * 0.5; - } - - float4 fragUpsample (v2f i) : SV_Target - { - float4 blurred = tex2D(_Blurred, UnityStereoScreenSpaceUVAdjust(i.uv1.xy, _Blurred_ST)); - float4 frame = tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv.xy, _MainTex_ST)); - - return lerp(frame, blurred, saturate(blurred.a)); - } - - float4 fragIrisLow(v2f i) : SV_Target - { - float4 centerTap = tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv.xy, _MainTex_ST)); - float4 sum = centerTap; - - float w = clamp(WeightIrisMode(i.uv.xy), 0, _BlurSize); - - float4 poissonScale = _MainTex_TexelSize.xyxy * w; - -#ifndef SHADER_API_D3D9 - if (w<1e-2f) - return sum; -#endif - - for (int l = 0; l _Params.y) { - // This sample occludes, contribute to occlusion - occ += pow(1-zd,_Params.z); // sc2 - //occ += 1.0-saturate(pow(1.0 - zd, 11.0) + zd); // nullsq - //occ += 1.0/(1.0+zd*zd*10); // iq - } - } - occ /= sampleCount; - return 1-occ; -} - diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/frag_ao.cginc.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/frag_ao.cginc.meta deleted file mode 100644 index 604d5f5..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Shaders/frag_ao.cginc.meta +++ /dev/null @@ -1,4 +0,0 @@ -fileFormatVersion: 2 -guid: 51ae11a5cd82fda468a85179946d672a -ShaderImporter: - userData: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Textures.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Textures.meta deleted file mode 100644 index f926ce3..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Textures.meta +++ /dev/null @@ -1,6 +0,0 @@ -fileFormatVersion: 2 -guid: f9372f23586ef470b97d53856af88487 -folderAsset: yes -DefaultImporter: - userData: - assetBundleName: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Textures/ContrastEnhanced3D16.png b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Textures/ContrastEnhanced3D16.png deleted file mode 100644 index c112c75..0000000 Binary files a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Textures/ContrastEnhanced3D16.png and /dev/null differ diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Textures/ContrastEnhanced3D16.png.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Textures/ContrastEnhanced3D16.png.meta deleted file mode 100644 index 37553ce..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Textures/ContrastEnhanced3D16.png.meta +++ /dev/null @@ -1,35 +0,0 @@ -fileFormatVersion: 2 -guid: ecd9a2c463dcb476891e43d7c9f16ffa -TextureImporter: - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - linearTexture: 0 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 1 - grayScaleToAlpha: 0 - generateCubemap: 0 - seamlessCubemap: 0 - textureFormat: -3 - maxTextureSize: 2048 - textureSettings: - filterMode: -1 - aniso: -1 - mipBias: -1 - wrapMode: -1 - nPOTScale: 1 - lightmap: 0 - compressionQuality: 50 - textureType: 5 - buildTargetSettings: [] - userData: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Textures/HexShape.psd b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Textures/HexShape.psd deleted file mode 100644 index eef48cb..0000000 Binary files a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Textures/HexShape.psd and /dev/null differ diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Textures/HexShape.psd.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Textures/HexShape.psd.meta deleted file mode 100644 index fec782b..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Textures/HexShape.psd.meta +++ /dev/null @@ -1,35 +0,0 @@ -fileFormatVersion: 2 -guid: a4cdca73d61814d33ac1587f6c163bca -TextureImporter: - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 1 - linearTexture: 0 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - seamlessCubemap: 0 - textureFormat: -1 - maxTextureSize: 64 - textureSettings: - filterMode: -1 - aniso: -1 - mipBias: -1 - wrapMode: 1 - nPOTScale: 1 - lightmap: 0 - compressionQuality: 50 - textureType: -1 - buildTargetSettings: [] - userData: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Textures/MotionBlurJitter.png b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Textures/MotionBlurJitter.png deleted file mode 100644 index a601a2e..0000000 Binary files a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Textures/MotionBlurJitter.png and /dev/null differ diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Textures/MotionBlurJitter.png.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Textures/MotionBlurJitter.png.meta deleted file mode 100644 index 2e825d5..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Textures/MotionBlurJitter.png.meta +++ /dev/null @@ -1,35 +0,0 @@ -fileFormatVersion: 2 -guid: 31f5a8611c4ed1245b18456206e798dc -TextureImporter: - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - linearTexture: 0 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 2 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - seamlessCubemap: 0 - textureFormat: 3 - maxTextureSize: 1024 - textureSettings: - filterMode: 1 - aniso: 1 - mipBias: -1 - wrapMode: 0 - nPOTScale: 0 - lightmap: 0 - compressionQuality: 50 - textureType: -1 - buildTargetSettings: [] - userData: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Textures/Neutral3D16.png b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Textures/Neutral3D16.png deleted file mode 100644 index fc0f026..0000000 Binary files a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Textures/Neutral3D16.png and /dev/null differ diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Textures/Neutral3D16.png.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Textures/Neutral3D16.png.meta deleted file mode 100644 index 43038ad..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Textures/Neutral3D16.png.meta +++ /dev/null @@ -1,35 +0,0 @@ -fileFormatVersion: 2 -guid: a4b474cd484494a4aaa4bbf928219d09 -TextureImporter: - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - linearTexture: 0 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 1 - grayScaleToAlpha: 0 - generateCubemap: 0 - seamlessCubemap: 0 - textureFormat: -3 - maxTextureSize: 2048 - textureSettings: - filterMode: -1 - aniso: -1 - mipBias: -1 - wrapMode: -1 - nPOTScale: 1 - lightmap: 0 - compressionQuality: 50 - textureType: 5 - buildTargetSettings: [] - userData: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Textures/Noise.png b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Textures/Noise.png deleted file mode 100644 index a601a2e..0000000 Binary files a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Textures/Noise.png and /dev/null differ diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Textures/Noise.png.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Textures/Noise.png.meta deleted file mode 100644 index b48fd5f..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Textures/Noise.png.meta +++ /dev/null @@ -1,35 +0,0 @@ -fileFormatVersion: 2 -guid: e80c3c84ea861404d8a427db8b7abf04 -TextureImporter: - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - linearTexture: 0 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 2 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - seamlessCubemap: 0 - textureFormat: 3 - maxTextureSize: 64 - textureSettings: - filterMode: 2 - aniso: 1 - mipBias: -1 - wrapMode: 0 - nPOTScale: 0 - lightmap: 0 - compressionQuality: 50 - textureType: -1 - buildTargetSettings: [] - userData: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Textures/NoiseAndGrain.png b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Textures/NoiseAndGrain.png deleted file mode 100644 index 9faabd4..0000000 Binary files a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Textures/NoiseAndGrain.png and /dev/null differ diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Textures/NoiseAndGrain.png.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Textures/NoiseAndGrain.png.meta deleted file mode 100644 index 387edde..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Textures/NoiseAndGrain.png.meta +++ /dev/null @@ -1,35 +0,0 @@ -fileFormatVersion: 2 -guid: 7a632f967e8ad42f5bd275898151ab6a -TextureImporter: - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - linearTexture: 1 - correctGamma: 1 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 1 - generateCubemap: 0 - seamlessCubemap: 0 - textureFormat: -1 - maxTextureSize: 64 - textureSettings: - filterMode: -1 - aniso: -1 - mipBias: -1 - wrapMode: -1 - nPOTScale: 1 - lightmap: 0 - compressionQuality: 50 - textureType: 5 - buildTargetSettings: [] - userData: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Textures/NoiseEffectGrain.png b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Textures/NoiseEffectGrain.png deleted file mode 100644 index ba027b4..0000000 Binary files a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Textures/NoiseEffectGrain.png and /dev/null differ diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Textures/NoiseEffectGrain.png.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Textures/NoiseEffectGrain.png.meta deleted file mode 100644 index 47510da..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Textures/NoiseEffectGrain.png.meta +++ /dev/null @@ -1,35 +0,0 @@ -fileFormatVersion: 2 -guid: ffa9c02760c2b4e8eb9814ec06c4b05b -TextureImporter: - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 1 - linearTexture: 0 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 2 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - seamlessCubemap: 0 - textureFormat: 3 - maxTextureSize: 1024 - textureSettings: - filterMode: 1 - aniso: 1 - mipBias: 0 - wrapMode: 0 - nPOTScale: 0 - lightmap: 0 - compressionQuality: 50 - textureType: -1 - buildTargetSettings: [] - userData: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Textures/NoiseEffectScratch.png b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Textures/NoiseEffectScratch.png deleted file mode 100644 index 6ac0d53..0000000 Binary files a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Textures/NoiseEffectScratch.png and /dev/null differ diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Textures/NoiseEffectScratch.png.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Textures/NoiseEffectScratch.png.meta deleted file mode 100644 index 3d3e680..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Textures/NoiseEffectScratch.png.meta +++ /dev/null @@ -1,35 +0,0 @@ -fileFormatVersion: 2 -guid: 6205c27cc031f4e66b8ea90d1bfaa158 -TextureImporter: - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 1 - linearTexture: 0 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 2 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - seamlessCubemap: 0 - textureFormat: -1 - maxTextureSize: 1024 - textureSettings: - filterMode: 1 - aniso: 1 - mipBias: 0 - wrapMode: 0 - nPOTScale: 1 - lightmap: 0 - compressionQuality: 50 - textureType: 0 - buildTargetSettings: [] - userData: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Textures/RandomVectors.png b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Textures/RandomVectors.png deleted file mode 100644 index a601a2e..0000000 Binary files a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Textures/RandomVectors.png and /dev/null differ diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Textures/RandomVectors.png.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Textures/RandomVectors.png.meta deleted file mode 100644 index 3c35afc..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Textures/RandomVectors.png.meta +++ /dev/null @@ -1,35 +0,0 @@ -fileFormatVersion: 2 -guid: a181ca8e3c62f3e4b8f183f6c586b032 -TextureImporter: - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - linearTexture: 0 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 2 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - seamlessCubemap: 0 - textureFormat: 3 - maxTextureSize: 1024 - textureSettings: - filterMode: 0 - aniso: 1 - mipBias: -1 - wrapMode: 0 - nPOTScale: 0 - lightmap: 0 - compressionQuality: 50 - textureType: -1 - buildTargetSettings: [] - userData: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Textures/SphereShape.psd b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Textures/SphereShape.psd deleted file mode 100644 index a100649..0000000 Binary files a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Textures/SphereShape.psd and /dev/null differ diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Textures/SphereShape.psd.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Textures/SphereShape.psd.meta deleted file mode 100644 index 159ca4d..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Textures/SphereShape.psd.meta +++ /dev/null @@ -1,35 +0,0 @@ -fileFormatVersion: 2 -guid: fc00ec05a89da4ff695a4273715cd5ce -TextureImporter: - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 1 - linearTexture: 0 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - seamlessCubemap: 0 - textureFormat: -1 - maxTextureSize: 64 - textureSettings: - filterMode: -1 - aniso: -1 - mipBias: -1 - wrapMode: 1 - nPOTScale: 1 - lightmap: 0 - compressionQuality: 50 - textureType: -1 - buildTargetSettings: [] - userData: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Textures/VignetteMask.png b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Textures/VignetteMask.png deleted file mode 100644 index 3048937..0000000 Binary files a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Textures/VignetteMask.png and /dev/null differ diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Textures/VignetteMask.png.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Textures/VignetteMask.png.meta deleted file mode 100644 index 1764d4c..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Textures/VignetteMask.png.meta +++ /dev/null @@ -1,35 +0,0 @@ -fileFormatVersion: 2 -guid: 95ef4804fe0be4c999ddaa383536cde8 -TextureImporter: - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 1 - linearTexture: 0 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - seamlessCubemap: 0 - textureFormat: -1 - maxTextureSize: 1024 - textureSettings: - filterMode: 1 - aniso: 1 - mipBias: 0 - wrapMode: 1 - nPOTScale: 1 - lightmap: 0 - compressionQuality: 50 - textureType: -1 - buildTargetSettings: [] - userData: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Textures/color correction ramp.png b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Textures/color correction ramp.png deleted file mode 100644 index 328251e..0000000 Binary files a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Textures/color correction ramp.png and /dev/null differ diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Textures/color correction ramp.png.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Textures/color correction ramp.png.meta deleted file mode 100644 index be398a0..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Textures/color correction ramp.png.meta +++ /dev/null @@ -1,35 +0,0 @@ -fileFormatVersion: 2 -guid: d440902fad11e807d00044888d76c639 -TextureImporter: - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - linearTexture: 1 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 2 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - seamlessCubemap: 0 - textureFormat: -3 - maxTextureSize: 1024 - textureSettings: - filterMode: 0 - aniso: 1 - mipBias: 0 - wrapMode: 1 - nPOTScale: 0 - lightmap: 0 - compressionQuality: 50 - textureType: -1 - buildTargetSettings: [] - userData: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Textures/grayscale ramp.png b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Textures/grayscale ramp.png deleted file mode 100644 index 328251e..0000000 Binary files a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Textures/grayscale ramp.png and /dev/null differ diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Textures/grayscale ramp.png.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Textures/grayscale ramp.png.meta deleted file mode 100644 index 395fa26..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Effects/ImageEffects/Textures/grayscale ramp.png.meta +++ /dev/null @@ -1,35 +0,0 @@ -fileFormatVersion: 2 -guid: e9a9781cad112c75d0008dfa8d76c639 -TextureImporter: - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 1 - linearTexture: 0 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 2 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - seamlessCubemap: 0 - textureFormat: 3 - maxTextureSize: 1024 - textureSettings: - filterMode: 1 - aniso: 1 - mipBias: 0 - wrapMode: 1 - nPOTScale: 0 - lightmap: 0 - compressionQuality: 50 - textureType: -1 - buildTargetSettings: [] - userData: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows.meta deleted file mode 100644 index b8a34df..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 83761f9b8a0a2b2418a312b9d6e1d338 -folderAsset: yes -timeCreated: 1488532537 -licenseType: Free -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Data.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Data.meta deleted file mode 100644 index a21fd8d..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Data.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: a870e03673894a74897a8158cc008e3d -folderAsset: yes -timeCreated: 1488532537 -licenseType: Free -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Data/PropertyChangedEventArgs.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Data/PropertyChangedEventArgs.cs deleted file mode 100644 index ee259ee..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Data/PropertyChangedEventArgs.cs +++ /dev/null @@ -1,73 +0,0 @@ -using RootSystem = System; -using System.Linq; -using System.Collections.Generic; -namespace Windows.Data -{ - // - // Windows.Data.PropertyChangedEventArgs - // - public sealed partial class PropertyChangedEventArgs : RootSystem.EventArgs, Helper.INativeWrapper - - { - internal RootSystem.IntPtr _pNative; - RootSystem.IntPtr Helper.INativeWrapper.nativePtr { get { return _pNative; } } - - // Constructors and Finalizers - internal PropertyChangedEventArgs(RootSystem.IntPtr pNative) - { - _pNative = pNative; - Windows_Data_PropertyChangedEventArgs_AddRefObject(ref _pNative); - } - - ~PropertyChangedEventArgs() - { - Dispose(false); - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Data_PropertyChangedEventArgs_ReleaseObject(ref RootSystem.IntPtr pNative); - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Data_PropertyChangedEventArgs_AddRefObject(ref RootSystem.IntPtr pNative); - private void Dispose(bool disposing) - { - if (_pNative == RootSystem.IntPtr.Zero) - { - return; - } - - __EventCleanup(); - - Helper.NativeObjectCache.RemoveObject(_pNative); - Windows_Data_PropertyChangedEventArgs_ReleaseObject(ref _pNative); - - _pNative = RootSystem.IntPtr.Zero; - } - - - // Public Properties - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern RootSystem.IntPtr Windows_Data_PropertyChangedEventArgs_get_PropertyName(RootSystem.IntPtr pNative); - public string PropertyName - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("PropertyChangedEventArgs"); - } - - RootSystem.IntPtr objectPointer = Windows_Data_PropertyChangedEventArgs_get_PropertyName(_pNative); - Helper.ExceptionHelper.CheckLastError(); - - var managedString = RootSystem.Runtime.InteropServices.Marshal.PtrToStringUni(objectPointer); - RootSystem.Runtime.InteropServices.Marshal.FreeCoTaskMem(objectPointer); - return managedString; - } - } - - private void __EventCleanup() - { - } - } - -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Data/PropertyChangedEventArgs.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Data/PropertyChangedEventArgs.cs.meta deleted file mode 100644 index 63ca36b..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Data/PropertyChangedEventArgs.cs.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 0f717bd2a5c39cc43a49fc8904889932 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect.meta deleted file mode 100644 index 6a387a3..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 03a85dc91c80f064886b50db26cbfc98 -folderAsset: yes -timeCreated: 1488532537 -licenseType: Free -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/Activity.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/Activity.cs deleted file mode 100644 index f786d80..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/Activity.cs +++ /dev/null @@ -1,18 +0,0 @@ -using RootSystem = System; -using System.Linq; -using System.Collections.Generic; -namespace Windows.Kinect -{ - // - // Windows.Kinect.Activity - // - public enum Activity : int - { - EyeLeftClosed =0, - EyeRightClosed =1, - MouthOpen =2, - MouthMoved =3, - LookingAway =4, - } - -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/Activity.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/Activity.cs.meta deleted file mode 100644 index d07c7b6..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/Activity.cs.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: ec6785f19ac6c494a9957fa63f49fcf5 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/Appearance.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/Appearance.cs deleted file mode 100644 index 0cae6f3..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/Appearance.cs +++ /dev/null @@ -1,14 +0,0 @@ -using RootSystem = System; -using System.Linq; -using System.Collections.Generic; -namespace Windows.Kinect -{ - // - // Windows.Kinect.Appearance - // - public enum Appearance : int - { - WearingGlasses =0, - } - -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/Appearance.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/Appearance.cs.meta deleted file mode 100644 index 013bde3..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/Appearance.cs.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 00eb0d9c4964c0b4f9e3090704ff7201 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/AudioBeam.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/AudioBeam.cs deleted file mode 100644 index dcbb064..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/AudioBeam.cs +++ /dev/null @@ -1,240 +0,0 @@ -using RootSystem = System; -using System.Linq; -using System.Collections.Generic; -namespace Windows.Kinect -{ - // - // Windows.Kinect.AudioBeam - // - public sealed partial class AudioBeam : Helper.INativeWrapper - - { - internal RootSystem.IntPtr _pNative; - RootSystem.IntPtr Helper.INativeWrapper.nativePtr { get { return _pNative; } } - - // Constructors and Finalizers - internal AudioBeam(RootSystem.IntPtr pNative) - { - _pNative = pNative; - Windows_Kinect_AudioBeam_AddRefObject(ref _pNative); - } - - ~AudioBeam() - { - Dispose(false); - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_AudioBeam_ReleaseObject(ref RootSystem.IntPtr pNative); - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_AudioBeam_AddRefObject(ref RootSystem.IntPtr pNative); - private void Dispose(bool disposing) - { - if (_pNative == RootSystem.IntPtr.Zero) - { - return; - } - - __EventCleanup(); - - Helper.NativeObjectCache.RemoveObject(_pNative); - Windows_Kinect_AudioBeam_ReleaseObject(ref _pNative); - - _pNative = RootSystem.IntPtr.Zero; - } - - - // Public Properties - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern Windows.Kinect.AudioBeamMode Windows_Kinect_AudioBeam_get_AudioBeamMode(RootSystem.IntPtr pNative); - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_AudioBeam_put_AudioBeamMode(RootSystem.IntPtr pNative, Windows.Kinect.AudioBeamMode audioBeamMode); - public Windows.Kinect.AudioBeamMode AudioBeamMode - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("AudioBeam"); - } - - return Windows_Kinect_AudioBeam_get_AudioBeamMode(_pNative); - } - set - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("AudioBeam"); - } - - Windows_Kinect_AudioBeam_put_AudioBeamMode(_pNative, value); - Helper.ExceptionHelper.CheckLastError(); - } - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern RootSystem.IntPtr Windows_Kinect_AudioBeam_get_AudioSource(RootSystem.IntPtr pNative); - public Windows.Kinect.AudioSource AudioSource - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("AudioBeam"); - } - - RootSystem.IntPtr objectPointer = Windows_Kinect_AudioBeam_get_AudioSource(_pNative); - Helper.ExceptionHelper.CheckLastError(); - if (objectPointer == RootSystem.IntPtr.Zero) - { - return null; - } - - return Helper.NativeObjectCache.CreateOrGetObject(objectPointer, n => new Windows.Kinect.AudioSource(n)); - } - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern float Windows_Kinect_AudioBeam_get_BeamAngle(RootSystem.IntPtr pNative); - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_AudioBeam_put_BeamAngle(RootSystem.IntPtr pNative, float beamAngle); - public float BeamAngle - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("AudioBeam"); - } - - return Windows_Kinect_AudioBeam_get_BeamAngle(_pNative); - } - set - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("AudioBeam"); - } - - Windows_Kinect_AudioBeam_put_BeamAngle(_pNative, value); - Helper.ExceptionHelper.CheckLastError(); - } - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern float Windows_Kinect_AudioBeam_get_BeamAngleConfidence(RootSystem.IntPtr pNative); - public float BeamAngleConfidence - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("AudioBeam"); - } - - return Windows_Kinect_AudioBeam_get_BeamAngleConfidence(_pNative); - } - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern long Windows_Kinect_AudioBeam_get_RelativeTime(RootSystem.IntPtr pNative); - public RootSystem.TimeSpan RelativeTime - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("AudioBeam"); - } - - return RootSystem.TimeSpan.FromMilliseconds(Windows_Kinect_AudioBeam_get_RelativeTime(_pNative)); - } - } - - - // Events - private static RootSystem.Runtime.InteropServices.GCHandle _Windows_Data_PropertyChangedEventArgs_Delegate_Handle; - [RootSystem.Runtime.InteropServices.UnmanagedFunctionPointer(RootSystem.Runtime.InteropServices.CallingConvention.Cdecl)] - private delegate void _Windows_Data_PropertyChangedEventArgs_Delegate(RootSystem.IntPtr args, RootSystem.IntPtr pNative); - private static Helper.CollectionMap>> Windows_Data_PropertyChangedEventArgs_Delegate_callbacks = new Helper.CollectionMap>>(); - [AOT.MonoPInvokeCallbackAttribute(typeof(_Windows_Data_PropertyChangedEventArgs_Delegate))] - private static void Windows_Data_PropertyChangedEventArgs_Delegate_Handler(RootSystem.IntPtr result, RootSystem.IntPtr pNative) - { - List> callbackList = null; - Windows_Data_PropertyChangedEventArgs_Delegate_callbacks.TryGetValue(pNative, out callbackList); - lock(callbackList) - { - var objThis = Helper.NativeObjectCache.GetObject(pNative); - var args = new Windows.Data.PropertyChangedEventArgs(result); - foreach(var func in callbackList) - { - Helper.EventPump.Instance.Enqueue(() => { try { func(objThis, args); } catch { } }); - } - } - } - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_AudioBeam_add_PropertyChanged(RootSystem.IntPtr pNative, _Windows_Data_PropertyChangedEventArgs_Delegate eventCallback, bool unsubscribe); - public event RootSystem.EventHandler PropertyChanged - { - add - { - Helper.EventPump.EnsureInitialized(); - - Windows_Data_PropertyChangedEventArgs_Delegate_callbacks.TryAddDefault(_pNative); - var callbackList = Windows_Data_PropertyChangedEventArgs_Delegate_callbacks[_pNative]; - lock (callbackList) - { - callbackList.Add(value); - if(callbackList.Count == 1) - { - var del = new _Windows_Data_PropertyChangedEventArgs_Delegate(Windows_Data_PropertyChangedEventArgs_Delegate_Handler); - _Windows_Data_PropertyChangedEventArgs_Delegate_Handle = RootSystem.Runtime.InteropServices.GCHandle.Alloc(del); - Windows_Kinect_AudioBeam_add_PropertyChanged(_pNative, del, false); - } - } - } - remove - { - if (_pNative == RootSystem.IntPtr.Zero) - { - return; - } - - Windows_Data_PropertyChangedEventArgs_Delegate_callbacks.TryAddDefault(_pNative); - var callbackList = Windows_Data_PropertyChangedEventArgs_Delegate_callbacks[_pNative]; - lock (callbackList) - { - callbackList.Remove(value); - if(callbackList.Count == 0) - { - Windows_Kinect_AudioBeam_add_PropertyChanged(_pNative, Windows_Data_PropertyChangedEventArgs_Delegate_Handler, true); - _Windows_Data_PropertyChangedEventArgs_Delegate_Handle.Free(); - } - } - } - } - - - // Public Methods - private void __EventCleanup() - { - { - Windows_Data_PropertyChangedEventArgs_Delegate_callbacks.TryAddDefault(_pNative); - var callbackList = Windows_Data_PropertyChangedEventArgs_Delegate_callbacks[_pNative]; - lock (callbackList) - { - if (callbackList.Count > 0) - { - callbackList.Clear(); - if (_pNative != RootSystem.IntPtr.Zero) - { - Windows_Kinect_AudioBeam_add_PropertyChanged(_pNative, Windows_Data_PropertyChangedEventArgs_Delegate_Handler, true); - } - _Windows_Data_PropertyChangedEventArgs_Delegate_Handle.Free(); - } - } - } - } - } - -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/AudioBeam.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/AudioBeam.cs.meta deleted file mode 100644 index 0ae54c0..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/AudioBeam.cs.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: e64f7eb8de6f72e42874eb2ea7c01be5 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/AudioBeamFrame.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/AudioBeamFrame.cs deleted file mode 100644 index 07e386b..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/AudioBeamFrame.cs +++ /dev/null @@ -1,114 +0,0 @@ -using RootSystem = System; -using System.Linq; -using System.Collections.Generic; -namespace Windows.Kinect -{ - // - // Windows.Kinect.AudioBeamFrame - // - public sealed partial class AudioBeamFrame : RootSystem.IDisposable, Helper.INativeWrapper - - { - internal RootSystem.IntPtr _pNative; - RootSystem.IntPtr Helper.INativeWrapper.nativePtr { get { return _pNative; } } - - // Constructors and Finalizers - internal AudioBeamFrame(RootSystem.IntPtr pNative) - { - _pNative = pNative; - Windows_Kinect_AudioBeamFrame_AddRefObject(ref _pNative); - } - - ~AudioBeamFrame() - { - Dispose(false); - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_AudioBeamFrame_ReleaseObject(ref RootSystem.IntPtr pNative); - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_AudioBeamFrame_AddRefObject(ref RootSystem.IntPtr pNative); - - // Public Properties - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern RootSystem.IntPtr Windows_Kinect_AudioBeamFrame_get_AudioBeam(RootSystem.IntPtr pNative); - public Windows.Kinect.AudioBeam AudioBeam - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("AudioBeamFrame"); - } - - RootSystem.IntPtr objectPointer = Windows_Kinect_AudioBeamFrame_get_AudioBeam(_pNative); - Helper.ExceptionHelper.CheckLastError(); - if (objectPointer == RootSystem.IntPtr.Zero) - { - return null; - } - - return Helper.NativeObjectCache.CreateOrGetObject(objectPointer, n => new Windows.Kinect.AudioBeam(n)); - } - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern RootSystem.IntPtr Windows_Kinect_AudioBeamFrame_get_AudioSource(RootSystem.IntPtr pNative); - public Windows.Kinect.AudioSource AudioSource - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("AudioBeamFrame"); - } - - RootSystem.IntPtr objectPointer = Windows_Kinect_AudioBeamFrame_get_AudioSource(_pNative); - Helper.ExceptionHelper.CheckLastError(); - if (objectPointer == RootSystem.IntPtr.Zero) - { - return null; - } - - return Helper.NativeObjectCache.CreateOrGetObject(objectPointer, n => new Windows.Kinect.AudioSource(n)); - } - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern long Windows_Kinect_AudioBeamFrame_get_Duration(RootSystem.IntPtr pNative); - public RootSystem.TimeSpan Duration - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("AudioBeamFrame"); - } - - return RootSystem.TimeSpan.FromMilliseconds(Windows_Kinect_AudioBeamFrame_get_Duration(_pNative)); - } - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern long Windows_Kinect_AudioBeamFrame_get_RelativeTimeStart(RootSystem.IntPtr pNative); - public RootSystem.TimeSpan RelativeTimeStart - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("AudioBeamFrame"); - } - - return RootSystem.TimeSpan.FromMilliseconds(Windows_Kinect_AudioBeamFrame_get_RelativeTimeStart(_pNative)); - } - } - - - // Public Methods - private void __EventCleanup() - { - } - } - -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/AudioBeamFrame.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/AudioBeamFrame.cs.meta deleted file mode 100644 index d72ed80..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/AudioBeamFrame.cs.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 8ff93fd69396b944ea1e0d067cf5b091 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/AudioBeamFrameArrivedEventArgs.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/AudioBeamFrameArrivedEventArgs.cs deleted file mode 100644 index 73c443b..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/AudioBeamFrameArrivedEventArgs.cs +++ /dev/null @@ -1,75 +0,0 @@ -using RootSystem = System; -using System.Linq; -using System.Collections.Generic; -namespace Windows.Kinect -{ - // - // Windows.Kinect.AudioBeamFrameArrivedEventArgs - // - public sealed partial class AudioBeamFrameArrivedEventArgs : RootSystem.EventArgs, Helper.INativeWrapper - - { - internal RootSystem.IntPtr _pNative; - RootSystem.IntPtr Helper.INativeWrapper.nativePtr { get { return _pNative; } } - - // Constructors and Finalizers - internal AudioBeamFrameArrivedEventArgs(RootSystem.IntPtr pNative) - { - _pNative = pNative; - Windows_Kinect_AudioBeamFrameArrivedEventArgs_AddRefObject(ref _pNative); - } - - ~AudioBeamFrameArrivedEventArgs() - { - Dispose(false); - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_AudioBeamFrameArrivedEventArgs_ReleaseObject(ref RootSystem.IntPtr pNative); - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_AudioBeamFrameArrivedEventArgs_AddRefObject(ref RootSystem.IntPtr pNative); - private void Dispose(bool disposing) - { - if (_pNative == RootSystem.IntPtr.Zero) - { - return; - } - - __EventCleanup(); - - Helper.NativeObjectCache.RemoveObject(_pNative); - Windows_Kinect_AudioBeamFrameArrivedEventArgs_ReleaseObject(ref _pNative); - - _pNative = RootSystem.IntPtr.Zero; - } - - - // Public Properties - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern RootSystem.IntPtr Windows_Kinect_AudioBeamFrameArrivedEventArgs_get_FrameReference(RootSystem.IntPtr pNative); - public Windows.Kinect.AudioBeamFrameReference FrameReference - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("AudioBeamFrameArrivedEventArgs"); - } - - RootSystem.IntPtr objectPointer = Windows_Kinect_AudioBeamFrameArrivedEventArgs_get_FrameReference(_pNative); - Helper.ExceptionHelper.CheckLastError(); - if (objectPointer == RootSystem.IntPtr.Zero) - { - return null; - } - - return Helper.NativeObjectCache.CreateOrGetObject(objectPointer, n => new Windows.Kinect.AudioBeamFrameReference(n)); - } - } - - private void __EventCleanup() - { - } - } - -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/AudioBeamFrameArrivedEventArgs.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/AudioBeamFrameArrivedEventArgs.cs.meta deleted file mode 100644 index 1db0509..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/AudioBeamFrameArrivedEventArgs.cs.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: bb78a9668fb2c694881a216e349cb1e9 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/AudioBeamFrameList.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/AudioBeamFrameList.cs deleted file mode 100644 index 757ea2e..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/AudioBeamFrameList.cs +++ /dev/null @@ -1,71 +0,0 @@ -using RootSystem = System; -using System.Linq; -using System.Collections.Generic; -namespace Windows.Kinect -{ - // - // Windows.Kinect.AudioBeamFrameList - // - public sealed partial class AudioBeamFrameList : RootSystem.IDisposable, Helper.INativeWrapper - - { - internal RootSystem.IntPtr _pNative; - RootSystem.IntPtr Helper.INativeWrapper.nativePtr { get { return _pNative; } } - - // Constructors and Finalizers - internal AudioBeamFrameList(RootSystem.IntPtr pNative) - { - _pNative = pNative; - Windows_Kinect_AudioBeamFrameList_AddRefObject(ref _pNative); - } - - ~AudioBeamFrameList() - { - Dispose(false); - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_AudioBeamFrameList_ReleaseObject(ref RootSystem.IntPtr pNative); - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_AudioBeamFrameList_AddRefObject(ref RootSystem.IntPtr pNative); - private void Dispose(bool disposing) - { - if (_pNative == RootSystem.IntPtr.Zero) - { - return; - } - - __EventCleanup(); - - Helper.NativeObjectCache.RemoveObject(_pNative); - - if (disposing) - { - Windows_Kinect_AudioBeamFrameList_Dispose(_pNative); - } - Windows_Kinect_AudioBeamFrameList_ReleaseObject(ref _pNative); - - _pNative = RootSystem.IntPtr.Zero; - } - - - // Public Methods - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_AudioBeamFrameList_Dispose(RootSystem.IntPtr pNative); - public void Dispose() - { - if (_pNative == RootSystem.IntPtr.Zero) - { - return; - } - - Dispose(true); - RootSystem.GC.SuppressFinalize(this); - } - - private void __EventCleanup() - { - } - } - -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/AudioBeamFrameList.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/AudioBeamFrameList.cs.meta deleted file mode 100644 index af5290c..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/AudioBeamFrameList.cs.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: fe7ef6722da9a6d42b589d3f8b35b6f9 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/AudioBeamFrameReader.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/AudioBeamFrameReader.cs deleted file mode 100644 index e7212b3..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/AudioBeamFrameReader.cs +++ /dev/null @@ -1,309 +0,0 @@ -using RootSystem = System; -using System.Linq; -using System.Collections.Generic; -namespace Windows.Kinect -{ - // - // Windows.Kinect.AudioBeamFrameReader - // - public sealed partial class AudioBeamFrameReader : RootSystem.IDisposable, Helper.INativeWrapper - - { - internal RootSystem.IntPtr _pNative; - RootSystem.IntPtr Helper.INativeWrapper.nativePtr { get { return _pNative; } } - - // Constructors and Finalizers - internal AudioBeamFrameReader(RootSystem.IntPtr pNative) - { - _pNative = pNative; - Windows_Kinect_AudioBeamFrameReader_AddRefObject(ref _pNative); - } - - ~AudioBeamFrameReader() - { - Dispose(false); - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_AudioBeamFrameReader_ReleaseObject(ref RootSystem.IntPtr pNative); - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_AudioBeamFrameReader_AddRefObject(ref RootSystem.IntPtr pNative); - private void Dispose(bool disposing) - { - if (_pNative == RootSystem.IntPtr.Zero) - { - return; - } - - __EventCleanup(); - - Helper.NativeObjectCache.RemoveObject(_pNative); - - if (disposing) - { - Windows_Kinect_AudioBeamFrameReader_Dispose(_pNative); - } - Windows_Kinect_AudioBeamFrameReader_ReleaseObject(ref _pNative); - - _pNative = RootSystem.IntPtr.Zero; - } - - - // Public Properties - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern RootSystem.IntPtr Windows_Kinect_AudioBeamFrameReader_get_AudioSource(RootSystem.IntPtr pNative); - public Windows.Kinect.AudioSource AudioSource - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("AudioBeamFrameReader"); - } - - RootSystem.IntPtr objectPointer = Windows_Kinect_AudioBeamFrameReader_get_AudioSource(_pNative); - Helper.ExceptionHelper.CheckLastError(); - if (objectPointer == RootSystem.IntPtr.Zero) - { - return null; - } - - return Helper.NativeObjectCache.CreateOrGetObject(objectPointer, n => new Windows.Kinect.AudioSource(n)); - } - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern bool Windows_Kinect_AudioBeamFrameReader_get_IsPaused(RootSystem.IntPtr pNative); - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_AudioBeamFrameReader_put_IsPaused(RootSystem.IntPtr pNative, bool isPaused); - public bool IsPaused - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("AudioBeamFrameReader"); - } - - return Windows_Kinect_AudioBeamFrameReader_get_IsPaused(_pNative); - } - set - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("AudioBeamFrameReader"); - } - - Windows_Kinect_AudioBeamFrameReader_put_IsPaused(_pNative, value); - Helper.ExceptionHelper.CheckLastError(); - } - } - - - // Events - private static RootSystem.Runtime.InteropServices.GCHandle _Windows_Kinect_AudioBeamFrameArrivedEventArgs_Delegate_Handle; - [RootSystem.Runtime.InteropServices.UnmanagedFunctionPointer(RootSystem.Runtime.InteropServices.CallingConvention.Cdecl)] - private delegate void _Windows_Kinect_AudioBeamFrameArrivedEventArgs_Delegate(RootSystem.IntPtr args, RootSystem.IntPtr pNative); - private static Helper.CollectionMap>> Windows_Kinect_AudioBeamFrameArrivedEventArgs_Delegate_callbacks = new Helper.CollectionMap>>(); - [AOT.MonoPInvokeCallbackAttribute(typeof(_Windows_Kinect_AudioBeamFrameArrivedEventArgs_Delegate))] - private static void Windows_Kinect_AudioBeamFrameArrivedEventArgs_Delegate_Handler(RootSystem.IntPtr result, RootSystem.IntPtr pNative) - { - List> callbackList = null; - Windows_Kinect_AudioBeamFrameArrivedEventArgs_Delegate_callbacks.TryGetValue(pNative, out callbackList); - lock(callbackList) - { - var objThis = Helper.NativeObjectCache.GetObject(pNative); - var args = new Windows.Kinect.AudioBeamFrameArrivedEventArgs(result); - foreach(var func in callbackList) - { - Helper.EventPump.Instance.Enqueue(() => { try { func(objThis, args); } catch { } }); - } - } - } - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_AudioBeamFrameReader_add_FrameArrived(RootSystem.IntPtr pNative, _Windows_Kinect_AudioBeamFrameArrivedEventArgs_Delegate eventCallback, bool unsubscribe); - public event RootSystem.EventHandler FrameArrived - { - add - { - Helper.EventPump.EnsureInitialized(); - - Windows_Kinect_AudioBeamFrameArrivedEventArgs_Delegate_callbacks.TryAddDefault(_pNative); - var callbackList = Windows_Kinect_AudioBeamFrameArrivedEventArgs_Delegate_callbacks[_pNative]; - lock (callbackList) - { - callbackList.Add(value); - if(callbackList.Count == 1) - { - var del = new _Windows_Kinect_AudioBeamFrameArrivedEventArgs_Delegate(Windows_Kinect_AudioBeamFrameArrivedEventArgs_Delegate_Handler); - _Windows_Kinect_AudioBeamFrameArrivedEventArgs_Delegate_Handle = RootSystem.Runtime.InteropServices.GCHandle.Alloc(del); - Windows_Kinect_AudioBeamFrameReader_add_FrameArrived(_pNative, del, false); - } - } - } - remove - { - if (_pNative == RootSystem.IntPtr.Zero) - { - return; - } - - Windows_Kinect_AudioBeamFrameArrivedEventArgs_Delegate_callbacks.TryAddDefault(_pNative); - var callbackList = Windows_Kinect_AudioBeamFrameArrivedEventArgs_Delegate_callbacks[_pNative]; - lock (callbackList) - { - callbackList.Remove(value); - if(callbackList.Count == 0) - { - Windows_Kinect_AudioBeamFrameReader_add_FrameArrived(_pNative, Windows_Kinect_AudioBeamFrameArrivedEventArgs_Delegate_Handler, true); - _Windows_Kinect_AudioBeamFrameArrivedEventArgs_Delegate_Handle.Free(); - } - } - } - } - - private static RootSystem.Runtime.InteropServices.GCHandle _Windows_Data_PropertyChangedEventArgs_Delegate_Handle; - [RootSystem.Runtime.InteropServices.UnmanagedFunctionPointer(RootSystem.Runtime.InteropServices.CallingConvention.Cdecl)] - private delegate void _Windows_Data_PropertyChangedEventArgs_Delegate(RootSystem.IntPtr args, RootSystem.IntPtr pNative); - private static Helper.CollectionMap>> Windows_Data_PropertyChangedEventArgs_Delegate_callbacks = new Helper.CollectionMap>>(); - [AOT.MonoPInvokeCallbackAttribute(typeof(_Windows_Data_PropertyChangedEventArgs_Delegate))] - private static void Windows_Data_PropertyChangedEventArgs_Delegate_Handler(RootSystem.IntPtr result, RootSystem.IntPtr pNative) - { - List> callbackList = null; - Windows_Data_PropertyChangedEventArgs_Delegate_callbacks.TryGetValue(pNative, out callbackList); - lock(callbackList) - { - var objThis = Helper.NativeObjectCache.GetObject(pNative); - var args = new Windows.Data.PropertyChangedEventArgs(result); - foreach(var func in callbackList) - { - Helper.EventPump.Instance.Enqueue(() => { try { func(objThis, args); } catch { } }); - } - } - } - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_AudioBeamFrameReader_add_PropertyChanged(RootSystem.IntPtr pNative, _Windows_Data_PropertyChangedEventArgs_Delegate eventCallback, bool unsubscribe); - public event RootSystem.EventHandler PropertyChanged - { - add - { - Helper.EventPump.EnsureInitialized(); - - Windows_Data_PropertyChangedEventArgs_Delegate_callbacks.TryAddDefault(_pNative); - var callbackList = Windows_Data_PropertyChangedEventArgs_Delegate_callbacks[_pNative]; - lock (callbackList) - { - callbackList.Add(value); - if(callbackList.Count == 1) - { - var del = new _Windows_Data_PropertyChangedEventArgs_Delegate(Windows_Data_PropertyChangedEventArgs_Delegate_Handler); - _Windows_Data_PropertyChangedEventArgs_Delegate_Handle = RootSystem.Runtime.InteropServices.GCHandle.Alloc(del); - Windows_Kinect_AudioBeamFrameReader_add_PropertyChanged(_pNative, del, false); - } - } - } - remove - { - if (_pNative == RootSystem.IntPtr.Zero) - { - return; - } - - Windows_Data_PropertyChangedEventArgs_Delegate_callbacks.TryAddDefault(_pNative); - var callbackList = Windows_Data_PropertyChangedEventArgs_Delegate_callbacks[_pNative]; - lock (callbackList) - { - callbackList.Remove(value); - if(callbackList.Count == 0) - { - Windows_Kinect_AudioBeamFrameReader_add_PropertyChanged(_pNative, Windows_Data_PropertyChangedEventArgs_Delegate_Handler, true); - _Windows_Data_PropertyChangedEventArgs_Delegate_Handle.Free(); - } - } - } - } - - - // Public Methods - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern int Windows_Kinect_AudioBeamFrameReader_AcquireLatestBeamFrames_Length(RootSystem.IntPtr pNative); - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern int Windows_Kinect_AudioBeamFrameReader_AcquireLatestBeamFrames(RootSystem.IntPtr pNative, [RootSystem.Runtime.InteropServices.Out] RootSystem.IntPtr[] outCollection, int outCollectionSize); - public RootSystem.Collections.Generic.IList AcquireLatestBeamFrames() - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("AudioBeamFrameReader"); - } - - int outCollectionSize = Windows_Kinect_AudioBeamFrameReader_AcquireLatestBeamFrames_Length(_pNative); - var outCollection = new RootSystem.IntPtr[outCollectionSize]; - var managedCollection = new Windows.Kinect.AudioBeamFrame[outCollectionSize]; - - outCollectionSize = Windows_Kinect_AudioBeamFrameReader_AcquireLatestBeamFrames(_pNative, outCollection, outCollectionSize); - Helper.ExceptionHelper.CheckLastError(); - for(int i=0;i(outCollection[i], n => new Windows.Kinect.AudioBeamFrame(n)); - - managedCollection[i] = obj; - } - return managedCollection; - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_AudioBeamFrameReader_Dispose(RootSystem.IntPtr pNative); - public void Dispose() - { - if (_pNative == RootSystem.IntPtr.Zero) - { - return; - } - - Dispose(true); - RootSystem.GC.SuppressFinalize(this); - } - - private void __EventCleanup() - { - { - Windows_Kinect_AudioBeamFrameArrivedEventArgs_Delegate_callbacks.TryAddDefault(_pNative); - var callbackList = Windows_Kinect_AudioBeamFrameArrivedEventArgs_Delegate_callbacks[_pNative]; - lock (callbackList) - { - if (callbackList.Count > 0) - { - callbackList.Clear(); - if (_pNative != RootSystem.IntPtr.Zero) - { - Windows_Kinect_AudioBeamFrameReader_add_FrameArrived(_pNative, Windows_Kinect_AudioBeamFrameArrivedEventArgs_Delegate_Handler, true); - } - _Windows_Kinect_AudioBeamFrameArrivedEventArgs_Delegate_Handle.Free(); - } - } - } - { - Windows_Data_PropertyChangedEventArgs_Delegate_callbacks.TryAddDefault(_pNative); - var callbackList = Windows_Data_PropertyChangedEventArgs_Delegate_callbacks[_pNative]; - lock (callbackList) - { - if (callbackList.Count > 0) - { - callbackList.Clear(); - if (_pNative != RootSystem.IntPtr.Zero) - { - Windows_Kinect_AudioBeamFrameReader_add_PropertyChanged(_pNative, Windows_Data_PropertyChangedEventArgs_Delegate_Handler, true); - } - _Windows_Data_PropertyChangedEventArgs_Delegate_Handle.Free(); - } - } - } - } - } - -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/AudioBeamFrameReader.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/AudioBeamFrameReader.cs.meta deleted file mode 100644 index 9f91736..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/AudioBeamFrameReader.cs.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: df51c172437a76942a0ec4a4f1438a8f -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/AudioBeamFrameReference.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/AudioBeamFrameReference.cs deleted file mode 100644 index 76b8091..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/AudioBeamFrameReference.cs +++ /dev/null @@ -1,101 +0,0 @@ -using RootSystem = System; -using System.Linq; -using System.Collections.Generic; -namespace Windows.Kinect -{ - // - // Windows.Kinect.AudioBeamFrameReference - // - public sealed partial class AudioBeamFrameReference : Helper.INativeWrapper - - { - internal RootSystem.IntPtr _pNative; - RootSystem.IntPtr Helper.INativeWrapper.nativePtr { get { return _pNative; } } - - // Constructors and Finalizers - internal AudioBeamFrameReference(RootSystem.IntPtr pNative) - { - _pNative = pNative; - Windows_Kinect_AudioBeamFrameReference_AddRefObject(ref _pNative); - } - - ~AudioBeamFrameReference() - { - Dispose(false); - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_AudioBeamFrameReference_ReleaseObject(ref RootSystem.IntPtr pNative); - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_AudioBeamFrameReference_AddRefObject(ref RootSystem.IntPtr pNative); - private void Dispose(bool disposing) - { - if (_pNative == RootSystem.IntPtr.Zero) - { - return; - } - - __EventCleanup(); - - Helper.NativeObjectCache.RemoveObject(_pNative); - Windows_Kinect_AudioBeamFrameReference_ReleaseObject(ref _pNative); - - _pNative = RootSystem.IntPtr.Zero; - } - - - // Public Properties - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern long Windows_Kinect_AudioBeamFrameReference_get_RelativeTime(RootSystem.IntPtr pNative); - public RootSystem.TimeSpan RelativeTime - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("AudioBeamFrameReference"); - } - - return RootSystem.TimeSpan.FromMilliseconds(Windows_Kinect_AudioBeamFrameReference_get_RelativeTime(_pNative)); - } - } - - - // Public Methods - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern int Windows_Kinect_AudioBeamFrameReference_AcquireBeamFrames_Length(RootSystem.IntPtr pNative); - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern int Windows_Kinect_AudioBeamFrameReference_AcquireBeamFrames(RootSystem.IntPtr pNative, [RootSystem.Runtime.InteropServices.Out] RootSystem.IntPtr[] outCollection, int outCollectionSize); - public RootSystem.Collections.Generic.IList AcquireBeamFrames() - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("AudioBeamFrameReference"); - } - - int outCollectionSize = Windows_Kinect_AudioBeamFrameReference_AcquireBeamFrames_Length(_pNative); - var outCollection = new RootSystem.IntPtr[outCollectionSize]; - var managedCollection = new Windows.Kinect.AudioBeamFrame[outCollectionSize]; - - outCollectionSize = Windows_Kinect_AudioBeamFrameReference_AcquireBeamFrames(_pNative, outCollection, outCollectionSize); - Helper.ExceptionHelper.CheckLastError(); - for(int i=0;i(outCollection[i], n => new Windows.Kinect.AudioBeamFrame(n)); - - managedCollection[i] = obj; - } - return managedCollection; - } - - private void __EventCleanup() - { - } - } - -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/AudioBeamFrameReference.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/AudioBeamFrameReference.cs.meta deleted file mode 100644 index ed90803..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/AudioBeamFrameReference.cs.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 0fe91384e0a914a4985b0cc2f1026a72 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/AudioBeamMode.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/AudioBeamMode.cs deleted file mode 100644 index 8df2d36..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/AudioBeamMode.cs +++ /dev/null @@ -1,15 +0,0 @@ -using RootSystem = System; -using System.Linq; -using System.Collections.Generic; -namespace Windows.Kinect -{ - // - // Windows.Kinect.AudioBeamMode - // - public enum AudioBeamMode : int - { - Automatic =0, - Manual =1, - } - -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/AudioBeamMode.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/AudioBeamMode.cs.meta deleted file mode 100644 index 289e883..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/AudioBeamMode.cs.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 1f287bc065b7e7a4faa7cf96c175eabb -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/AudioBeamSubFrame.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/AudioBeamSubFrame.cs deleted file mode 100644 index 7d79042..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/AudioBeamSubFrame.cs +++ /dev/null @@ -1,212 +0,0 @@ -using RootSystem = System; -using System.Linq; -using System.Collections.Generic; -namespace Windows.Kinect -{ - // - // Windows.Kinect.AudioBeamSubFrame - // - public sealed partial class AudioBeamSubFrame : RootSystem.IDisposable, Helper.INativeWrapper - - { - internal RootSystem.IntPtr _pNative; - RootSystem.IntPtr Helper.INativeWrapper.nativePtr { get { return _pNative; } } - - // Constructors and Finalizers - internal AudioBeamSubFrame(RootSystem.IntPtr pNative) - { - _pNative = pNative; - Windows_Kinect_AudioBeamSubFrame_AddRefObject(ref _pNative); - } - - ~AudioBeamSubFrame() - { - Dispose(false); - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_AudioBeamSubFrame_ReleaseObject(ref RootSystem.IntPtr pNative); - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_AudioBeamSubFrame_AddRefObject(ref RootSystem.IntPtr pNative); - private void Dispose(bool disposing) - { - if (_pNative == RootSystem.IntPtr.Zero) - { - return; - } - - __EventCleanup(); - - Helper.NativeObjectCache.RemoveObject(_pNative); - - if (disposing) - { - Windows_Kinect_AudioBeamSubFrame_Dispose(_pNative); - } - Windows_Kinect_AudioBeamSubFrame_ReleaseObject(ref _pNative); - - _pNative = RootSystem.IntPtr.Zero; - } - - - // Public Properties - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern Windows.Kinect.AudioBeamMode Windows_Kinect_AudioBeamSubFrame_get_AudioBeamMode(RootSystem.IntPtr pNative); - public Windows.Kinect.AudioBeamMode AudioBeamMode - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("AudioBeamSubFrame"); - } - - return Windows_Kinect_AudioBeamSubFrame_get_AudioBeamMode(_pNative); - } - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern int Windows_Kinect_AudioBeamSubFrame_get_AudioBodyCorrelations(RootSystem.IntPtr pNative, [RootSystem.Runtime.InteropServices.Out] RootSystem.IntPtr[] outCollection, int outCollectionSize); - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern int Windows_Kinect_AudioBeamSubFrame_get_AudioBodyCorrelations_Length(RootSystem.IntPtr pNative); - public RootSystem.Collections.Generic.IList AudioBodyCorrelations - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("AudioBeamSubFrame"); - } - - int outCollectionSize = Windows_Kinect_AudioBeamSubFrame_get_AudioBodyCorrelations_Length(_pNative); - var outCollection = new RootSystem.IntPtr[outCollectionSize]; - var managedCollection = new Windows.Kinect.AudioBodyCorrelation[outCollectionSize]; - - outCollectionSize = Windows_Kinect_AudioBeamSubFrame_get_AudioBodyCorrelations(_pNative, outCollection, outCollectionSize); - Helper.ExceptionHelper.CheckLastError(); - for(int i=0;i(outCollection[i], n => new Windows.Kinect.AudioBodyCorrelation(n)); - - managedCollection[i] = obj; - } - return managedCollection; - } - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern float Windows_Kinect_AudioBeamSubFrame_get_BeamAngle(RootSystem.IntPtr pNative); - public float BeamAngle - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("AudioBeamSubFrame"); - } - - return Windows_Kinect_AudioBeamSubFrame_get_BeamAngle(_pNative); - } - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern float Windows_Kinect_AudioBeamSubFrame_get_BeamAngleConfidence(RootSystem.IntPtr pNative); - public float BeamAngleConfidence - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("AudioBeamSubFrame"); - } - - return Windows_Kinect_AudioBeamSubFrame_get_BeamAngleConfidence(_pNative); - } - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern long Windows_Kinect_AudioBeamSubFrame_get_Duration(RootSystem.IntPtr pNative); - public RootSystem.TimeSpan Duration - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("AudioBeamSubFrame"); - } - - return RootSystem.TimeSpan.FromMilliseconds(Windows_Kinect_AudioBeamSubFrame_get_Duration(_pNative)); - } - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern uint Windows_Kinect_AudioBeamSubFrame_get_FrameLengthInBytes(RootSystem.IntPtr pNative); - public uint FrameLengthInBytes - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("AudioBeamSubFrame"); - } - - return Windows_Kinect_AudioBeamSubFrame_get_FrameLengthInBytes(_pNative); - } - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern long Windows_Kinect_AudioBeamSubFrame_get_RelativeTime(RootSystem.IntPtr pNative); - public RootSystem.TimeSpan RelativeTime - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("AudioBeamSubFrame"); - } - - return RootSystem.TimeSpan.FromMilliseconds(Windows_Kinect_AudioBeamSubFrame_get_RelativeTime(_pNative)); - } - } - - - // Public Methods - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_AudioBeamSubFrame_CopyFrameDataToArray(RootSystem.IntPtr pNative, RootSystem.IntPtr frameData, int frameDataSize); - public void CopyFrameDataToArray(byte[] frameData) - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("AudioBeamSubFrame"); - } - - var frameDataSmartGCHandle = new Helper.SmartGCHandle(RootSystem.Runtime.InteropServices.GCHandle.Alloc(frameData, RootSystem.Runtime.InteropServices.GCHandleType.Pinned)); - var _frameData = frameDataSmartGCHandle.AddrOfPinnedObject(); - Windows_Kinect_AudioBeamSubFrame_CopyFrameDataToArray(_pNative, _frameData, frameData.Length); - Helper.ExceptionHelper.CheckLastError(); - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_AudioBeamSubFrame_Dispose(RootSystem.IntPtr pNative); - public void Dispose() - { - if (_pNative == RootSystem.IntPtr.Zero) - { - return; - } - - Dispose(true); - RootSystem.GC.SuppressFinalize(this); - } - - private void __EventCleanup() - { - } - } - -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/AudioBeamSubFrame.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/AudioBeamSubFrame.cs.meta deleted file mode 100644 index 39df743..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/AudioBeamSubFrame.cs.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: e3bf3859145801247a7f6d4dcd90b2be -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/AudioBodyCorrelation.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/AudioBodyCorrelation.cs deleted file mode 100644 index a469055..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/AudioBodyCorrelation.cs +++ /dev/null @@ -1,68 +0,0 @@ -using RootSystem = System; -using System.Linq; -using System.Collections.Generic; -namespace Windows.Kinect -{ - // - // Windows.Kinect.AudioBodyCorrelation - // - public sealed partial class AudioBodyCorrelation : Helper.INativeWrapper - - { - internal RootSystem.IntPtr _pNative; - RootSystem.IntPtr Helper.INativeWrapper.nativePtr { get { return _pNative; } } - - // Constructors and Finalizers - internal AudioBodyCorrelation(RootSystem.IntPtr pNative) - { - _pNative = pNative; - Windows_Kinect_AudioBodyCorrelation_AddRefObject(ref _pNative); - } - - ~AudioBodyCorrelation() - { - Dispose(false); - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_AudioBodyCorrelation_ReleaseObject(ref RootSystem.IntPtr pNative); - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_AudioBodyCorrelation_AddRefObject(ref RootSystem.IntPtr pNative); - private void Dispose(bool disposing) - { - if (_pNative == RootSystem.IntPtr.Zero) - { - return; - } - - __EventCleanup(); - - Helper.NativeObjectCache.RemoveObject(_pNative); - Windows_Kinect_AudioBodyCorrelation_ReleaseObject(ref _pNative); - - _pNative = RootSystem.IntPtr.Zero; - } - - - // Public Properties - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern ulong Windows_Kinect_AudioBodyCorrelation_get_BodyTrackingId(RootSystem.IntPtr pNative); - public ulong BodyTrackingId - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("AudioBodyCorrelation"); - } - - return Windows_Kinect_AudioBodyCorrelation_get_BodyTrackingId(_pNative); - } - } - - private void __EventCleanup() - { - } - } - -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/AudioBodyCorrelation.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/AudioBodyCorrelation.cs.meta deleted file mode 100644 index 1846d96..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/AudioBodyCorrelation.cs.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: f12e3715b57390a47aeecc0046c6d6ff -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/AudioSource.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/AudioSource.cs deleted file mode 100644 index 1191d0d..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/AudioSource.cs +++ /dev/null @@ -1,361 +0,0 @@ -using RootSystem = System; -using System.Linq; -using System.Collections.Generic; -namespace Windows.Kinect -{ - // - // Windows.Kinect.AudioSource - // - public sealed partial class AudioSource : Helper.INativeWrapper - - { - internal RootSystem.IntPtr _pNative; - RootSystem.IntPtr Helper.INativeWrapper.nativePtr { get { return _pNative; } } - - // Constructors and Finalizers - internal AudioSource(RootSystem.IntPtr pNative) - { - _pNative = pNative; - Windows_Kinect_AudioSource_AddRefObject(ref _pNative); - } - - ~AudioSource() - { - Dispose(false); - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_AudioSource_ReleaseObject(ref RootSystem.IntPtr pNative); - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_AudioSource_AddRefObject(ref RootSystem.IntPtr pNative); - private void Dispose(bool disposing) - { - if (_pNative == RootSystem.IntPtr.Zero) - { - return; - } - - __EventCleanup(); - - Helper.NativeObjectCache.RemoveObject(_pNative); - Windows_Kinect_AudioSource_ReleaseObject(ref _pNative); - - _pNative = RootSystem.IntPtr.Zero; - } - - - // Public Properties - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern int Windows_Kinect_AudioSource_get_AudioBeams(RootSystem.IntPtr pNative, [RootSystem.Runtime.InteropServices.Out] RootSystem.IntPtr[] outCollection, int outCollectionSize); - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern int Windows_Kinect_AudioSource_get_AudioBeams_Length(RootSystem.IntPtr pNative); - public RootSystem.Collections.Generic.IList AudioBeams - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("AudioSource"); - } - - int outCollectionSize = Windows_Kinect_AudioSource_get_AudioBeams_Length(_pNative); - var outCollection = new RootSystem.IntPtr[outCollectionSize]; - var managedCollection = new Windows.Kinect.AudioBeam[outCollectionSize]; - - outCollectionSize = Windows_Kinect_AudioSource_get_AudioBeams(_pNative, outCollection, outCollectionSize); - Helper.ExceptionHelper.CheckLastError(); - for(int i=0;i(outCollection[i], n => new Windows.Kinect.AudioBeam(n)); - - managedCollection[i] = obj; - } - return managedCollection; - } - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern bool Windows_Kinect_AudioSource_get_IsActive(RootSystem.IntPtr pNative); - public bool IsActive - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("AudioSource"); - } - - return Windows_Kinect_AudioSource_get_IsActive(_pNative); - } - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern RootSystem.IntPtr Windows_Kinect_AudioSource_get_KinectSensor(RootSystem.IntPtr pNative); - public Windows.Kinect.KinectSensor KinectSensor - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("AudioSource"); - } - - RootSystem.IntPtr objectPointer = Windows_Kinect_AudioSource_get_KinectSensor(_pNative); - Helper.ExceptionHelper.CheckLastError(); - if (objectPointer == RootSystem.IntPtr.Zero) - { - return null; - } - - return Helper.NativeObjectCache.CreateOrGetObject(objectPointer, n => new Windows.Kinect.KinectSensor(n)); - } - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern uint Windows_Kinect_AudioSource_get_MaxSubFrameCount(RootSystem.IntPtr pNative); - public uint MaxSubFrameCount - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("AudioSource"); - } - - return Windows_Kinect_AudioSource_get_MaxSubFrameCount(_pNative); - } - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern long Windows_Kinect_AudioSource_get_SubFrameDuration(RootSystem.IntPtr pNative); - public RootSystem.TimeSpan SubFrameDuration - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("AudioSource"); - } - - return RootSystem.TimeSpan.FromMilliseconds(Windows_Kinect_AudioSource_get_SubFrameDuration(_pNative)); - } - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern uint Windows_Kinect_AudioSource_get_SubFrameLengthInBytes(RootSystem.IntPtr pNative); - public uint SubFrameLengthInBytes - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("AudioSource"); - } - - return Windows_Kinect_AudioSource_get_SubFrameLengthInBytes(_pNative); - } - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern Windows.Kinect.KinectAudioCalibrationState Windows_Kinect_AudioSource_get_AudioCalibrationState(RootSystem.IntPtr pNative); - public Windows.Kinect.KinectAudioCalibrationState AudioCalibrationState - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("AudioSource"); - } - - return Windows_Kinect_AudioSource_get_AudioCalibrationState(_pNative); - } - } - - - // Events - private static RootSystem.Runtime.InteropServices.GCHandle _Windows_Kinect_FrameCapturedEventArgs_Delegate_Handle; - [RootSystem.Runtime.InteropServices.UnmanagedFunctionPointer(RootSystem.Runtime.InteropServices.CallingConvention.Cdecl)] - private delegate void _Windows_Kinect_FrameCapturedEventArgs_Delegate(RootSystem.IntPtr args, RootSystem.IntPtr pNative); - private static Helper.CollectionMap>> Windows_Kinect_FrameCapturedEventArgs_Delegate_callbacks = new Helper.CollectionMap>>(); - [AOT.MonoPInvokeCallbackAttribute(typeof(_Windows_Kinect_FrameCapturedEventArgs_Delegate))] - private static void Windows_Kinect_FrameCapturedEventArgs_Delegate_Handler(RootSystem.IntPtr result, RootSystem.IntPtr pNative) - { - List> callbackList = null; - Windows_Kinect_FrameCapturedEventArgs_Delegate_callbacks.TryGetValue(pNative, out callbackList); - lock(callbackList) - { - var objThis = Helper.NativeObjectCache.GetObject(pNative); - var args = new Windows.Kinect.FrameCapturedEventArgs(result); - foreach(var func in callbackList) - { - Helper.EventPump.Instance.Enqueue(() => { try { func(objThis, args); } catch { } }); - } - } - } - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_AudioSource_add_FrameCaptured(RootSystem.IntPtr pNative, _Windows_Kinect_FrameCapturedEventArgs_Delegate eventCallback, bool unsubscribe); - public event RootSystem.EventHandler FrameCaptured - { - add - { - Helper.EventPump.EnsureInitialized(); - - Windows_Kinect_FrameCapturedEventArgs_Delegate_callbacks.TryAddDefault(_pNative); - var callbackList = Windows_Kinect_FrameCapturedEventArgs_Delegate_callbacks[_pNative]; - lock (callbackList) - { - callbackList.Add(value); - if(callbackList.Count == 1) - { - var del = new _Windows_Kinect_FrameCapturedEventArgs_Delegate(Windows_Kinect_FrameCapturedEventArgs_Delegate_Handler); - _Windows_Kinect_FrameCapturedEventArgs_Delegate_Handle = RootSystem.Runtime.InteropServices.GCHandle.Alloc(del); - Windows_Kinect_AudioSource_add_FrameCaptured(_pNative, del, false); - } - } - } - remove - { - if (_pNative == RootSystem.IntPtr.Zero) - { - return; - } - - Windows_Kinect_FrameCapturedEventArgs_Delegate_callbacks.TryAddDefault(_pNative); - var callbackList = Windows_Kinect_FrameCapturedEventArgs_Delegate_callbacks[_pNative]; - lock (callbackList) - { - callbackList.Remove(value); - if(callbackList.Count == 0) - { - Windows_Kinect_AudioSource_add_FrameCaptured(_pNative, Windows_Kinect_FrameCapturedEventArgs_Delegate_Handler, true); - _Windows_Kinect_FrameCapturedEventArgs_Delegate_Handle.Free(); - } - } - } - } - - private static RootSystem.Runtime.InteropServices.GCHandle _Windows_Data_PropertyChangedEventArgs_Delegate_Handle; - [RootSystem.Runtime.InteropServices.UnmanagedFunctionPointer(RootSystem.Runtime.InteropServices.CallingConvention.Cdecl)] - private delegate void _Windows_Data_PropertyChangedEventArgs_Delegate(RootSystem.IntPtr args, RootSystem.IntPtr pNative); - private static Helper.CollectionMap>> Windows_Data_PropertyChangedEventArgs_Delegate_callbacks = new Helper.CollectionMap>>(); - [AOT.MonoPInvokeCallbackAttribute(typeof(_Windows_Data_PropertyChangedEventArgs_Delegate))] - private static void Windows_Data_PropertyChangedEventArgs_Delegate_Handler(RootSystem.IntPtr result, RootSystem.IntPtr pNative) - { - List> callbackList = null; - Windows_Data_PropertyChangedEventArgs_Delegate_callbacks.TryGetValue(pNative, out callbackList); - lock(callbackList) - { - var objThis = Helper.NativeObjectCache.GetObject(pNative); - var args = new Windows.Data.PropertyChangedEventArgs(result); - foreach(var func in callbackList) - { - Helper.EventPump.Instance.Enqueue(() => { try { func(objThis, args); } catch { } }); - } - } - } - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_AudioSource_add_PropertyChanged(RootSystem.IntPtr pNative, _Windows_Data_PropertyChangedEventArgs_Delegate eventCallback, bool unsubscribe); - public event RootSystem.EventHandler PropertyChanged - { - add - { - Helper.EventPump.EnsureInitialized(); - - Windows_Data_PropertyChangedEventArgs_Delegate_callbacks.TryAddDefault(_pNative); - var callbackList = Windows_Data_PropertyChangedEventArgs_Delegate_callbacks[_pNative]; - lock (callbackList) - { - callbackList.Add(value); - if(callbackList.Count == 1) - { - var del = new _Windows_Data_PropertyChangedEventArgs_Delegate(Windows_Data_PropertyChangedEventArgs_Delegate_Handler); - _Windows_Data_PropertyChangedEventArgs_Delegate_Handle = RootSystem.Runtime.InteropServices.GCHandle.Alloc(del); - Windows_Kinect_AudioSource_add_PropertyChanged(_pNative, del, false); - } - } - } - remove - { - if (_pNative == RootSystem.IntPtr.Zero) - { - return; - } - - Windows_Data_PropertyChangedEventArgs_Delegate_callbacks.TryAddDefault(_pNative); - var callbackList = Windows_Data_PropertyChangedEventArgs_Delegate_callbacks[_pNative]; - lock (callbackList) - { - callbackList.Remove(value); - if(callbackList.Count == 0) - { - Windows_Kinect_AudioSource_add_PropertyChanged(_pNative, Windows_Data_PropertyChangedEventArgs_Delegate_Handler, true); - _Windows_Data_PropertyChangedEventArgs_Delegate_Handle.Free(); - } - } - } - } - - - // Public Methods - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern RootSystem.IntPtr Windows_Kinect_AudioSource_OpenReader(RootSystem.IntPtr pNative); - public Windows.Kinect.AudioBeamFrameReader OpenReader() - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("AudioSource"); - } - - RootSystem.IntPtr objectPointer = Windows_Kinect_AudioSource_OpenReader(_pNative); - Helper.ExceptionHelper.CheckLastError(); - if (objectPointer == RootSystem.IntPtr.Zero) - { - return null; - } - - return Helper.NativeObjectCache.CreateOrGetObject(objectPointer, n => new Windows.Kinect.AudioBeamFrameReader(n)); - } - - private void __EventCleanup() - { - { - Windows_Kinect_FrameCapturedEventArgs_Delegate_callbacks.TryAddDefault(_pNative); - var callbackList = Windows_Kinect_FrameCapturedEventArgs_Delegate_callbacks[_pNative]; - lock (callbackList) - { - if (callbackList.Count > 0) - { - callbackList.Clear(); - if (_pNative != RootSystem.IntPtr.Zero) - { - Windows_Kinect_AudioSource_add_FrameCaptured(_pNative, Windows_Kinect_FrameCapturedEventArgs_Delegate_Handler, true); - } - _Windows_Kinect_FrameCapturedEventArgs_Delegate_Handle.Free(); - } - } - } - { - Windows_Data_PropertyChangedEventArgs_Delegate_callbacks.TryAddDefault(_pNative); - var callbackList = Windows_Data_PropertyChangedEventArgs_Delegate_callbacks[_pNative]; - lock (callbackList) - { - if (callbackList.Count > 0) - { - callbackList.Clear(); - if (_pNative != RootSystem.IntPtr.Zero) - { - Windows_Kinect_AudioSource_add_PropertyChanged(_pNative, Windows_Data_PropertyChangedEventArgs_Delegate_Handler, true); - } - _Windows_Data_PropertyChangedEventArgs_Delegate_Handle.Free(); - } - } - } - } - } - -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/AudioSource.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/AudioSource.cs.meta deleted file mode 100644 index d808a8e..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/AudioSource.cs.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: cb60632e999b8d44cb5cfd848e264abf -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/Body.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/Body.cs deleted file mode 100644 index 744d071..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/Body.cs +++ /dev/null @@ -1,355 +0,0 @@ -using RootSystem = System; -using System.Linq; -using System.Collections.Generic; -namespace Windows.Kinect -{ - // - // Windows.Kinect.Body - // - public sealed partial class Body : Helper.INativeWrapper - - { - internal RootSystem.IntPtr _pNative; - RootSystem.IntPtr Helper.INativeWrapper.nativePtr { get { return _pNative; } } - - // Constructors and Finalizers - internal Body(RootSystem.IntPtr pNative) - { - _pNative = pNative; - Windows_Kinect_Body_AddRefObject(ref _pNative); - } - - ~Body() - { - Dispose(false); - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_Body_ReleaseObject(ref RootSystem.IntPtr pNative); - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_Body_AddRefObject(ref RootSystem.IntPtr pNative); - private void Dispose(bool disposing) - { - if (_pNative == RootSystem.IntPtr.Zero) - { - return; - } - - __EventCleanup(); - - Helper.NativeObjectCache.RemoveObject(_pNative); - Windows_Kinect_Body_ReleaseObject(ref _pNative); - - _pNative = RootSystem.IntPtr.Zero; - } - - - // Public Properties - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern int Windows_Kinect_Body_get_Activities(RootSystem.IntPtr pNative, [RootSystem.Runtime.InteropServices.Out] Windows.Kinect.Activity[] outKeys, [RootSystem.Runtime.InteropServices.Out] Windows.Kinect.DetectionResult[] outValues, int outCollectionSize); - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern int Windows_Kinect_Body_get_Activities_Length(RootSystem.IntPtr pNative); - public RootSystem.Collections.Generic.Dictionary Activities - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("Body"); - } - - int outCollectionSize = Windows_Kinect_Body_get_Activities_Length(_pNative); - var outKeys = new Windows.Kinect.Activity[outCollectionSize]; - var outValues = new Windows.Kinect.DetectionResult[outCollectionSize]; - var managedDictionary = new RootSystem.Collections.Generic.Dictionary(); - - outCollectionSize = Windows_Kinect_Body_get_Activities(_pNative, outKeys, outValues, outCollectionSize); - Helper.ExceptionHelper.CheckLastError(); - for(int i=0;i Appearance - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("Body"); - } - - int outCollectionSize = Windows_Kinect_Body_get_Appearance_Length(_pNative); - var outKeys = new Windows.Kinect.Appearance[outCollectionSize]; - var outValues = new Windows.Kinect.DetectionResult[outCollectionSize]; - var managedDictionary = new RootSystem.Collections.Generic.Dictionary(); - - outCollectionSize = Windows_Kinect_Body_get_Appearance(_pNative, outKeys, outValues, outCollectionSize); - Helper.ExceptionHelper.CheckLastError(); - for(int i=0;i Expressions - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("Body"); - } - - int outCollectionSize = Windows_Kinect_Body_get_Expressions_Length(_pNative); - var outKeys = new Windows.Kinect.Expression[outCollectionSize]; - var outValues = new Windows.Kinect.DetectionResult[outCollectionSize]; - var managedDictionary = new RootSystem.Collections.Generic.Dictionary(); - - outCollectionSize = Windows_Kinect_Body_get_Expressions(_pNative, outKeys, outValues, outCollectionSize); - Helper.ExceptionHelper.CheckLastError(); - for(int i=0;i JointOrientations - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("Body"); - } - - int outCollectionSize = Windows_Kinect_Body_get_JointOrientations_Length(_pNative); - var outKeys = new Windows.Kinect.JointType[outCollectionSize]; - var outValues = new Windows.Kinect.JointOrientation[outCollectionSize]; - var managedDictionary = new RootSystem.Collections.Generic.Dictionary(); - - outCollectionSize = Windows_Kinect_Body_get_JointOrientations(_pNative, outKeys, outValues, outCollectionSize); - Helper.ExceptionHelper.CheckLastError(); - for(int i=0;i Joints - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("Body"); - } - - int outCollectionSize = Windows_Kinect_Body_get_Joints_Length(_pNative); - var outKeys = new Windows.Kinect.JointType[outCollectionSize]; - var outValues = new Windows.Kinect.Joint[outCollectionSize]; - var managedDictionary = new RootSystem.Collections.Generic.Dictionary(); - - outCollectionSize = Windows_Kinect_Body_get_Joints(_pNative, outKeys, outValues, outCollectionSize); - Helper.ExceptionHelper.CheckLastError(); - for(int i=0;i(_pNative); - - if (disposing) - { - Windows_Kinect_BodyFrame_Dispose(_pNative); - } - Windows_Kinect_BodyFrame_ReleaseObject(ref _pNative); - - _pNative = RootSystem.IntPtr.Zero; - } - - - // Public Properties - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern int Windows_Kinect_BodyFrame_get_BodyCount(RootSystem.IntPtr pNative); - public int BodyCount - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("BodyFrame"); - } - - return Windows_Kinect_BodyFrame_get_BodyCount(_pNative); - } - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern RootSystem.IntPtr Windows_Kinect_BodyFrame_get_BodyFrameSource(RootSystem.IntPtr pNative); - public Windows.Kinect.BodyFrameSource BodyFrameSource - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("BodyFrame"); - } - - RootSystem.IntPtr objectPointer = Windows_Kinect_BodyFrame_get_BodyFrameSource(_pNative); - Helper.ExceptionHelper.CheckLastError(); - if (objectPointer == RootSystem.IntPtr.Zero) - { - return null; - } - - return Helper.NativeObjectCache.CreateOrGetObject(objectPointer, n => new Windows.Kinect.BodyFrameSource(n)); - } - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern RootSystem.IntPtr Windows_Kinect_BodyFrame_get_FloorClipPlane(RootSystem.IntPtr pNative); - public Windows.Kinect.Vector4 FloorClipPlane - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("BodyFrame"); - } - - var objectPointer = Windows_Kinect_BodyFrame_get_FloorClipPlane(_pNative); - Helper.ExceptionHelper.CheckLastError(); - var obj = (Windows.Kinect.Vector4)RootSystem.Runtime.InteropServices.Marshal.PtrToStructure(objectPointer, typeof(Windows.Kinect.Vector4)); - Windows.Kinect.KinectUnityAddinUtils.FreeMemory(objectPointer); - return obj; - } - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern long Windows_Kinect_BodyFrame_get_RelativeTime(RootSystem.IntPtr pNative); - public RootSystem.TimeSpan RelativeTime - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("BodyFrame"); - } - - return RootSystem.TimeSpan.FromMilliseconds(Windows_Kinect_BodyFrame_get_RelativeTime(_pNative)); - } - } - - - // Public Methods - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_BodyFrame_Dispose(RootSystem.IntPtr pNative); - public void Dispose() - { - if (_pNative == RootSystem.IntPtr.Zero) - { - return; - } - - Dispose(true); - RootSystem.GC.SuppressFinalize(this); - } - - private void __EventCleanup() - { - } - } - -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/BodyFrame.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/BodyFrame.cs.meta deleted file mode 100644 index 79c2174..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/BodyFrame.cs.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 19d23b65a55461b4c8fcfc815e9a8be5 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/BodyFrameArrivedEventArgs.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/BodyFrameArrivedEventArgs.cs deleted file mode 100644 index 78c1e2e..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/BodyFrameArrivedEventArgs.cs +++ /dev/null @@ -1,75 +0,0 @@ -using RootSystem = System; -using System.Linq; -using System.Collections.Generic; -namespace Windows.Kinect -{ - // - // Windows.Kinect.BodyFrameArrivedEventArgs - // - public sealed partial class BodyFrameArrivedEventArgs : RootSystem.EventArgs, Helper.INativeWrapper - - { - internal RootSystem.IntPtr _pNative; - RootSystem.IntPtr Helper.INativeWrapper.nativePtr { get { return _pNative; } } - - // Constructors and Finalizers - internal BodyFrameArrivedEventArgs(RootSystem.IntPtr pNative) - { - _pNative = pNative; - Windows_Kinect_BodyFrameArrivedEventArgs_AddRefObject(ref _pNative); - } - - ~BodyFrameArrivedEventArgs() - { - Dispose(false); - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_BodyFrameArrivedEventArgs_ReleaseObject(ref RootSystem.IntPtr pNative); - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_BodyFrameArrivedEventArgs_AddRefObject(ref RootSystem.IntPtr pNative); - private void Dispose(bool disposing) - { - if (_pNative == RootSystem.IntPtr.Zero) - { - return; - } - - __EventCleanup(); - - Helper.NativeObjectCache.RemoveObject(_pNative); - Windows_Kinect_BodyFrameArrivedEventArgs_ReleaseObject(ref _pNative); - - _pNative = RootSystem.IntPtr.Zero; - } - - - // Public Properties - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern RootSystem.IntPtr Windows_Kinect_BodyFrameArrivedEventArgs_get_FrameReference(RootSystem.IntPtr pNative); - public Windows.Kinect.BodyFrameReference FrameReference - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("BodyFrameArrivedEventArgs"); - } - - RootSystem.IntPtr objectPointer = Windows_Kinect_BodyFrameArrivedEventArgs_get_FrameReference(_pNative); - Helper.ExceptionHelper.CheckLastError(); - if (objectPointer == RootSystem.IntPtr.Zero) - { - return null; - } - - return Helper.NativeObjectCache.CreateOrGetObject(objectPointer, n => new Windows.Kinect.BodyFrameReference(n)); - } - } - - private void __EventCleanup() - { - } - } - -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/BodyFrameArrivedEventArgs.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/BodyFrameArrivedEventArgs.cs.meta deleted file mode 100644 index 0f5a32f..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/BodyFrameArrivedEventArgs.cs.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 676ce9850965f6d4fad5e20fa2a8da30 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/BodyFrameReader.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/BodyFrameReader.cs deleted file mode 100644 index 981d83f..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/BodyFrameReader.cs +++ /dev/null @@ -1,297 +0,0 @@ -using RootSystem = System; -using System.Linq; -using System.Collections.Generic; -namespace Windows.Kinect -{ - // - // Windows.Kinect.BodyFrameReader - // - public sealed partial class BodyFrameReader : RootSystem.IDisposable, Helper.INativeWrapper - - { - internal RootSystem.IntPtr _pNative; - RootSystem.IntPtr Helper.INativeWrapper.nativePtr { get { return _pNative; } } - - // Constructors and Finalizers - internal BodyFrameReader(RootSystem.IntPtr pNative) - { - _pNative = pNative; - Windows_Kinect_BodyFrameReader_AddRefObject(ref _pNative); - } - - ~BodyFrameReader() - { - Dispose(false); - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_BodyFrameReader_ReleaseObject(ref RootSystem.IntPtr pNative); - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_BodyFrameReader_AddRefObject(ref RootSystem.IntPtr pNative); - private void Dispose(bool disposing) - { - if (_pNative == RootSystem.IntPtr.Zero) - { - return; - } - - __EventCleanup(); - - Helper.NativeObjectCache.RemoveObject(_pNative); - - if (disposing) - { - Windows_Kinect_BodyFrameReader_Dispose(_pNative); - } - Windows_Kinect_BodyFrameReader_ReleaseObject(ref _pNative); - - _pNative = RootSystem.IntPtr.Zero; - } - - - // Public Properties - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern RootSystem.IntPtr Windows_Kinect_BodyFrameReader_get_BodyFrameSource(RootSystem.IntPtr pNative); - public Windows.Kinect.BodyFrameSource BodyFrameSource - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("BodyFrameReader"); - } - - RootSystem.IntPtr objectPointer = Windows_Kinect_BodyFrameReader_get_BodyFrameSource(_pNative); - Helper.ExceptionHelper.CheckLastError(); - if (objectPointer == RootSystem.IntPtr.Zero) - { - return null; - } - - return Helper.NativeObjectCache.CreateOrGetObject(objectPointer, n => new Windows.Kinect.BodyFrameSource(n)); - } - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern bool Windows_Kinect_BodyFrameReader_get_IsPaused(RootSystem.IntPtr pNative); - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_BodyFrameReader_put_IsPaused(RootSystem.IntPtr pNative, bool isPaused); - public bool IsPaused - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("BodyFrameReader"); - } - - return Windows_Kinect_BodyFrameReader_get_IsPaused(_pNative); - } - set - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("BodyFrameReader"); - } - - Windows_Kinect_BodyFrameReader_put_IsPaused(_pNative, value); - Helper.ExceptionHelper.CheckLastError(); - } - } - - - // Events - private static RootSystem.Runtime.InteropServices.GCHandle _Windows_Kinect_BodyFrameArrivedEventArgs_Delegate_Handle; - [RootSystem.Runtime.InteropServices.UnmanagedFunctionPointer(RootSystem.Runtime.InteropServices.CallingConvention.Cdecl)] - private delegate void _Windows_Kinect_BodyFrameArrivedEventArgs_Delegate(RootSystem.IntPtr args, RootSystem.IntPtr pNative); - private static Helper.CollectionMap>> Windows_Kinect_BodyFrameArrivedEventArgs_Delegate_callbacks = new Helper.CollectionMap>>(); - [AOT.MonoPInvokeCallbackAttribute(typeof(_Windows_Kinect_BodyFrameArrivedEventArgs_Delegate))] - private static void Windows_Kinect_BodyFrameArrivedEventArgs_Delegate_Handler(RootSystem.IntPtr result, RootSystem.IntPtr pNative) - { - List> callbackList = null; - Windows_Kinect_BodyFrameArrivedEventArgs_Delegate_callbacks.TryGetValue(pNative, out callbackList); - lock(callbackList) - { - var objThis = Helper.NativeObjectCache.GetObject(pNative); - var args = new Windows.Kinect.BodyFrameArrivedEventArgs(result); - foreach(var func in callbackList) - { - Helper.EventPump.Instance.Enqueue(() => { try { func(objThis, args); } catch { } }); - } - } - } - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_BodyFrameReader_add_FrameArrived(RootSystem.IntPtr pNative, _Windows_Kinect_BodyFrameArrivedEventArgs_Delegate eventCallback, bool unsubscribe); - public event RootSystem.EventHandler FrameArrived - { - add - { - Helper.EventPump.EnsureInitialized(); - - Windows_Kinect_BodyFrameArrivedEventArgs_Delegate_callbacks.TryAddDefault(_pNative); - var callbackList = Windows_Kinect_BodyFrameArrivedEventArgs_Delegate_callbacks[_pNative]; - lock (callbackList) - { - callbackList.Add(value); - if(callbackList.Count == 1) - { - var del = new _Windows_Kinect_BodyFrameArrivedEventArgs_Delegate(Windows_Kinect_BodyFrameArrivedEventArgs_Delegate_Handler); - _Windows_Kinect_BodyFrameArrivedEventArgs_Delegate_Handle = RootSystem.Runtime.InteropServices.GCHandle.Alloc(del); - Windows_Kinect_BodyFrameReader_add_FrameArrived(_pNative, del, false); - } - } - } - remove - { - if (_pNative == RootSystem.IntPtr.Zero) - { - return; - } - - Windows_Kinect_BodyFrameArrivedEventArgs_Delegate_callbacks.TryAddDefault(_pNative); - var callbackList = Windows_Kinect_BodyFrameArrivedEventArgs_Delegate_callbacks[_pNative]; - lock (callbackList) - { - callbackList.Remove(value); - if(callbackList.Count == 0) - { - Windows_Kinect_BodyFrameReader_add_FrameArrived(_pNative, Windows_Kinect_BodyFrameArrivedEventArgs_Delegate_Handler, true); - _Windows_Kinect_BodyFrameArrivedEventArgs_Delegate_Handle.Free(); - } - } - } - } - - private static RootSystem.Runtime.InteropServices.GCHandle _Windows_Data_PropertyChangedEventArgs_Delegate_Handle; - [RootSystem.Runtime.InteropServices.UnmanagedFunctionPointer(RootSystem.Runtime.InteropServices.CallingConvention.Cdecl)] - private delegate void _Windows_Data_PropertyChangedEventArgs_Delegate(RootSystem.IntPtr args, RootSystem.IntPtr pNative); - private static Helper.CollectionMap>> Windows_Data_PropertyChangedEventArgs_Delegate_callbacks = new Helper.CollectionMap>>(); - [AOT.MonoPInvokeCallbackAttribute(typeof(_Windows_Data_PropertyChangedEventArgs_Delegate))] - private static void Windows_Data_PropertyChangedEventArgs_Delegate_Handler(RootSystem.IntPtr result, RootSystem.IntPtr pNative) - { - List> callbackList = null; - Windows_Data_PropertyChangedEventArgs_Delegate_callbacks.TryGetValue(pNative, out callbackList); - lock(callbackList) - { - var objThis = Helper.NativeObjectCache.GetObject(pNative); - var args = new Windows.Data.PropertyChangedEventArgs(result); - foreach(var func in callbackList) - { - Helper.EventPump.Instance.Enqueue(() => { try { func(objThis, args); } catch { } }); - } - } - } - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_BodyFrameReader_add_PropertyChanged(RootSystem.IntPtr pNative, _Windows_Data_PropertyChangedEventArgs_Delegate eventCallback, bool unsubscribe); - public event RootSystem.EventHandler PropertyChanged - { - add - { - Helper.EventPump.EnsureInitialized(); - - Windows_Data_PropertyChangedEventArgs_Delegate_callbacks.TryAddDefault(_pNative); - var callbackList = Windows_Data_PropertyChangedEventArgs_Delegate_callbacks[_pNative]; - lock (callbackList) - { - callbackList.Add(value); - if(callbackList.Count == 1) - { - var del = new _Windows_Data_PropertyChangedEventArgs_Delegate(Windows_Data_PropertyChangedEventArgs_Delegate_Handler); - _Windows_Data_PropertyChangedEventArgs_Delegate_Handle = RootSystem.Runtime.InteropServices.GCHandle.Alloc(del); - Windows_Kinect_BodyFrameReader_add_PropertyChanged(_pNative, del, false); - } - } - } - remove - { - if (_pNative == RootSystem.IntPtr.Zero) - { - return; - } - - Windows_Data_PropertyChangedEventArgs_Delegate_callbacks.TryAddDefault(_pNative); - var callbackList = Windows_Data_PropertyChangedEventArgs_Delegate_callbacks[_pNative]; - lock (callbackList) - { - callbackList.Remove(value); - if(callbackList.Count == 0) - { - Windows_Kinect_BodyFrameReader_add_PropertyChanged(_pNative, Windows_Data_PropertyChangedEventArgs_Delegate_Handler, true); - _Windows_Data_PropertyChangedEventArgs_Delegate_Handle.Free(); - } - } - } - } - - - // Public Methods - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern RootSystem.IntPtr Windows_Kinect_BodyFrameReader_AcquireLatestFrame(RootSystem.IntPtr pNative); - public Windows.Kinect.BodyFrame AcquireLatestFrame() - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("BodyFrameReader"); - } - - RootSystem.IntPtr objectPointer = Windows_Kinect_BodyFrameReader_AcquireLatestFrame(_pNative); - Helper.ExceptionHelper.CheckLastError(); - if (objectPointer == RootSystem.IntPtr.Zero) - { - return null; - } - - return Helper.NativeObjectCache.CreateOrGetObject(objectPointer, n => new Windows.Kinect.BodyFrame(n)); - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_BodyFrameReader_Dispose(RootSystem.IntPtr pNative); - public void Dispose() - { - if (_pNative == RootSystem.IntPtr.Zero) - { - return; - } - - Dispose(true); - RootSystem.GC.SuppressFinalize(this); - } - - private void __EventCleanup() - { - { - Windows_Kinect_BodyFrameArrivedEventArgs_Delegate_callbacks.TryAddDefault(_pNative); - var callbackList = Windows_Kinect_BodyFrameArrivedEventArgs_Delegate_callbacks[_pNative]; - lock (callbackList) - { - if (callbackList.Count > 0) - { - callbackList.Clear(); - if (_pNative != RootSystem.IntPtr.Zero) - { - Windows_Kinect_BodyFrameReader_add_FrameArrived(_pNative, Windows_Kinect_BodyFrameArrivedEventArgs_Delegate_Handler, true); - } - _Windows_Kinect_BodyFrameArrivedEventArgs_Delegate_Handle.Free(); - } - } - } - { - Windows_Data_PropertyChangedEventArgs_Delegate_callbacks.TryAddDefault(_pNative); - var callbackList = Windows_Data_PropertyChangedEventArgs_Delegate_callbacks[_pNative]; - lock (callbackList) - { - if (callbackList.Count > 0) - { - callbackList.Clear(); - if (_pNative != RootSystem.IntPtr.Zero) - { - Windows_Kinect_BodyFrameReader_add_PropertyChanged(_pNative, Windows_Data_PropertyChangedEventArgs_Delegate_Handler, true); - } - _Windows_Data_PropertyChangedEventArgs_Delegate_Handle.Free(); - } - } - } - } - } - -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/BodyFrameReader.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/BodyFrameReader.cs.meta deleted file mode 100644 index 3ccd3a8..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/BodyFrameReader.cs.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 3af2f300d248d614eb0f026c16be6e51 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/BodyFrameReference.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/BodyFrameReference.cs deleted file mode 100644 index e6cd68a..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/BodyFrameReference.cs +++ /dev/null @@ -1,89 +0,0 @@ -using RootSystem = System; -using System.Linq; -using System.Collections.Generic; -namespace Windows.Kinect -{ - // - // Windows.Kinect.BodyFrameReference - // - public sealed partial class BodyFrameReference : Helper.INativeWrapper - - { - internal RootSystem.IntPtr _pNative; - RootSystem.IntPtr Helper.INativeWrapper.nativePtr { get { return _pNative; } } - - // Constructors and Finalizers - internal BodyFrameReference(RootSystem.IntPtr pNative) - { - _pNative = pNative; - Windows_Kinect_BodyFrameReference_AddRefObject(ref _pNative); - } - - ~BodyFrameReference() - { - Dispose(false); - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_BodyFrameReference_ReleaseObject(ref RootSystem.IntPtr pNative); - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_BodyFrameReference_AddRefObject(ref RootSystem.IntPtr pNative); - private void Dispose(bool disposing) - { - if (_pNative == RootSystem.IntPtr.Zero) - { - return; - } - - __EventCleanup(); - - Helper.NativeObjectCache.RemoveObject(_pNative); - Windows_Kinect_BodyFrameReference_ReleaseObject(ref _pNative); - - _pNative = RootSystem.IntPtr.Zero; - } - - - // Public Properties - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern long Windows_Kinect_BodyFrameReference_get_RelativeTime(RootSystem.IntPtr pNative); - public RootSystem.TimeSpan RelativeTime - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("BodyFrameReference"); - } - - return RootSystem.TimeSpan.FromMilliseconds(Windows_Kinect_BodyFrameReference_get_RelativeTime(_pNative)); - } - } - - - // Public Methods - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern RootSystem.IntPtr Windows_Kinect_BodyFrameReference_AcquireFrame(RootSystem.IntPtr pNative); - public Windows.Kinect.BodyFrame AcquireFrame() - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("BodyFrameReference"); - } - - RootSystem.IntPtr objectPointer = Windows_Kinect_BodyFrameReference_AcquireFrame(_pNative); - Helper.ExceptionHelper.CheckLastError(); - if (objectPointer == RootSystem.IntPtr.Zero) - { - return null; - } - - return Helper.NativeObjectCache.CreateOrGetObject(objectPointer, n => new Windows.Kinect.BodyFrame(n)); - } - - private void __EventCleanup() - { - } - } - -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/BodyFrameReference.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/BodyFrameReference.cs.meta deleted file mode 100644 index 2356956..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/BodyFrameReference.cs.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 083a7736def5ad3429a51cc96a6c4564 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/BodyFrameSource.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/BodyFrameSource.cs deleted file mode 100644 index 20bc0be..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/BodyFrameSource.cs +++ /dev/null @@ -1,308 +0,0 @@ -using RootSystem = System; -using System.Linq; -using System.Collections.Generic; -namespace Windows.Kinect -{ - // - // Windows.Kinect.BodyFrameSource - // - public sealed partial class BodyFrameSource : Helper.INativeWrapper - - { - internal RootSystem.IntPtr _pNative; - RootSystem.IntPtr Helper.INativeWrapper.nativePtr { get { return _pNative; } } - - // Constructors and Finalizers - internal BodyFrameSource(RootSystem.IntPtr pNative) - { - _pNative = pNative; - Windows_Kinect_BodyFrameSource_AddRefObject(ref _pNative); - } - - ~BodyFrameSource() - { - Dispose(false); - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_BodyFrameSource_ReleaseObject(ref RootSystem.IntPtr pNative); - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_BodyFrameSource_AddRefObject(ref RootSystem.IntPtr pNative); - private void Dispose(bool disposing) - { - if (_pNative == RootSystem.IntPtr.Zero) - { - return; - } - - __EventCleanup(); - - Helper.NativeObjectCache.RemoveObject(_pNative); - Windows_Kinect_BodyFrameSource_ReleaseObject(ref _pNative); - - _pNative = RootSystem.IntPtr.Zero; - } - - - // Public Properties - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern int Windows_Kinect_BodyFrameSource_get_BodyCount(RootSystem.IntPtr pNative); - public int BodyCount - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("BodyFrameSource"); - } - - return Windows_Kinect_BodyFrameSource_get_BodyCount(_pNative); - } - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern bool Windows_Kinect_BodyFrameSource_get_IsActive(RootSystem.IntPtr pNative); - public bool IsActive - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("BodyFrameSource"); - } - - return Windows_Kinect_BodyFrameSource_get_IsActive(_pNative); - } - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern RootSystem.IntPtr Windows_Kinect_BodyFrameSource_get_KinectSensor(RootSystem.IntPtr pNative); - public Windows.Kinect.KinectSensor KinectSensor - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("BodyFrameSource"); - } - - RootSystem.IntPtr objectPointer = Windows_Kinect_BodyFrameSource_get_KinectSensor(_pNative); - Helper.ExceptionHelper.CheckLastError(); - if (objectPointer == RootSystem.IntPtr.Zero) - { - return null; - } - - return Helper.NativeObjectCache.CreateOrGetObject(objectPointer, n => new Windows.Kinect.KinectSensor(n)); - } - } - - - // Events - private static RootSystem.Runtime.InteropServices.GCHandle _Windows_Kinect_FrameCapturedEventArgs_Delegate_Handle; - [RootSystem.Runtime.InteropServices.UnmanagedFunctionPointer(RootSystem.Runtime.InteropServices.CallingConvention.Cdecl)] - private delegate void _Windows_Kinect_FrameCapturedEventArgs_Delegate(RootSystem.IntPtr args, RootSystem.IntPtr pNative); - private static Helper.CollectionMap>> Windows_Kinect_FrameCapturedEventArgs_Delegate_callbacks = new Helper.CollectionMap>>(); - [AOT.MonoPInvokeCallbackAttribute(typeof(_Windows_Kinect_FrameCapturedEventArgs_Delegate))] - private static void Windows_Kinect_FrameCapturedEventArgs_Delegate_Handler(RootSystem.IntPtr result, RootSystem.IntPtr pNative) - { - List> callbackList = null; - Windows_Kinect_FrameCapturedEventArgs_Delegate_callbacks.TryGetValue(pNative, out callbackList); - lock(callbackList) - { - var objThis = Helper.NativeObjectCache.GetObject(pNative); - var args = new Windows.Kinect.FrameCapturedEventArgs(result); - foreach(var func in callbackList) - { - Helper.EventPump.Instance.Enqueue(() => { try { func(objThis, args); } catch { } }); - } - } - } - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_BodyFrameSource_add_FrameCaptured(RootSystem.IntPtr pNative, _Windows_Kinect_FrameCapturedEventArgs_Delegate eventCallback, bool unsubscribe); - public event RootSystem.EventHandler FrameCaptured - { - add - { - Helper.EventPump.EnsureInitialized(); - - Windows_Kinect_FrameCapturedEventArgs_Delegate_callbacks.TryAddDefault(_pNative); - var callbackList = Windows_Kinect_FrameCapturedEventArgs_Delegate_callbacks[_pNative]; - lock (callbackList) - { - callbackList.Add(value); - if(callbackList.Count == 1) - { - var del = new _Windows_Kinect_FrameCapturedEventArgs_Delegate(Windows_Kinect_FrameCapturedEventArgs_Delegate_Handler); - _Windows_Kinect_FrameCapturedEventArgs_Delegate_Handle = RootSystem.Runtime.InteropServices.GCHandle.Alloc(del); - Windows_Kinect_BodyFrameSource_add_FrameCaptured(_pNative, del, false); - } - } - } - remove - { - if (_pNative == RootSystem.IntPtr.Zero) - { - return; - } - - Windows_Kinect_FrameCapturedEventArgs_Delegate_callbacks.TryAddDefault(_pNative); - var callbackList = Windows_Kinect_FrameCapturedEventArgs_Delegate_callbacks[_pNative]; - lock (callbackList) - { - callbackList.Remove(value); - if(callbackList.Count == 0) - { - Windows_Kinect_BodyFrameSource_add_FrameCaptured(_pNative, Windows_Kinect_FrameCapturedEventArgs_Delegate_Handler, true); - _Windows_Kinect_FrameCapturedEventArgs_Delegate_Handle.Free(); - } - } - } - } - - private static RootSystem.Runtime.InteropServices.GCHandle _Windows_Data_PropertyChangedEventArgs_Delegate_Handle; - [RootSystem.Runtime.InteropServices.UnmanagedFunctionPointer(RootSystem.Runtime.InteropServices.CallingConvention.Cdecl)] - private delegate void _Windows_Data_PropertyChangedEventArgs_Delegate(RootSystem.IntPtr args, RootSystem.IntPtr pNative); - private static Helper.CollectionMap>> Windows_Data_PropertyChangedEventArgs_Delegate_callbacks = new Helper.CollectionMap>>(); - [AOT.MonoPInvokeCallbackAttribute(typeof(_Windows_Data_PropertyChangedEventArgs_Delegate))] - private static void Windows_Data_PropertyChangedEventArgs_Delegate_Handler(RootSystem.IntPtr result, RootSystem.IntPtr pNative) - { - List> callbackList = null; - Windows_Data_PropertyChangedEventArgs_Delegate_callbacks.TryGetValue(pNative, out callbackList); - lock(callbackList) - { - var objThis = Helper.NativeObjectCache.GetObject(pNative); - var args = new Windows.Data.PropertyChangedEventArgs(result); - foreach(var func in callbackList) - { - Helper.EventPump.Instance.Enqueue(() => { try { func(objThis, args); } catch { } }); - } - } - } - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_BodyFrameSource_add_PropertyChanged(RootSystem.IntPtr pNative, _Windows_Data_PropertyChangedEventArgs_Delegate eventCallback, bool unsubscribe); - public event RootSystem.EventHandler PropertyChanged - { - add - { - Helper.EventPump.EnsureInitialized(); - - Windows_Data_PropertyChangedEventArgs_Delegate_callbacks.TryAddDefault(_pNative); - var callbackList = Windows_Data_PropertyChangedEventArgs_Delegate_callbacks[_pNative]; - lock (callbackList) - { - callbackList.Add(value); - if(callbackList.Count == 1) - { - var del = new _Windows_Data_PropertyChangedEventArgs_Delegate(Windows_Data_PropertyChangedEventArgs_Delegate_Handler); - _Windows_Data_PropertyChangedEventArgs_Delegate_Handle = RootSystem.Runtime.InteropServices.GCHandle.Alloc(del); - Windows_Kinect_BodyFrameSource_add_PropertyChanged(_pNative, del, false); - } - } - } - remove - { - if (_pNative == RootSystem.IntPtr.Zero) - { - return; - } - - Windows_Data_PropertyChangedEventArgs_Delegate_callbacks.TryAddDefault(_pNative); - var callbackList = Windows_Data_PropertyChangedEventArgs_Delegate_callbacks[_pNative]; - lock (callbackList) - { - callbackList.Remove(value); - if(callbackList.Count == 0) - { - Windows_Kinect_BodyFrameSource_add_PropertyChanged(_pNative, Windows_Data_PropertyChangedEventArgs_Delegate_Handler, true); - _Windows_Data_PropertyChangedEventArgs_Delegate_Handle.Free(); - } - } - } - } - - - // Public Methods - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern RootSystem.IntPtr Windows_Kinect_BodyFrameSource_OpenReader(RootSystem.IntPtr pNative); - public Windows.Kinect.BodyFrameReader OpenReader() - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("BodyFrameSource"); - } - - RootSystem.IntPtr objectPointer = Windows_Kinect_BodyFrameSource_OpenReader(_pNative); - Helper.ExceptionHelper.CheckLastError(); - if (objectPointer == RootSystem.IntPtr.Zero) - { - return null; - } - - return Helper.NativeObjectCache.CreateOrGetObject(objectPointer, n => new Windows.Kinect.BodyFrameReader(n)); - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_BodyFrameSource_OverrideHandTracking(RootSystem.IntPtr pNative, ulong trackingId); - public void OverrideHandTracking(ulong trackingId) - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("BodyFrameSource"); - } - - Windows_Kinect_BodyFrameSource_OverrideHandTracking(_pNative, trackingId); - Helper.ExceptionHelper.CheckLastError(); - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_BodyFrameSource_OverrideHandTracking_1(RootSystem.IntPtr pNative, ulong oldTrackingId, ulong newTrackingId); - public void OverrideHandTracking(ulong oldTrackingId, ulong newTrackingId) - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("BodyFrameSource"); - } - - Windows_Kinect_BodyFrameSource_OverrideHandTracking_1(_pNative, oldTrackingId, newTrackingId); - Helper.ExceptionHelper.CheckLastError(); - } - - private void __EventCleanup() - { - { - Windows_Kinect_FrameCapturedEventArgs_Delegate_callbacks.TryAddDefault(_pNative); - var callbackList = Windows_Kinect_FrameCapturedEventArgs_Delegate_callbacks[_pNative]; - lock (callbackList) - { - if (callbackList.Count > 0) - { - callbackList.Clear(); - if (_pNative != RootSystem.IntPtr.Zero) - { - Windows_Kinect_BodyFrameSource_add_FrameCaptured(_pNative, Windows_Kinect_FrameCapturedEventArgs_Delegate_Handler, true); - } - _Windows_Kinect_FrameCapturedEventArgs_Delegate_Handle.Free(); - } - } - } - { - Windows_Data_PropertyChangedEventArgs_Delegate_callbacks.TryAddDefault(_pNative); - var callbackList = Windows_Data_PropertyChangedEventArgs_Delegate_callbacks[_pNative]; - lock (callbackList) - { - if (callbackList.Count > 0) - { - callbackList.Clear(); - if (_pNative != RootSystem.IntPtr.Zero) - { - Windows_Kinect_BodyFrameSource_add_PropertyChanged(_pNative, Windows_Data_PropertyChangedEventArgs_Delegate_Handler, true); - } - _Windows_Data_PropertyChangedEventArgs_Delegate_Handle.Free(); - } - } - } - } - } - -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/BodyFrameSource.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/BodyFrameSource.cs.meta deleted file mode 100644 index 1757146..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/BodyFrameSource.cs.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 3679e372811a218438e365b6da52873c -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/BodyIndexFrame.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/BodyIndexFrame.cs deleted file mode 100644 index 46f8311..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/BodyIndexFrame.cs +++ /dev/null @@ -1,147 +0,0 @@ -using RootSystem = System; -using System.Linq; -using System.Collections.Generic; -namespace Windows.Kinect -{ - // - // Windows.Kinect.BodyIndexFrame - // - public sealed partial class BodyIndexFrame : RootSystem.IDisposable, Helper.INativeWrapper - - { - internal RootSystem.IntPtr _pNative; - RootSystem.IntPtr Helper.INativeWrapper.nativePtr { get { return _pNative; } } - - // Constructors and Finalizers - internal BodyIndexFrame(RootSystem.IntPtr pNative) - { - _pNative = pNative; - Windows_Kinect_BodyIndexFrame_AddRefObject(ref _pNative); - } - - ~BodyIndexFrame() - { - Dispose(false); - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_BodyIndexFrame_ReleaseObject(ref RootSystem.IntPtr pNative); - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_BodyIndexFrame_AddRefObject(ref RootSystem.IntPtr pNative); - private void Dispose(bool disposing) - { - if (_pNative == RootSystem.IntPtr.Zero) - { - return; - } - - __EventCleanup(); - - Helper.NativeObjectCache.RemoveObject(_pNative); - - if (disposing) - { - Windows_Kinect_BodyIndexFrame_Dispose(_pNative); - } - Windows_Kinect_BodyIndexFrame_ReleaseObject(ref _pNative); - - _pNative = RootSystem.IntPtr.Zero; - } - - - // Public Properties - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern RootSystem.IntPtr Windows_Kinect_BodyIndexFrame_get_BodyIndexFrameSource(RootSystem.IntPtr pNative); - public Windows.Kinect.BodyIndexFrameSource BodyIndexFrameSource - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("BodyIndexFrame"); - } - - RootSystem.IntPtr objectPointer = Windows_Kinect_BodyIndexFrame_get_BodyIndexFrameSource(_pNative); - Helper.ExceptionHelper.CheckLastError(); - if (objectPointer == RootSystem.IntPtr.Zero) - { - return null; - } - - return Helper.NativeObjectCache.CreateOrGetObject(objectPointer, n => new Windows.Kinect.BodyIndexFrameSource(n)); - } - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern RootSystem.IntPtr Windows_Kinect_BodyIndexFrame_get_FrameDescription(RootSystem.IntPtr pNative); - public Windows.Kinect.FrameDescription FrameDescription - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("BodyIndexFrame"); - } - - RootSystem.IntPtr objectPointer = Windows_Kinect_BodyIndexFrame_get_FrameDescription(_pNative); - Helper.ExceptionHelper.CheckLastError(); - if (objectPointer == RootSystem.IntPtr.Zero) - { - return null; - } - - return Helper.NativeObjectCache.CreateOrGetObject(objectPointer, n => new Windows.Kinect.FrameDescription(n)); - } - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern long Windows_Kinect_BodyIndexFrame_get_RelativeTime(RootSystem.IntPtr pNative); - public RootSystem.TimeSpan RelativeTime - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("BodyIndexFrame"); - } - - return RootSystem.TimeSpan.FromMilliseconds(Windows_Kinect_BodyIndexFrame_get_RelativeTime(_pNative)); - } - } - - - // Public Methods - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_BodyIndexFrame_CopyFrameDataToArray(RootSystem.IntPtr pNative, RootSystem.IntPtr frameData, int frameDataSize); - public void CopyFrameDataToArray(byte[] frameData) - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("BodyIndexFrame"); - } - - var frameDataSmartGCHandle = new Helper.SmartGCHandle(RootSystem.Runtime.InteropServices.GCHandle.Alloc(frameData, RootSystem.Runtime.InteropServices.GCHandleType.Pinned)); - var _frameData = frameDataSmartGCHandle.AddrOfPinnedObject(); - Windows_Kinect_BodyIndexFrame_CopyFrameDataToArray(_pNative, _frameData, frameData.Length); - Helper.ExceptionHelper.CheckLastError(); - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_BodyIndexFrame_Dispose(RootSystem.IntPtr pNative); - public void Dispose() - { - if (_pNative == RootSystem.IntPtr.Zero) - { - return; - } - - Dispose(true); - RootSystem.GC.SuppressFinalize(this); - } - - private void __EventCleanup() - { - } - } - -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/BodyIndexFrame.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/BodyIndexFrame.cs.meta deleted file mode 100644 index 89d8a61..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/BodyIndexFrame.cs.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 31029a9c200fe984790d50a6d2875e32 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/BodyIndexFrameArrivedEventArgs.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/BodyIndexFrameArrivedEventArgs.cs deleted file mode 100644 index 5f61069..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/BodyIndexFrameArrivedEventArgs.cs +++ /dev/null @@ -1,75 +0,0 @@ -using RootSystem = System; -using System.Linq; -using System.Collections.Generic; -namespace Windows.Kinect -{ - // - // Windows.Kinect.BodyIndexFrameArrivedEventArgs - // - public sealed partial class BodyIndexFrameArrivedEventArgs : RootSystem.EventArgs, Helper.INativeWrapper - - { - internal RootSystem.IntPtr _pNative; - RootSystem.IntPtr Helper.INativeWrapper.nativePtr { get { return _pNative; } } - - // Constructors and Finalizers - internal BodyIndexFrameArrivedEventArgs(RootSystem.IntPtr pNative) - { - _pNative = pNative; - Windows_Kinect_BodyIndexFrameArrivedEventArgs_AddRefObject(ref _pNative); - } - - ~BodyIndexFrameArrivedEventArgs() - { - Dispose(false); - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_BodyIndexFrameArrivedEventArgs_ReleaseObject(ref RootSystem.IntPtr pNative); - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_BodyIndexFrameArrivedEventArgs_AddRefObject(ref RootSystem.IntPtr pNative); - private void Dispose(bool disposing) - { - if (_pNative == RootSystem.IntPtr.Zero) - { - return; - } - - __EventCleanup(); - - Helper.NativeObjectCache.RemoveObject(_pNative); - Windows_Kinect_BodyIndexFrameArrivedEventArgs_ReleaseObject(ref _pNative); - - _pNative = RootSystem.IntPtr.Zero; - } - - - // Public Properties - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern RootSystem.IntPtr Windows_Kinect_BodyIndexFrameArrivedEventArgs_get_FrameReference(RootSystem.IntPtr pNative); - public Windows.Kinect.BodyIndexFrameReference FrameReference - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("BodyIndexFrameArrivedEventArgs"); - } - - RootSystem.IntPtr objectPointer = Windows_Kinect_BodyIndexFrameArrivedEventArgs_get_FrameReference(_pNative); - Helper.ExceptionHelper.CheckLastError(); - if (objectPointer == RootSystem.IntPtr.Zero) - { - return null; - } - - return Helper.NativeObjectCache.CreateOrGetObject(objectPointer, n => new Windows.Kinect.BodyIndexFrameReference(n)); - } - } - - private void __EventCleanup() - { - } - } - -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/BodyIndexFrameArrivedEventArgs.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/BodyIndexFrameArrivedEventArgs.cs.meta deleted file mode 100644 index c367ea9..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/BodyIndexFrameArrivedEventArgs.cs.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 673826e3a38138946b030da95a1d0f95 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/BodyIndexFrameReader.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/BodyIndexFrameReader.cs deleted file mode 100644 index d12ae3f..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/BodyIndexFrameReader.cs +++ /dev/null @@ -1,297 +0,0 @@ -using RootSystem = System; -using System.Linq; -using System.Collections.Generic; -namespace Windows.Kinect -{ - // - // Windows.Kinect.BodyIndexFrameReader - // - public sealed partial class BodyIndexFrameReader : RootSystem.IDisposable, Helper.INativeWrapper - - { - internal RootSystem.IntPtr _pNative; - RootSystem.IntPtr Helper.INativeWrapper.nativePtr { get { return _pNative; } } - - // Constructors and Finalizers - internal BodyIndexFrameReader(RootSystem.IntPtr pNative) - { - _pNative = pNative; - Windows_Kinect_BodyIndexFrameReader_AddRefObject(ref _pNative); - } - - ~BodyIndexFrameReader() - { - Dispose(false); - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_BodyIndexFrameReader_ReleaseObject(ref RootSystem.IntPtr pNative); - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_BodyIndexFrameReader_AddRefObject(ref RootSystem.IntPtr pNative); - private void Dispose(bool disposing) - { - if (_pNative == RootSystem.IntPtr.Zero) - { - return; - } - - __EventCleanup(); - - Helper.NativeObjectCache.RemoveObject(_pNative); - - if (disposing) - { - Windows_Kinect_BodyIndexFrameReader_Dispose(_pNative); - } - Windows_Kinect_BodyIndexFrameReader_ReleaseObject(ref _pNative); - - _pNative = RootSystem.IntPtr.Zero; - } - - - // Public Properties - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern RootSystem.IntPtr Windows_Kinect_BodyIndexFrameReader_get_BodyIndexFrameSource(RootSystem.IntPtr pNative); - public Windows.Kinect.BodyIndexFrameSource BodyIndexFrameSource - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("BodyIndexFrameReader"); - } - - RootSystem.IntPtr objectPointer = Windows_Kinect_BodyIndexFrameReader_get_BodyIndexFrameSource(_pNative); - Helper.ExceptionHelper.CheckLastError(); - if (objectPointer == RootSystem.IntPtr.Zero) - { - return null; - } - - return Helper.NativeObjectCache.CreateOrGetObject(objectPointer, n => new Windows.Kinect.BodyIndexFrameSource(n)); - } - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern bool Windows_Kinect_BodyIndexFrameReader_get_IsPaused(RootSystem.IntPtr pNative); - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_BodyIndexFrameReader_put_IsPaused(RootSystem.IntPtr pNative, bool isPaused); - public bool IsPaused - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("BodyIndexFrameReader"); - } - - return Windows_Kinect_BodyIndexFrameReader_get_IsPaused(_pNative); - } - set - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("BodyIndexFrameReader"); - } - - Windows_Kinect_BodyIndexFrameReader_put_IsPaused(_pNative, value); - Helper.ExceptionHelper.CheckLastError(); - } - } - - - // Events - private static RootSystem.Runtime.InteropServices.GCHandle _Windows_Kinect_BodyIndexFrameArrivedEventArgs_Delegate_Handle; - [RootSystem.Runtime.InteropServices.UnmanagedFunctionPointer(RootSystem.Runtime.InteropServices.CallingConvention.Cdecl)] - private delegate void _Windows_Kinect_BodyIndexFrameArrivedEventArgs_Delegate(RootSystem.IntPtr args, RootSystem.IntPtr pNative); - private static Helper.CollectionMap>> Windows_Kinect_BodyIndexFrameArrivedEventArgs_Delegate_callbacks = new Helper.CollectionMap>>(); - [AOT.MonoPInvokeCallbackAttribute(typeof(_Windows_Kinect_BodyIndexFrameArrivedEventArgs_Delegate))] - private static void Windows_Kinect_BodyIndexFrameArrivedEventArgs_Delegate_Handler(RootSystem.IntPtr result, RootSystem.IntPtr pNative) - { - List> callbackList = null; - Windows_Kinect_BodyIndexFrameArrivedEventArgs_Delegate_callbacks.TryGetValue(pNative, out callbackList); - lock(callbackList) - { - var objThis = Helper.NativeObjectCache.GetObject(pNative); - var args = new Windows.Kinect.BodyIndexFrameArrivedEventArgs(result); - foreach(var func in callbackList) - { - Helper.EventPump.Instance.Enqueue(() => { try { func(objThis, args); } catch { } }); - } - } - } - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_BodyIndexFrameReader_add_FrameArrived(RootSystem.IntPtr pNative, _Windows_Kinect_BodyIndexFrameArrivedEventArgs_Delegate eventCallback, bool unsubscribe); - public event RootSystem.EventHandler FrameArrived - { - add - { - Helper.EventPump.EnsureInitialized(); - - Windows_Kinect_BodyIndexFrameArrivedEventArgs_Delegate_callbacks.TryAddDefault(_pNative); - var callbackList = Windows_Kinect_BodyIndexFrameArrivedEventArgs_Delegate_callbacks[_pNative]; - lock (callbackList) - { - callbackList.Add(value); - if(callbackList.Count == 1) - { - var del = new _Windows_Kinect_BodyIndexFrameArrivedEventArgs_Delegate(Windows_Kinect_BodyIndexFrameArrivedEventArgs_Delegate_Handler); - _Windows_Kinect_BodyIndexFrameArrivedEventArgs_Delegate_Handle = RootSystem.Runtime.InteropServices.GCHandle.Alloc(del); - Windows_Kinect_BodyIndexFrameReader_add_FrameArrived(_pNative, del, false); - } - } - } - remove - { - if (_pNative == RootSystem.IntPtr.Zero) - { - return; - } - - Windows_Kinect_BodyIndexFrameArrivedEventArgs_Delegate_callbacks.TryAddDefault(_pNative); - var callbackList = Windows_Kinect_BodyIndexFrameArrivedEventArgs_Delegate_callbacks[_pNative]; - lock (callbackList) - { - callbackList.Remove(value); - if(callbackList.Count == 0) - { - Windows_Kinect_BodyIndexFrameReader_add_FrameArrived(_pNative, Windows_Kinect_BodyIndexFrameArrivedEventArgs_Delegate_Handler, true); - _Windows_Kinect_BodyIndexFrameArrivedEventArgs_Delegate_Handle.Free(); - } - } - } - } - - private static RootSystem.Runtime.InteropServices.GCHandle _Windows_Data_PropertyChangedEventArgs_Delegate_Handle; - [RootSystem.Runtime.InteropServices.UnmanagedFunctionPointer(RootSystem.Runtime.InteropServices.CallingConvention.Cdecl)] - private delegate void _Windows_Data_PropertyChangedEventArgs_Delegate(RootSystem.IntPtr args, RootSystem.IntPtr pNative); - private static Helper.CollectionMap>> Windows_Data_PropertyChangedEventArgs_Delegate_callbacks = new Helper.CollectionMap>>(); - [AOT.MonoPInvokeCallbackAttribute(typeof(_Windows_Data_PropertyChangedEventArgs_Delegate))] - private static void Windows_Data_PropertyChangedEventArgs_Delegate_Handler(RootSystem.IntPtr result, RootSystem.IntPtr pNative) - { - List> callbackList = null; - Windows_Data_PropertyChangedEventArgs_Delegate_callbacks.TryGetValue(pNative, out callbackList); - lock(callbackList) - { - var objThis = Helper.NativeObjectCache.GetObject(pNative); - var args = new Windows.Data.PropertyChangedEventArgs(result); - foreach(var func in callbackList) - { - Helper.EventPump.Instance.Enqueue(() => { try { func(objThis, args); } catch { } }); - } - } - } - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_BodyIndexFrameReader_add_PropertyChanged(RootSystem.IntPtr pNative, _Windows_Data_PropertyChangedEventArgs_Delegate eventCallback, bool unsubscribe); - public event RootSystem.EventHandler PropertyChanged - { - add - { - Helper.EventPump.EnsureInitialized(); - - Windows_Data_PropertyChangedEventArgs_Delegate_callbacks.TryAddDefault(_pNative); - var callbackList = Windows_Data_PropertyChangedEventArgs_Delegate_callbacks[_pNative]; - lock (callbackList) - { - callbackList.Add(value); - if(callbackList.Count == 1) - { - var del = new _Windows_Data_PropertyChangedEventArgs_Delegate(Windows_Data_PropertyChangedEventArgs_Delegate_Handler); - _Windows_Data_PropertyChangedEventArgs_Delegate_Handle = RootSystem.Runtime.InteropServices.GCHandle.Alloc(del); - Windows_Kinect_BodyIndexFrameReader_add_PropertyChanged(_pNative, del, false); - } - } - } - remove - { - if (_pNative == RootSystem.IntPtr.Zero) - { - return; - } - - Windows_Data_PropertyChangedEventArgs_Delegate_callbacks.TryAddDefault(_pNative); - var callbackList = Windows_Data_PropertyChangedEventArgs_Delegate_callbacks[_pNative]; - lock (callbackList) - { - callbackList.Remove(value); - if(callbackList.Count == 0) - { - Windows_Kinect_BodyIndexFrameReader_add_PropertyChanged(_pNative, Windows_Data_PropertyChangedEventArgs_Delegate_Handler, true); - _Windows_Data_PropertyChangedEventArgs_Delegate_Handle.Free(); - } - } - } - } - - - // Public Methods - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern RootSystem.IntPtr Windows_Kinect_BodyIndexFrameReader_AcquireLatestFrame(RootSystem.IntPtr pNative); - public Windows.Kinect.BodyIndexFrame AcquireLatestFrame() - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("BodyIndexFrameReader"); - } - - RootSystem.IntPtr objectPointer = Windows_Kinect_BodyIndexFrameReader_AcquireLatestFrame(_pNative); - Helper.ExceptionHelper.CheckLastError(); - if (objectPointer == RootSystem.IntPtr.Zero) - { - return null; - } - - return Helper.NativeObjectCache.CreateOrGetObject(objectPointer, n => new Windows.Kinect.BodyIndexFrame(n)); - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_BodyIndexFrameReader_Dispose(RootSystem.IntPtr pNative); - public void Dispose() - { - if (_pNative == RootSystem.IntPtr.Zero) - { - return; - } - - Dispose(true); - RootSystem.GC.SuppressFinalize(this); - } - - private void __EventCleanup() - { - { - Windows_Kinect_BodyIndexFrameArrivedEventArgs_Delegate_callbacks.TryAddDefault(_pNative); - var callbackList = Windows_Kinect_BodyIndexFrameArrivedEventArgs_Delegate_callbacks[_pNative]; - lock (callbackList) - { - if (callbackList.Count > 0) - { - callbackList.Clear(); - if (_pNative != RootSystem.IntPtr.Zero) - { - Windows_Kinect_BodyIndexFrameReader_add_FrameArrived(_pNative, Windows_Kinect_BodyIndexFrameArrivedEventArgs_Delegate_Handler, true); - } - _Windows_Kinect_BodyIndexFrameArrivedEventArgs_Delegate_Handle.Free(); - } - } - } - { - Windows_Data_PropertyChangedEventArgs_Delegate_callbacks.TryAddDefault(_pNative); - var callbackList = Windows_Data_PropertyChangedEventArgs_Delegate_callbacks[_pNative]; - lock (callbackList) - { - if (callbackList.Count > 0) - { - callbackList.Clear(); - if (_pNative != RootSystem.IntPtr.Zero) - { - Windows_Kinect_BodyIndexFrameReader_add_PropertyChanged(_pNative, Windows_Data_PropertyChangedEventArgs_Delegate_Handler, true); - } - _Windows_Data_PropertyChangedEventArgs_Delegate_Handle.Free(); - } - } - } - } - } - -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/BodyIndexFrameReader.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/BodyIndexFrameReader.cs.meta deleted file mode 100644 index 197c659..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/BodyIndexFrameReader.cs.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 0a9ba9eb393e51241bb15db5d3bf3390 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/BodyIndexFrameReference.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/BodyIndexFrameReference.cs deleted file mode 100644 index 822a944..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/BodyIndexFrameReference.cs +++ /dev/null @@ -1,89 +0,0 @@ -using RootSystem = System; -using System.Linq; -using System.Collections.Generic; -namespace Windows.Kinect -{ - // - // Windows.Kinect.BodyIndexFrameReference - // - public sealed partial class BodyIndexFrameReference : Helper.INativeWrapper - - { - internal RootSystem.IntPtr _pNative; - RootSystem.IntPtr Helper.INativeWrapper.nativePtr { get { return _pNative; } } - - // Constructors and Finalizers - internal BodyIndexFrameReference(RootSystem.IntPtr pNative) - { - _pNative = pNative; - Windows_Kinect_BodyIndexFrameReference_AddRefObject(ref _pNative); - } - - ~BodyIndexFrameReference() - { - Dispose(false); - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_BodyIndexFrameReference_ReleaseObject(ref RootSystem.IntPtr pNative); - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_BodyIndexFrameReference_AddRefObject(ref RootSystem.IntPtr pNative); - private void Dispose(bool disposing) - { - if (_pNative == RootSystem.IntPtr.Zero) - { - return; - } - - __EventCleanup(); - - Helper.NativeObjectCache.RemoveObject(_pNative); - Windows_Kinect_BodyIndexFrameReference_ReleaseObject(ref _pNative); - - _pNative = RootSystem.IntPtr.Zero; - } - - - // Public Properties - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern long Windows_Kinect_BodyIndexFrameReference_get_RelativeTime(RootSystem.IntPtr pNative); - public RootSystem.TimeSpan RelativeTime - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("BodyIndexFrameReference"); - } - - return RootSystem.TimeSpan.FromMilliseconds(Windows_Kinect_BodyIndexFrameReference_get_RelativeTime(_pNative)); - } - } - - - // Public Methods - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern RootSystem.IntPtr Windows_Kinect_BodyIndexFrameReference_AcquireFrame(RootSystem.IntPtr pNative); - public Windows.Kinect.BodyIndexFrame AcquireFrame() - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("BodyIndexFrameReference"); - } - - RootSystem.IntPtr objectPointer = Windows_Kinect_BodyIndexFrameReference_AcquireFrame(_pNative); - Helper.ExceptionHelper.CheckLastError(); - if (objectPointer == RootSystem.IntPtr.Zero) - { - return null; - } - - return Helper.NativeObjectCache.CreateOrGetObject(objectPointer, n => new Windows.Kinect.BodyIndexFrame(n)); - } - - private void __EventCleanup() - { - } - } - -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/BodyIndexFrameReference.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/BodyIndexFrameReference.cs.meta deleted file mode 100644 index 7ae48af..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/BodyIndexFrameReference.cs.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 3ee08767e1297454a93a5759b975860d -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/BodyIndexFrameSource.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/BodyIndexFrameSource.cs deleted file mode 100644 index e6747ad..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/BodyIndexFrameSource.cs +++ /dev/null @@ -1,289 +0,0 @@ -using RootSystem = System; -using System.Linq; -using System.Collections.Generic; -namespace Windows.Kinect -{ - // - // Windows.Kinect.BodyIndexFrameSource - // - public sealed partial class BodyIndexFrameSource : Helper.INativeWrapper - - { - internal RootSystem.IntPtr _pNative; - RootSystem.IntPtr Helper.INativeWrapper.nativePtr { get { return _pNative; } } - - // Constructors and Finalizers - internal BodyIndexFrameSource(RootSystem.IntPtr pNative) - { - _pNative = pNative; - Windows_Kinect_BodyIndexFrameSource_AddRefObject(ref _pNative); - } - - ~BodyIndexFrameSource() - { - Dispose(false); - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_BodyIndexFrameSource_ReleaseObject(ref RootSystem.IntPtr pNative); - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_BodyIndexFrameSource_AddRefObject(ref RootSystem.IntPtr pNative); - private void Dispose(bool disposing) - { - if (_pNative == RootSystem.IntPtr.Zero) - { - return; - } - - __EventCleanup(); - - Helper.NativeObjectCache.RemoveObject(_pNative); - Windows_Kinect_BodyIndexFrameSource_ReleaseObject(ref _pNative); - - _pNative = RootSystem.IntPtr.Zero; - } - - - // Public Properties - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern RootSystem.IntPtr Windows_Kinect_BodyIndexFrameSource_get_FrameDescription(RootSystem.IntPtr pNative); - public Windows.Kinect.FrameDescription FrameDescription - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("BodyIndexFrameSource"); - } - - RootSystem.IntPtr objectPointer = Windows_Kinect_BodyIndexFrameSource_get_FrameDescription(_pNative); - Helper.ExceptionHelper.CheckLastError(); - if (objectPointer == RootSystem.IntPtr.Zero) - { - return null; - } - - return Helper.NativeObjectCache.CreateOrGetObject(objectPointer, n => new Windows.Kinect.FrameDescription(n)); - } - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern bool Windows_Kinect_BodyIndexFrameSource_get_IsActive(RootSystem.IntPtr pNative); - public bool IsActive - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("BodyIndexFrameSource"); - } - - return Windows_Kinect_BodyIndexFrameSource_get_IsActive(_pNative); - } - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern RootSystem.IntPtr Windows_Kinect_BodyIndexFrameSource_get_KinectSensor(RootSystem.IntPtr pNative); - public Windows.Kinect.KinectSensor KinectSensor - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("BodyIndexFrameSource"); - } - - RootSystem.IntPtr objectPointer = Windows_Kinect_BodyIndexFrameSource_get_KinectSensor(_pNative); - Helper.ExceptionHelper.CheckLastError(); - if (objectPointer == RootSystem.IntPtr.Zero) - { - return null; - } - - return Helper.NativeObjectCache.CreateOrGetObject(objectPointer, n => new Windows.Kinect.KinectSensor(n)); - } - } - - - // Events - private static RootSystem.Runtime.InteropServices.GCHandle _Windows_Kinect_FrameCapturedEventArgs_Delegate_Handle; - [RootSystem.Runtime.InteropServices.UnmanagedFunctionPointer(RootSystem.Runtime.InteropServices.CallingConvention.Cdecl)] - private delegate void _Windows_Kinect_FrameCapturedEventArgs_Delegate(RootSystem.IntPtr args, RootSystem.IntPtr pNative); - private static Helper.CollectionMap>> Windows_Kinect_FrameCapturedEventArgs_Delegate_callbacks = new Helper.CollectionMap>>(); - [AOT.MonoPInvokeCallbackAttribute(typeof(_Windows_Kinect_FrameCapturedEventArgs_Delegate))] - private static void Windows_Kinect_FrameCapturedEventArgs_Delegate_Handler(RootSystem.IntPtr result, RootSystem.IntPtr pNative) - { - List> callbackList = null; - Windows_Kinect_FrameCapturedEventArgs_Delegate_callbacks.TryGetValue(pNative, out callbackList); - lock(callbackList) - { - var objThis = Helper.NativeObjectCache.GetObject(pNative); - var args = new Windows.Kinect.FrameCapturedEventArgs(result); - foreach(var func in callbackList) - { - Helper.EventPump.Instance.Enqueue(() => { try { func(objThis, args); } catch { } }); - } - } - } - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_BodyIndexFrameSource_add_FrameCaptured(RootSystem.IntPtr pNative, _Windows_Kinect_FrameCapturedEventArgs_Delegate eventCallback, bool unsubscribe); - public event RootSystem.EventHandler FrameCaptured - { - add - { - Helper.EventPump.EnsureInitialized(); - - Windows_Kinect_FrameCapturedEventArgs_Delegate_callbacks.TryAddDefault(_pNative); - var callbackList = Windows_Kinect_FrameCapturedEventArgs_Delegate_callbacks[_pNative]; - lock (callbackList) - { - callbackList.Add(value); - if(callbackList.Count == 1) - { - var del = new _Windows_Kinect_FrameCapturedEventArgs_Delegate(Windows_Kinect_FrameCapturedEventArgs_Delegate_Handler); - _Windows_Kinect_FrameCapturedEventArgs_Delegate_Handle = RootSystem.Runtime.InteropServices.GCHandle.Alloc(del); - Windows_Kinect_BodyIndexFrameSource_add_FrameCaptured(_pNative, del, false); - } - } - } - remove - { - if (_pNative == RootSystem.IntPtr.Zero) - { - return; - } - - Windows_Kinect_FrameCapturedEventArgs_Delegate_callbacks.TryAddDefault(_pNative); - var callbackList = Windows_Kinect_FrameCapturedEventArgs_Delegate_callbacks[_pNative]; - lock (callbackList) - { - callbackList.Remove(value); - if(callbackList.Count == 0) - { - Windows_Kinect_BodyIndexFrameSource_add_FrameCaptured(_pNative, Windows_Kinect_FrameCapturedEventArgs_Delegate_Handler, true); - _Windows_Kinect_FrameCapturedEventArgs_Delegate_Handle.Free(); - } - } - } - } - - private static RootSystem.Runtime.InteropServices.GCHandle _Windows_Data_PropertyChangedEventArgs_Delegate_Handle; - [RootSystem.Runtime.InteropServices.UnmanagedFunctionPointer(RootSystem.Runtime.InteropServices.CallingConvention.Cdecl)] - private delegate void _Windows_Data_PropertyChangedEventArgs_Delegate(RootSystem.IntPtr args, RootSystem.IntPtr pNative); - private static Helper.CollectionMap>> Windows_Data_PropertyChangedEventArgs_Delegate_callbacks = new Helper.CollectionMap>>(); - [AOT.MonoPInvokeCallbackAttribute(typeof(_Windows_Data_PropertyChangedEventArgs_Delegate))] - private static void Windows_Data_PropertyChangedEventArgs_Delegate_Handler(RootSystem.IntPtr result, RootSystem.IntPtr pNative) - { - List> callbackList = null; - Windows_Data_PropertyChangedEventArgs_Delegate_callbacks.TryGetValue(pNative, out callbackList); - lock(callbackList) - { - var objThis = Helper.NativeObjectCache.GetObject(pNative); - var args = new Windows.Data.PropertyChangedEventArgs(result); - foreach(var func in callbackList) - { - Helper.EventPump.Instance.Enqueue(() => { try { func(objThis, args); } catch { } }); - } - } - } - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_BodyIndexFrameSource_add_PropertyChanged(RootSystem.IntPtr pNative, _Windows_Data_PropertyChangedEventArgs_Delegate eventCallback, bool unsubscribe); - public event RootSystem.EventHandler PropertyChanged - { - add - { - Helper.EventPump.EnsureInitialized(); - - Windows_Data_PropertyChangedEventArgs_Delegate_callbacks.TryAddDefault(_pNative); - var callbackList = Windows_Data_PropertyChangedEventArgs_Delegate_callbacks[_pNative]; - lock (callbackList) - { - callbackList.Add(value); - if(callbackList.Count == 1) - { - var del = new _Windows_Data_PropertyChangedEventArgs_Delegate(Windows_Data_PropertyChangedEventArgs_Delegate_Handler); - _Windows_Data_PropertyChangedEventArgs_Delegate_Handle = RootSystem.Runtime.InteropServices.GCHandle.Alloc(del); - Windows_Kinect_BodyIndexFrameSource_add_PropertyChanged(_pNative, del, false); - } - } - } - remove - { - if (_pNative == RootSystem.IntPtr.Zero) - { - return; - } - - Windows_Data_PropertyChangedEventArgs_Delegate_callbacks.TryAddDefault(_pNative); - var callbackList = Windows_Data_PropertyChangedEventArgs_Delegate_callbacks[_pNative]; - lock (callbackList) - { - callbackList.Remove(value); - if(callbackList.Count == 0) - { - Windows_Kinect_BodyIndexFrameSource_add_PropertyChanged(_pNative, Windows_Data_PropertyChangedEventArgs_Delegate_Handler, true); - _Windows_Data_PropertyChangedEventArgs_Delegate_Handle.Free(); - } - } - } - } - - - // Public Methods - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern RootSystem.IntPtr Windows_Kinect_BodyIndexFrameSource_OpenReader(RootSystem.IntPtr pNative); - public Windows.Kinect.BodyIndexFrameReader OpenReader() - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("BodyIndexFrameSource"); - } - - RootSystem.IntPtr objectPointer = Windows_Kinect_BodyIndexFrameSource_OpenReader(_pNative); - Helper.ExceptionHelper.CheckLastError(); - if (objectPointer == RootSystem.IntPtr.Zero) - { - return null; - } - - return Helper.NativeObjectCache.CreateOrGetObject(objectPointer, n => new Windows.Kinect.BodyIndexFrameReader(n)); - } - - private void __EventCleanup() - { - { - Windows_Kinect_FrameCapturedEventArgs_Delegate_callbacks.TryAddDefault(_pNative); - var callbackList = Windows_Kinect_FrameCapturedEventArgs_Delegate_callbacks[_pNative]; - lock (callbackList) - { - if (callbackList.Count > 0) - { - callbackList.Clear(); - if (_pNative != RootSystem.IntPtr.Zero) - { - Windows_Kinect_BodyIndexFrameSource_add_FrameCaptured(_pNative, Windows_Kinect_FrameCapturedEventArgs_Delegate_Handler, true); - } - _Windows_Kinect_FrameCapturedEventArgs_Delegate_Handle.Free(); - } - } - } - { - Windows_Data_PropertyChangedEventArgs_Delegate_callbacks.TryAddDefault(_pNative); - var callbackList = Windows_Data_PropertyChangedEventArgs_Delegate_callbacks[_pNative]; - lock (callbackList) - { - if (callbackList.Count > 0) - { - callbackList.Clear(); - if (_pNative != RootSystem.IntPtr.Zero) - { - Windows_Kinect_BodyIndexFrameSource_add_PropertyChanged(_pNative, Windows_Data_PropertyChangedEventArgs_Delegate_Handler, true); - } - _Windows_Data_PropertyChangedEventArgs_Delegate_Handle.Free(); - } - } - } - } - } - -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/BodyIndexFrameSource.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/BodyIndexFrameSource.cs.meta deleted file mode 100644 index d0b7ed9..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/BodyIndexFrameSource.cs.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 7568d115ed2fcca4ba26af8d7e3252c6 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/CameraIntrinsics.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/CameraIntrinsics.cs deleted file mode 100644 index 3add3d3..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/CameraIntrinsics.cs +++ /dev/null @@ -1,58 +0,0 @@ -using RootSystem = System; -using System.Linq; -using System.Collections.Generic; -namespace Windows.Kinect -{ - // - // Windows.Kinect.CameraIntrinsics - // - [RootSystem.Runtime.InteropServices.StructLayout(RootSystem.Runtime.InteropServices.LayoutKind.Sequential)] - public struct CameraIntrinsics - { - public float FocalLengthX { get; set; } - public float FocalLengthY { get; set; } - public float PrincipalPointX { get; set; } - public float PrincipalPointY { get; set; } - public float RadialDistortionSecondOrder { get; set; } - public float RadialDistortionFourthOrder { get; set; } - public float RadialDistortionSixthOrder { get; set; } - - public override int GetHashCode() - { - return FocalLengthX.GetHashCode() ^ FocalLengthY.GetHashCode() ^ - PrincipalPointX.GetHashCode() ^ PrincipalPointY.GetHashCode() ^ - RadialDistortionSecondOrder.GetHashCode() ^ RadialDistortionFourthOrder.GetHashCode() ^ - RadialDistortionSixthOrder.GetHashCode(); - } - - public override bool Equals(object obj) - { - if (!(obj is CameraIntrinsics)) - { - return false; - } - - return this.Equals((CameraIntrinsics)obj); - } - - public bool Equals(CameraIntrinsics obj) - { - return FocalLengthX.Equals(obj.FocalLengthX) && FocalLengthY.Equals(obj.FocalLengthY) && - PrincipalPointX.Equals(obj.PrincipalPointX) && PrincipalPointY.Equals(obj.PrincipalPointY) && - RadialDistortionSecondOrder.Equals(obj.RadialDistortionSecondOrder) && - RadialDistortionFourthOrder.Equals(obj.RadialDistortionFourthOrder) && - RadialDistortionSixthOrder.Equals(obj.RadialDistortionSixthOrder); - } - - public static bool operator ==(CameraIntrinsics a, CameraIntrinsics b) - { - return a.Equals(b); - } - - public static bool operator !=(CameraIntrinsics a, CameraIntrinsics b) - { - return !(a.Equals(b)); - } - } - -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/CameraIntrinsics.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/CameraIntrinsics.cs.meta deleted file mode 100644 index 830faec..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/CameraIntrinsics.cs.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: bc11ab9581163ba44b721acb44ce8763 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/CameraSpacePoint.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/CameraSpacePoint.cs deleted file mode 100644 index 16818a0..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/CameraSpacePoint.cs +++ /dev/null @@ -1,47 +0,0 @@ -using RootSystem = System; -using System.Linq; -using System.Collections.Generic; -namespace Windows.Kinect -{ - // - // Windows.Kinect.CameraSpacePoint - // - [RootSystem.Runtime.InteropServices.StructLayout(RootSystem.Runtime.InteropServices.LayoutKind.Sequential)] - public struct CameraSpacePoint - { - public float X { get; set; } - public float Y { get; set; } - public float Z { get; set; } - - public override int GetHashCode() - { - return X.GetHashCode() ^ Y.GetHashCode() ^ Z.GetHashCode(); - } - - public override bool Equals(object obj) - { - if (!(obj is CameraSpacePoint)) - { - return false; - } - - return this.Equals((CameraSpacePoint)obj); - } - - public bool Equals(CameraSpacePoint obj) - { - return X.Equals(obj.X) && Y.Equals(obj.Y) && Z.Equals(obj.Z); - } - - public static bool operator ==(CameraSpacePoint a, CameraSpacePoint b) - { - return a.Equals(b); - } - - public static bool operator !=(CameraSpacePoint a, CameraSpacePoint b) - { - return !(a.Equals(b)); - } - } - -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/CameraSpacePoint.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/CameraSpacePoint.cs.meta deleted file mode 100644 index ede69a0..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/CameraSpacePoint.cs.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: ef37675a811881f44be680e69695e9e3 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/CollectionMap.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/CollectionMap.cs deleted file mode 100644 index e730778..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/CollectionMap.cs +++ /dev/null @@ -1,26 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace Helper -{ - class CollectionMap : Helper.ThreadSafeDictionary where TValue : new() - { - public bool TryAddDefault(TKey key) - { - lock (_impl) - { - if (!_impl.ContainsKey(key)) - { - _impl.Add(key, new TValue()); - return true; - } - else - { - return false; - } - } - } - } -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/CollectionMap.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/CollectionMap.cs.meta deleted file mode 100644 index 6859795..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/CollectionMap.cs.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: b404867256ddca245871a9152fd54294 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/ColorCameraSettings.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/ColorCameraSettings.cs deleted file mode 100644 index 4d248a9..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/ColorCameraSettings.cs +++ /dev/null @@ -1,113 +0,0 @@ -using RootSystem = System; -using System.Linq; -using System.Collections.Generic; -namespace Windows.Kinect -{ - // - // Windows.Kinect.ColorCameraSettings - // - public sealed partial class ColorCameraSettings : Helper.INativeWrapper - - { - internal RootSystem.IntPtr _pNative; - RootSystem.IntPtr Helper.INativeWrapper.nativePtr { get { return _pNative; } } - - // Constructors and Finalizers - internal ColorCameraSettings(RootSystem.IntPtr pNative) - { - _pNative = pNative; - Windows_Kinect_ColorCameraSettings_AddRefObject(ref _pNative); - } - - ~ColorCameraSettings() - { - Dispose(false); - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_ColorCameraSettings_ReleaseObject(ref RootSystem.IntPtr pNative); - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_ColorCameraSettings_AddRefObject(ref RootSystem.IntPtr pNative); - private void Dispose(bool disposing) - { - if (_pNative == RootSystem.IntPtr.Zero) - { - return; - } - - __EventCleanup(); - - Helper.NativeObjectCache.RemoveObject(_pNative); - Windows_Kinect_ColorCameraSettings_ReleaseObject(ref _pNative); - - _pNative = RootSystem.IntPtr.Zero; - } - - - // Public Properties - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern long Windows_Kinect_ColorCameraSettings_get_ExposureTime(RootSystem.IntPtr pNative); - public RootSystem.TimeSpan ExposureTime - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("ColorCameraSettings"); - } - - return RootSystem.TimeSpan.FromMilliseconds(Windows_Kinect_ColorCameraSettings_get_ExposureTime(_pNative)); - } - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern long Windows_Kinect_ColorCameraSettings_get_FrameInterval(RootSystem.IntPtr pNative); - public RootSystem.TimeSpan FrameInterval - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("ColorCameraSettings"); - } - - return RootSystem.TimeSpan.FromMilliseconds(Windows_Kinect_ColorCameraSettings_get_FrameInterval(_pNative)); - } - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern float Windows_Kinect_ColorCameraSettings_get_Gain(RootSystem.IntPtr pNative); - public float Gain - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("ColorCameraSettings"); - } - - return Windows_Kinect_ColorCameraSettings_get_Gain(_pNative); - } - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern float Windows_Kinect_ColorCameraSettings_get_Gamma(RootSystem.IntPtr pNative); - public float Gamma - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("ColorCameraSettings"); - } - - return Windows_Kinect_ColorCameraSettings_get_Gamma(_pNative); - } - } - - private void __EventCleanup() - { - } - } - -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/ColorCameraSettings.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/ColorCameraSettings.cs.meta deleted file mode 100644 index 68f467e..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/ColorCameraSettings.cs.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 1f199f6bb5e11b941b4c707a6783daaa -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/ColorFrame.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/ColorFrame.cs deleted file mode 100644 index 9f3a6dd..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/ColorFrame.cs +++ /dev/null @@ -1,218 +0,0 @@ -using RootSystem = System; -using System.Linq; -using System.Collections.Generic; -namespace Windows.Kinect -{ - // - // Windows.Kinect.ColorFrame - // - public sealed partial class ColorFrame : RootSystem.IDisposable, Helper.INativeWrapper - - { - internal RootSystem.IntPtr _pNative; - RootSystem.IntPtr Helper.INativeWrapper.nativePtr { get { return _pNative; } } - - // Constructors and Finalizers - internal ColorFrame(RootSystem.IntPtr pNative) - { - _pNative = pNative; - Windows_Kinect_ColorFrame_AddRefObject(ref _pNative); - } - - ~ColorFrame() - { - Dispose(false); - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_ColorFrame_ReleaseObject(ref RootSystem.IntPtr pNative); - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_ColorFrame_AddRefObject(ref RootSystem.IntPtr pNative); - private void Dispose(bool disposing) - { - if (_pNative == RootSystem.IntPtr.Zero) - { - return; - } - - __EventCleanup(); - - Helper.NativeObjectCache.RemoveObject(_pNative); - - if (disposing) - { - Windows_Kinect_ColorFrame_Dispose(_pNative); - } - Windows_Kinect_ColorFrame_ReleaseObject(ref _pNative); - - _pNative = RootSystem.IntPtr.Zero; - } - - - // Public Properties - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern RootSystem.IntPtr Windows_Kinect_ColorFrame_get_ColorCameraSettings(RootSystem.IntPtr pNative); - public Windows.Kinect.ColorCameraSettings ColorCameraSettings - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("ColorFrame"); - } - - RootSystem.IntPtr objectPointer = Windows_Kinect_ColorFrame_get_ColorCameraSettings(_pNative); - Helper.ExceptionHelper.CheckLastError(); - if (objectPointer == RootSystem.IntPtr.Zero) - { - return null; - } - - return Helper.NativeObjectCache.CreateOrGetObject(objectPointer, n => new Windows.Kinect.ColorCameraSettings(n)); - } - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern RootSystem.IntPtr Windows_Kinect_ColorFrame_get_ColorFrameSource(RootSystem.IntPtr pNative); - public Windows.Kinect.ColorFrameSource ColorFrameSource - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("ColorFrame"); - } - - RootSystem.IntPtr objectPointer = Windows_Kinect_ColorFrame_get_ColorFrameSource(_pNative); - Helper.ExceptionHelper.CheckLastError(); - if (objectPointer == RootSystem.IntPtr.Zero) - { - return null; - } - - return Helper.NativeObjectCache.CreateOrGetObject(objectPointer, n => new Windows.Kinect.ColorFrameSource(n)); - } - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern RootSystem.IntPtr Windows_Kinect_ColorFrame_get_FrameDescription(RootSystem.IntPtr pNative); - public Windows.Kinect.FrameDescription FrameDescription - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("ColorFrame"); - } - - RootSystem.IntPtr objectPointer = Windows_Kinect_ColorFrame_get_FrameDescription(_pNative); - Helper.ExceptionHelper.CheckLastError(); - if (objectPointer == RootSystem.IntPtr.Zero) - { - return null; - } - - return Helper.NativeObjectCache.CreateOrGetObject(objectPointer, n => new Windows.Kinect.FrameDescription(n)); - } - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern Windows.Kinect.ColorImageFormat Windows_Kinect_ColorFrame_get_RawColorImageFormat(RootSystem.IntPtr pNative); - public Windows.Kinect.ColorImageFormat RawColorImageFormat - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("ColorFrame"); - } - - return Windows_Kinect_ColorFrame_get_RawColorImageFormat(_pNative); - } - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern long Windows_Kinect_ColorFrame_get_RelativeTime(RootSystem.IntPtr pNative); - public RootSystem.TimeSpan RelativeTime - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("ColorFrame"); - } - - return RootSystem.TimeSpan.FromMilliseconds(Windows_Kinect_ColorFrame_get_RelativeTime(_pNative)); - } - } - - - // Public Methods - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_ColorFrame_CopyRawFrameDataToArray(RootSystem.IntPtr pNative, RootSystem.IntPtr frameData, int frameDataSize); - public void CopyRawFrameDataToArray(byte[] frameData) - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("ColorFrame"); - } - - var frameDataSmartGCHandle = new Helper.SmartGCHandle(RootSystem.Runtime.InteropServices.GCHandle.Alloc(frameData, RootSystem.Runtime.InteropServices.GCHandleType.Pinned)); - var _frameData = frameDataSmartGCHandle.AddrOfPinnedObject(); - Windows_Kinect_ColorFrame_CopyRawFrameDataToArray(_pNative, _frameData, frameData.Length); - Helper.ExceptionHelper.CheckLastError(); - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_ColorFrame_CopyConvertedFrameDataToArray(RootSystem.IntPtr pNative, RootSystem.IntPtr frameData, int frameDataSize, Windows.Kinect.ColorImageFormat colorFormat); - public void CopyConvertedFrameDataToArray(byte[] frameData, Windows.Kinect.ColorImageFormat colorFormat) - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("ColorFrame"); - } - - var frameDataSmartGCHandle = new Helper.SmartGCHandle(RootSystem.Runtime.InteropServices.GCHandle.Alloc(frameData, RootSystem.Runtime.InteropServices.GCHandleType.Pinned)); - var _frameData = frameDataSmartGCHandle.AddrOfPinnedObject(); - Windows_Kinect_ColorFrame_CopyConvertedFrameDataToArray(_pNative, _frameData, frameData.Length, colorFormat); - Helper.ExceptionHelper.CheckLastError(); - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern RootSystem.IntPtr Windows_Kinect_ColorFrame_CreateFrameDescription(RootSystem.IntPtr pNative, Windows.Kinect.ColorImageFormat format); - public Windows.Kinect.FrameDescription CreateFrameDescription(Windows.Kinect.ColorImageFormat format) - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("ColorFrame"); - } - - RootSystem.IntPtr objectPointer = Windows_Kinect_ColorFrame_CreateFrameDescription(_pNative, format); - Helper.ExceptionHelper.CheckLastError(); - if (objectPointer == RootSystem.IntPtr.Zero) - { - return null; - } - - return Helper.NativeObjectCache.CreateOrGetObject(objectPointer, n => new Windows.Kinect.FrameDescription(n)); - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_ColorFrame_Dispose(RootSystem.IntPtr pNative); - public void Dispose() - { - if (_pNative == RootSystem.IntPtr.Zero) - { - return; - } - - Dispose(true); - RootSystem.GC.SuppressFinalize(this); - } - - private void __EventCleanup() - { - } - } - -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/ColorFrame.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/ColorFrame.cs.meta deleted file mode 100644 index 2a35329..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/ColorFrame.cs.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 4e3ef938a829c1d4385d938971be0b73 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/ColorFrameArrivedEventArgs.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/ColorFrameArrivedEventArgs.cs deleted file mode 100644 index c0481d9..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/ColorFrameArrivedEventArgs.cs +++ /dev/null @@ -1,75 +0,0 @@ -using RootSystem = System; -using System.Linq; -using System.Collections.Generic; -namespace Windows.Kinect -{ - // - // Windows.Kinect.ColorFrameArrivedEventArgs - // - public sealed partial class ColorFrameArrivedEventArgs : RootSystem.EventArgs, Helper.INativeWrapper - - { - internal RootSystem.IntPtr _pNative; - RootSystem.IntPtr Helper.INativeWrapper.nativePtr { get { return _pNative; } } - - // Constructors and Finalizers - internal ColorFrameArrivedEventArgs(RootSystem.IntPtr pNative) - { - _pNative = pNative; - Windows_Kinect_ColorFrameArrivedEventArgs_AddRefObject(ref _pNative); - } - - ~ColorFrameArrivedEventArgs() - { - Dispose(false); - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_ColorFrameArrivedEventArgs_ReleaseObject(ref RootSystem.IntPtr pNative); - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_ColorFrameArrivedEventArgs_AddRefObject(ref RootSystem.IntPtr pNative); - private void Dispose(bool disposing) - { - if (_pNative == RootSystem.IntPtr.Zero) - { - return; - } - - __EventCleanup(); - - Helper.NativeObjectCache.RemoveObject(_pNative); - Windows_Kinect_ColorFrameArrivedEventArgs_ReleaseObject(ref _pNative); - - _pNative = RootSystem.IntPtr.Zero; - } - - - // Public Properties - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern RootSystem.IntPtr Windows_Kinect_ColorFrameArrivedEventArgs_get_FrameReference(RootSystem.IntPtr pNative); - public Windows.Kinect.ColorFrameReference FrameReference - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("ColorFrameArrivedEventArgs"); - } - - RootSystem.IntPtr objectPointer = Windows_Kinect_ColorFrameArrivedEventArgs_get_FrameReference(_pNative); - Helper.ExceptionHelper.CheckLastError(); - if (objectPointer == RootSystem.IntPtr.Zero) - { - return null; - } - - return Helper.NativeObjectCache.CreateOrGetObject(objectPointer, n => new Windows.Kinect.ColorFrameReference(n)); - } - } - - private void __EventCleanup() - { - } - } - -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/ColorFrameArrivedEventArgs.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/ColorFrameArrivedEventArgs.cs.meta deleted file mode 100644 index 4e92e1d..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/ColorFrameArrivedEventArgs.cs.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 383ab6b5e32edbc4ca3eca80db481330 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/ColorFrameReader.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/ColorFrameReader.cs deleted file mode 100644 index 5e6ab54..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/ColorFrameReader.cs +++ /dev/null @@ -1,297 +0,0 @@ -using RootSystem = System; -using System.Linq; -using System.Collections.Generic; -namespace Windows.Kinect -{ - // - // Windows.Kinect.ColorFrameReader - // - public sealed partial class ColorFrameReader : RootSystem.IDisposable, Helper.INativeWrapper - - { - internal RootSystem.IntPtr _pNative; - RootSystem.IntPtr Helper.INativeWrapper.nativePtr { get { return _pNative; } } - - // Constructors and Finalizers - internal ColorFrameReader(RootSystem.IntPtr pNative) - { - _pNative = pNative; - Windows_Kinect_ColorFrameReader_AddRefObject(ref _pNative); - } - - ~ColorFrameReader() - { - Dispose(false); - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_ColorFrameReader_ReleaseObject(ref RootSystem.IntPtr pNative); - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_ColorFrameReader_AddRefObject(ref RootSystem.IntPtr pNative); - private void Dispose(bool disposing) - { - if (_pNative == RootSystem.IntPtr.Zero) - { - return; - } - - __EventCleanup(); - - Helper.NativeObjectCache.RemoveObject(_pNative); - - if (disposing) - { - Windows_Kinect_ColorFrameReader_Dispose(_pNative); - } - Windows_Kinect_ColorFrameReader_ReleaseObject(ref _pNative); - - _pNative = RootSystem.IntPtr.Zero; - } - - - // Public Properties - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern RootSystem.IntPtr Windows_Kinect_ColorFrameReader_get_ColorFrameSource(RootSystem.IntPtr pNative); - public Windows.Kinect.ColorFrameSource ColorFrameSource - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("ColorFrameReader"); - } - - RootSystem.IntPtr objectPointer = Windows_Kinect_ColorFrameReader_get_ColorFrameSource(_pNative); - Helper.ExceptionHelper.CheckLastError(); - if (objectPointer == RootSystem.IntPtr.Zero) - { - return null; - } - - return Helper.NativeObjectCache.CreateOrGetObject(objectPointer, n => new Windows.Kinect.ColorFrameSource(n)); - } - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern bool Windows_Kinect_ColorFrameReader_get_IsPaused(RootSystem.IntPtr pNative); - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_ColorFrameReader_put_IsPaused(RootSystem.IntPtr pNative, bool isPaused); - public bool IsPaused - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("ColorFrameReader"); - } - - return Windows_Kinect_ColorFrameReader_get_IsPaused(_pNative); - } - set - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("ColorFrameReader"); - } - - Windows_Kinect_ColorFrameReader_put_IsPaused(_pNative, value); - Helper.ExceptionHelper.CheckLastError(); - } - } - - - // Events - private static RootSystem.Runtime.InteropServices.GCHandle _Windows_Kinect_ColorFrameArrivedEventArgs_Delegate_Handle; - [RootSystem.Runtime.InteropServices.UnmanagedFunctionPointer(RootSystem.Runtime.InteropServices.CallingConvention.Cdecl)] - private delegate void _Windows_Kinect_ColorFrameArrivedEventArgs_Delegate(RootSystem.IntPtr args, RootSystem.IntPtr pNative); - private static Helper.CollectionMap>> Windows_Kinect_ColorFrameArrivedEventArgs_Delegate_callbacks = new Helper.CollectionMap>>(); - [AOT.MonoPInvokeCallbackAttribute(typeof(_Windows_Kinect_ColorFrameArrivedEventArgs_Delegate))] - private static void Windows_Kinect_ColorFrameArrivedEventArgs_Delegate_Handler(RootSystem.IntPtr result, RootSystem.IntPtr pNative) - { - List> callbackList = null; - Windows_Kinect_ColorFrameArrivedEventArgs_Delegate_callbacks.TryGetValue(pNative, out callbackList); - lock(callbackList) - { - var objThis = Helper.NativeObjectCache.GetObject(pNative); - var args = new Windows.Kinect.ColorFrameArrivedEventArgs(result); - foreach(var func in callbackList) - { - Helper.EventPump.Instance.Enqueue(() => { try { func(objThis, args); } catch { } }); - } - } - } - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_ColorFrameReader_add_FrameArrived(RootSystem.IntPtr pNative, _Windows_Kinect_ColorFrameArrivedEventArgs_Delegate eventCallback, bool unsubscribe); - public event RootSystem.EventHandler FrameArrived - { - add - { - Helper.EventPump.EnsureInitialized(); - - Windows_Kinect_ColorFrameArrivedEventArgs_Delegate_callbacks.TryAddDefault(_pNative); - var callbackList = Windows_Kinect_ColorFrameArrivedEventArgs_Delegate_callbacks[_pNative]; - lock (callbackList) - { - callbackList.Add(value); - if(callbackList.Count == 1) - { - var del = new _Windows_Kinect_ColorFrameArrivedEventArgs_Delegate(Windows_Kinect_ColorFrameArrivedEventArgs_Delegate_Handler); - _Windows_Kinect_ColorFrameArrivedEventArgs_Delegate_Handle = RootSystem.Runtime.InteropServices.GCHandle.Alloc(del); - Windows_Kinect_ColorFrameReader_add_FrameArrived(_pNative, del, false); - } - } - } - remove - { - if (_pNative == RootSystem.IntPtr.Zero) - { - return; - } - - Windows_Kinect_ColorFrameArrivedEventArgs_Delegate_callbacks.TryAddDefault(_pNative); - var callbackList = Windows_Kinect_ColorFrameArrivedEventArgs_Delegate_callbacks[_pNative]; - lock (callbackList) - { - callbackList.Remove(value); - if(callbackList.Count == 0) - { - Windows_Kinect_ColorFrameReader_add_FrameArrived(_pNative, Windows_Kinect_ColorFrameArrivedEventArgs_Delegate_Handler, true); - _Windows_Kinect_ColorFrameArrivedEventArgs_Delegate_Handle.Free(); - } - } - } - } - - private static RootSystem.Runtime.InteropServices.GCHandle _Windows_Data_PropertyChangedEventArgs_Delegate_Handle; - [RootSystem.Runtime.InteropServices.UnmanagedFunctionPointer(RootSystem.Runtime.InteropServices.CallingConvention.Cdecl)] - private delegate void _Windows_Data_PropertyChangedEventArgs_Delegate(RootSystem.IntPtr args, RootSystem.IntPtr pNative); - private static Helper.CollectionMap>> Windows_Data_PropertyChangedEventArgs_Delegate_callbacks = new Helper.CollectionMap>>(); - [AOT.MonoPInvokeCallbackAttribute(typeof(_Windows_Data_PropertyChangedEventArgs_Delegate))] - private static void Windows_Data_PropertyChangedEventArgs_Delegate_Handler(RootSystem.IntPtr result, RootSystem.IntPtr pNative) - { - List> callbackList = null; - Windows_Data_PropertyChangedEventArgs_Delegate_callbacks.TryGetValue(pNative, out callbackList); - lock(callbackList) - { - var objThis = Helper.NativeObjectCache.GetObject(pNative); - var args = new Windows.Data.PropertyChangedEventArgs(result); - foreach(var func in callbackList) - { - Helper.EventPump.Instance.Enqueue(() => { try { func(objThis, args); } catch { } }); - } - } - } - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_ColorFrameReader_add_PropertyChanged(RootSystem.IntPtr pNative, _Windows_Data_PropertyChangedEventArgs_Delegate eventCallback, bool unsubscribe); - public event RootSystem.EventHandler PropertyChanged - { - add - { - Helper.EventPump.EnsureInitialized(); - - Windows_Data_PropertyChangedEventArgs_Delegate_callbacks.TryAddDefault(_pNative); - var callbackList = Windows_Data_PropertyChangedEventArgs_Delegate_callbacks[_pNative]; - lock (callbackList) - { - callbackList.Add(value); - if(callbackList.Count == 1) - { - var del = new _Windows_Data_PropertyChangedEventArgs_Delegate(Windows_Data_PropertyChangedEventArgs_Delegate_Handler); - _Windows_Data_PropertyChangedEventArgs_Delegate_Handle = RootSystem.Runtime.InteropServices.GCHandle.Alloc(del); - Windows_Kinect_ColorFrameReader_add_PropertyChanged(_pNative, del, false); - } - } - } - remove - { - if (_pNative == RootSystem.IntPtr.Zero) - { - return; - } - - Windows_Data_PropertyChangedEventArgs_Delegate_callbacks.TryAddDefault(_pNative); - var callbackList = Windows_Data_PropertyChangedEventArgs_Delegate_callbacks[_pNative]; - lock (callbackList) - { - callbackList.Remove(value); - if(callbackList.Count == 0) - { - Windows_Kinect_ColorFrameReader_add_PropertyChanged(_pNative, Windows_Data_PropertyChangedEventArgs_Delegate_Handler, true); - _Windows_Data_PropertyChangedEventArgs_Delegate_Handle.Free(); - } - } - } - } - - - // Public Methods - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern RootSystem.IntPtr Windows_Kinect_ColorFrameReader_AcquireLatestFrame(RootSystem.IntPtr pNative); - public Windows.Kinect.ColorFrame AcquireLatestFrame() - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("ColorFrameReader"); - } - - RootSystem.IntPtr objectPointer = Windows_Kinect_ColorFrameReader_AcquireLatestFrame(_pNative); - Helper.ExceptionHelper.CheckLastError(); - if (objectPointer == RootSystem.IntPtr.Zero) - { - return null; - } - - return Helper.NativeObjectCache.CreateOrGetObject(objectPointer, n => new Windows.Kinect.ColorFrame(n)); - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_ColorFrameReader_Dispose(RootSystem.IntPtr pNative); - public void Dispose() - { - if (_pNative == RootSystem.IntPtr.Zero) - { - return; - } - - Dispose(true); - RootSystem.GC.SuppressFinalize(this); - } - - private void __EventCleanup() - { - { - Windows_Kinect_ColorFrameArrivedEventArgs_Delegate_callbacks.TryAddDefault(_pNative); - var callbackList = Windows_Kinect_ColorFrameArrivedEventArgs_Delegate_callbacks[_pNative]; - lock (callbackList) - { - if (callbackList.Count > 0) - { - callbackList.Clear(); - if (_pNative != RootSystem.IntPtr.Zero) - { - Windows_Kinect_ColorFrameReader_add_FrameArrived(_pNative, Windows_Kinect_ColorFrameArrivedEventArgs_Delegate_Handler, true); - } - _Windows_Kinect_ColorFrameArrivedEventArgs_Delegate_Handle.Free(); - } - } - } - { - Windows_Data_PropertyChangedEventArgs_Delegate_callbacks.TryAddDefault(_pNative); - var callbackList = Windows_Data_PropertyChangedEventArgs_Delegate_callbacks[_pNative]; - lock (callbackList) - { - if (callbackList.Count > 0) - { - callbackList.Clear(); - if (_pNative != RootSystem.IntPtr.Zero) - { - Windows_Kinect_ColorFrameReader_add_PropertyChanged(_pNative, Windows_Data_PropertyChangedEventArgs_Delegate_Handler, true); - } - _Windows_Data_PropertyChangedEventArgs_Delegate_Handle.Free(); - } - } - } - } - } - -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/ColorFrameReader.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/ColorFrameReader.cs.meta deleted file mode 100644 index 3d9ef38..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/ColorFrameReader.cs.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 6c8a043d45b0ce641bfe872c2654ec00 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/ColorFrameReference.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/ColorFrameReference.cs deleted file mode 100644 index ccd0b14..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/ColorFrameReference.cs +++ /dev/null @@ -1,89 +0,0 @@ -using RootSystem = System; -using System.Linq; -using System.Collections.Generic; -namespace Windows.Kinect -{ - // - // Windows.Kinect.ColorFrameReference - // - public sealed partial class ColorFrameReference : Helper.INativeWrapper - - { - internal RootSystem.IntPtr _pNative; - RootSystem.IntPtr Helper.INativeWrapper.nativePtr { get { return _pNative; } } - - // Constructors and Finalizers - internal ColorFrameReference(RootSystem.IntPtr pNative) - { - _pNative = pNative; - Windows_Kinect_ColorFrameReference_AddRefObject(ref _pNative); - } - - ~ColorFrameReference() - { - Dispose(false); - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_ColorFrameReference_ReleaseObject(ref RootSystem.IntPtr pNative); - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_ColorFrameReference_AddRefObject(ref RootSystem.IntPtr pNative); - private void Dispose(bool disposing) - { - if (_pNative == RootSystem.IntPtr.Zero) - { - return; - } - - __EventCleanup(); - - Helper.NativeObjectCache.RemoveObject(_pNative); - Windows_Kinect_ColorFrameReference_ReleaseObject(ref _pNative); - - _pNative = RootSystem.IntPtr.Zero; - } - - - // Public Properties - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern long Windows_Kinect_ColorFrameReference_get_RelativeTime(RootSystem.IntPtr pNative); - public RootSystem.TimeSpan RelativeTime - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("ColorFrameReference"); - } - - return RootSystem.TimeSpan.FromMilliseconds(Windows_Kinect_ColorFrameReference_get_RelativeTime(_pNative)); - } - } - - - // Public Methods - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern RootSystem.IntPtr Windows_Kinect_ColorFrameReference_AcquireFrame(RootSystem.IntPtr pNative); - public Windows.Kinect.ColorFrame AcquireFrame() - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("ColorFrameReference"); - } - - RootSystem.IntPtr objectPointer = Windows_Kinect_ColorFrameReference_AcquireFrame(_pNative); - Helper.ExceptionHelper.CheckLastError(); - if (objectPointer == RootSystem.IntPtr.Zero) - { - return null; - } - - return Helper.NativeObjectCache.CreateOrGetObject(objectPointer, n => new Windows.Kinect.ColorFrame(n)); - } - - private void __EventCleanup() - { - } - } - -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/ColorFrameReference.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/ColorFrameReference.cs.meta deleted file mode 100644 index 59e874e..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/ColorFrameReference.cs.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 05fb49d39d96f5a4ea512141fab5cff6 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/ColorFrameSource.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/ColorFrameSource.cs deleted file mode 100644 index 4f4e4ba..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/ColorFrameSource.cs +++ /dev/null @@ -1,308 +0,0 @@ -using RootSystem = System; -using System.Linq; -using System.Collections.Generic; -namespace Windows.Kinect -{ - // - // Windows.Kinect.ColorFrameSource - // - public sealed partial class ColorFrameSource : Helper.INativeWrapper - - { - internal RootSystem.IntPtr _pNative; - RootSystem.IntPtr Helper.INativeWrapper.nativePtr { get { return _pNative; } } - - // Constructors and Finalizers - internal ColorFrameSource(RootSystem.IntPtr pNative) - { - _pNative = pNative; - Windows_Kinect_ColorFrameSource_AddRefObject(ref _pNative); - } - - ~ColorFrameSource() - { - Dispose(false); - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_ColorFrameSource_ReleaseObject(ref RootSystem.IntPtr pNative); - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_ColorFrameSource_AddRefObject(ref RootSystem.IntPtr pNative); - private void Dispose(bool disposing) - { - if (_pNative == RootSystem.IntPtr.Zero) - { - return; - } - - __EventCleanup(); - - Helper.NativeObjectCache.RemoveObject(_pNative); - Windows_Kinect_ColorFrameSource_ReleaseObject(ref _pNative); - - _pNative = RootSystem.IntPtr.Zero; - } - - - // Public Properties - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern RootSystem.IntPtr Windows_Kinect_ColorFrameSource_get_FrameDescription(RootSystem.IntPtr pNative); - public Windows.Kinect.FrameDescription FrameDescription - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("ColorFrameSource"); - } - - RootSystem.IntPtr objectPointer = Windows_Kinect_ColorFrameSource_get_FrameDescription(_pNative); - Helper.ExceptionHelper.CheckLastError(); - if (objectPointer == RootSystem.IntPtr.Zero) - { - return null; - } - - return Helper.NativeObjectCache.CreateOrGetObject(objectPointer, n => new Windows.Kinect.FrameDescription(n)); - } - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern bool Windows_Kinect_ColorFrameSource_get_IsActive(RootSystem.IntPtr pNative); - public bool IsActive - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("ColorFrameSource"); - } - - return Windows_Kinect_ColorFrameSource_get_IsActive(_pNative); - } - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern RootSystem.IntPtr Windows_Kinect_ColorFrameSource_get_KinectSensor(RootSystem.IntPtr pNative); - public Windows.Kinect.KinectSensor KinectSensor - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("ColorFrameSource"); - } - - RootSystem.IntPtr objectPointer = Windows_Kinect_ColorFrameSource_get_KinectSensor(_pNative); - Helper.ExceptionHelper.CheckLastError(); - if (objectPointer == RootSystem.IntPtr.Zero) - { - return null; - } - - return Helper.NativeObjectCache.CreateOrGetObject(objectPointer, n => new Windows.Kinect.KinectSensor(n)); - } - } - - - // Events - private static RootSystem.Runtime.InteropServices.GCHandle _Windows_Kinect_FrameCapturedEventArgs_Delegate_Handle; - [RootSystem.Runtime.InteropServices.UnmanagedFunctionPointer(RootSystem.Runtime.InteropServices.CallingConvention.Cdecl)] - private delegate void _Windows_Kinect_FrameCapturedEventArgs_Delegate(RootSystem.IntPtr args, RootSystem.IntPtr pNative); - private static Helper.CollectionMap>> Windows_Kinect_FrameCapturedEventArgs_Delegate_callbacks = new Helper.CollectionMap>>(); - [AOT.MonoPInvokeCallbackAttribute(typeof(_Windows_Kinect_FrameCapturedEventArgs_Delegate))] - private static void Windows_Kinect_FrameCapturedEventArgs_Delegate_Handler(RootSystem.IntPtr result, RootSystem.IntPtr pNative) - { - List> callbackList = null; - Windows_Kinect_FrameCapturedEventArgs_Delegate_callbacks.TryGetValue(pNative, out callbackList); - lock(callbackList) - { - var objThis = Helper.NativeObjectCache.GetObject(pNative); - var args = new Windows.Kinect.FrameCapturedEventArgs(result); - foreach(var func in callbackList) - { - Helper.EventPump.Instance.Enqueue(() => { try { func(objThis, args); } catch { } }); - } - } - } - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_ColorFrameSource_add_FrameCaptured(RootSystem.IntPtr pNative, _Windows_Kinect_FrameCapturedEventArgs_Delegate eventCallback, bool unsubscribe); - public event RootSystem.EventHandler FrameCaptured - { - add - { - Helper.EventPump.EnsureInitialized(); - - Windows_Kinect_FrameCapturedEventArgs_Delegate_callbacks.TryAddDefault(_pNative); - var callbackList = Windows_Kinect_FrameCapturedEventArgs_Delegate_callbacks[_pNative]; - lock (callbackList) - { - callbackList.Add(value); - if(callbackList.Count == 1) - { - var del = new _Windows_Kinect_FrameCapturedEventArgs_Delegate(Windows_Kinect_FrameCapturedEventArgs_Delegate_Handler); - _Windows_Kinect_FrameCapturedEventArgs_Delegate_Handle = RootSystem.Runtime.InteropServices.GCHandle.Alloc(del); - Windows_Kinect_ColorFrameSource_add_FrameCaptured(_pNative, del, false); - } - } - } - remove - { - if (_pNative == RootSystem.IntPtr.Zero) - { - return; - } - - Windows_Kinect_FrameCapturedEventArgs_Delegate_callbacks.TryAddDefault(_pNative); - var callbackList = Windows_Kinect_FrameCapturedEventArgs_Delegate_callbacks[_pNative]; - lock (callbackList) - { - callbackList.Remove(value); - if(callbackList.Count == 0) - { - Windows_Kinect_ColorFrameSource_add_FrameCaptured(_pNative, Windows_Kinect_FrameCapturedEventArgs_Delegate_Handler, true); - _Windows_Kinect_FrameCapturedEventArgs_Delegate_Handle.Free(); - } - } - } - } - - private static RootSystem.Runtime.InteropServices.GCHandle _Windows_Data_PropertyChangedEventArgs_Delegate_Handle; - [RootSystem.Runtime.InteropServices.UnmanagedFunctionPointer(RootSystem.Runtime.InteropServices.CallingConvention.Cdecl)] - private delegate void _Windows_Data_PropertyChangedEventArgs_Delegate(RootSystem.IntPtr args, RootSystem.IntPtr pNative); - private static Helper.CollectionMap>> Windows_Data_PropertyChangedEventArgs_Delegate_callbacks = new Helper.CollectionMap>>(); - [AOT.MonoPInvokeCallbackAttribute(typeof(_Windows_Data_PropertyChangedEventArgs_Delegate))] - private static void Windows_Data_PropertyChangedEventArgs_Delegate_Handler(RootSystem.IntPtr result, RootSystem.IntPtr pNative) - { - List> callbackList = null; - Windows_Data_PropertyChangedEventArgs_Delegate_callbacks.TryGetValue(pNative, out callbackList); - lock(callbackList) - { - var objThis = Helper.NativeObjectCache.GetObject(pNative); - var args = new Windows.Data.PropertyChangedEventArgs(result); - foreach(var func in callbackList) - { - Helper.EventPump.Instance.Enqueue(() => { try { func(objThis, args); } catch { } }); - } - } - } - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_ColorFrameSource_add_PropertyChanged(RootSystem.IntPtr pNative, _Windows_Data_PropertyChangedEventArgs_Delegate eventCallback, bool unsubscribe); - public event RootSystem.EventHandler PropertyChanged - { - add - { - Helper.EventPump.EnsureInitialized(); - - Windows_Data_PropertyChangedEventArgs_Delegate_callbacks.TryAddDefault(_pNative); - var callbackList = Windows_Data_PropertyChangedEventArgs_Delegate_callbacks[_pNative]; - lock (callbackList) - { - callbackList.Add(value); - if(callbackList.Count == 1) - { - var del = new _Windows_Data_PropertyChangedEventArgs_Delegate(Windows_Data_PropertyChangedEventArgs_Delegate_Handler); - _Windows_Data_PropertyChangedEventArgs_Delegate_Handle = RootSystem.Runtime.InteropServices.GCHandle.Alloc(del); - Windows_Kinect_ColorFrameSource_add_PropertyChanged(_pNative, del, false); - } - } - } - remove - { - if (_pNative == RootSystem.IntPtr.Zero) - { - return; - } - - Windows_Data_PropertyChangedEventArgs_Delegate_callbacks.TryAddDefault(_pNative); - var callbackList = Windows_Data_PropertyChangedEventArgs_Delegate_callbacks[_pNative]; - lock (callbackList) - { - callbackList.Remove(value); - if(callbackList.Count == 0) - { - Windows_Kinect_ColorFrameSource_add_PropertyChanged(_pNative, Windows_Data_PropertyChangedEventArgs_Delegate_Handler, true); - _Windows_Data_PropertyChangedEventArgs_Delegate_Handle.Free(); - } - } - } - } - - - // Public Methods - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern RootSystem.IntPtr Windows_Kinect_ColorFrameSource_OpenReader(RootSystem.IntPtr pNative); - public Windows.Kinect.ColorFrameReader OpenReader() - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("ColorFrameSource"); - } - - RootSystem.IntPtr objectPointer = Windows_Kinect_ColorFrameSource_OpenReader(_pNative); - Helper.ExceptionHelper.CheckLastError(); - if (objectPointer == RootSystem.IntPtr.Zero) - { - return null; - } - - return Helper.NativeObjectCache.CreateOrGetObject(objectPointer, n => new Windows.Kinect.ColorFrameReader(n)); - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern RootSystem.IntPtr Windows_Kinect_ColorFrameSource_CreateFrameDescription(RootSystem.IntPtr pNative, Windows.Kinect.ColorImageFormat format); - public Windows.Kinect.FrameDescription CreateFrameDescription(Windows.Kinect.ColorImageFormat format) - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("ColorFrameSource"); - } - - RootSystem.IntPtr objectPointer = Windows_Kinect_ColorFrameSource_CreateFrameDescription(_pNative, format); - Helper.ExceptionHelper.CheckLastError(); - if (objectPointer == RootSystem.IntPtr.Zero) - { - return null; - } - - return Helper.NativeObjectCache.CreateOrGetObject(objectPointer, n => new Windows.Kinect.FrameDescription(n)); - } - - private void __EventCleanup() - { - { - Windows_Kinect_FrameCapturedEventArgs_Delegate_callbacks.TryAddDefault(_pNative); - var callbackList = Windows_Kinect_FrameCapturedEventArgs_Delegate_callbacks[_pNative]; - lock (callbackList) - { - if (callbackList.Count > 0) - { - callbackList.Clear(); - if (_pNative != RootSystem.IntPtr.Zero) - { - Windows_Kinect_ColorFrameSource_add_FrameCaptured(_pNative, Windows_Kinect_FrameCapturedEventArgs_Delegate_Handler, true); - } - _Windows_Kinect_FrameCapturedEventArgs_Delegate_Handle.Free(); - } - } - } - { - Windows_Data_PropertyChangedEventArgs_Delegate_callbacks.TryAddDefault(_pNative); - var callbackList = Windows_Data_PropertyChangedEventArgs_Delegate_callbacks[_pNative]; - lock (callbackList) - { - if (callbackList.Count > 0) - { - callbackList.Clear(); - if (_pNative != RootSystem.IntPtr.Zero) - { - Windows_Kinect_ColorFrameSource_add_PropertyChanged(_pNative, Windows_Data_PropertyChangedEventArgs_Delegate_Handler, true); - } - _Windows_Data_PropertyChangedEventArgs_Delegate_Handle.Free(); - } - } - } - } - } - -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/ColorFrameSource.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/ColorFrameSource.cs.meta deleted file mode 100644 index f91b172..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/ColorFrameSource.cs.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 31be1a3a8cdc0d1408a7eada947fe966 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/ColorImageFormat.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/ColorImageFormat.cs deleted file mode 100644 index 7c2f7c9..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/ColorImageFormat.cs +++ /dev/null @@ -1,19 +0,0 @@ -using RootSystem = System; -using System.Linq; -using System.Collections.Generic; -namespace Windows.Kinect -{ - // - // Windows.Kinect.ColorImageFormat - // - public enum ColorImageFormat : int - { - None =0, - Rgba =1, - Yuv =2, - Bgra =3, - Bayer =4, - Yuy2 =5, - } - -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/ColorImageFormat.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/ColorImageFormat.cs.meta deleted file mode 100644 index cbde2ca..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/ColorImageFormat.cs.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: a203492c798220244927d338800eec2f -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/ColorSpacePoint.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/ColorSpacePoint.cs deleted file mode 100644 index d72c563..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/ColorSpacePoint.cs +++ /dev/null @@ -1,46 +0,0 @@ -using RootSystem = System; -using System.Linq; -using System.Collections.Generic; -namespace Windows.Kinect -{ - // - // Windows.Kinect.ColorSpacePoint - // - [RootSystem.Runtime.InteropServices.StructLayout(RootSystem.Runtime.InteropServices.LayoutKind.Sequential)] - public struct ColorSpacePoint - { - public float X { get; set; } - public float Y { get; set; } - - public override int GetHashCode() - { - return X.GetHashCode() ^ Y.GetHashCode(); - } - - public override bool Equals(object obj) - { - if (!(obj is ColorSpacePoint)) - { - return false; - } - - return this.Equals((ColorSpacePoint)obj); - } - - public bool Equals(ColorSpacePoint obj) - { - return X.Equals(obj.X) && Y.Equals(obj.Y); - } - - public static bool operator ==(ColorSpacePoint a, ColorSpacePoint b) - { - return a.Equals(b); - } - - public static bool operator !=(ColorSpacePoint a, ColorSpacePoint b) - { - return !(a.Equals(b)); - } - } - -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/ColorSpacePoint.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/ColorSpacePoint.cs.meta deleted file mode 100644 index cfcf600..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/ColorSpacePoint.cs.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 9eb5711cb5d886b45883ead06f286283 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/CoordinateMapper.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/CoordinateMapper.cs deleted file mode 100644 index 811213b..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/CoordinateMapper.cs +++ /dev/null @@ -1,336 +0,0 @@ -using RootSystem = System; -using System.Linq; -using System.Collections.Generic; -namespace Windows.Kinect -{ - // - // Windows.Kinect.CoordinateMapper - // - public sealed partial class CoordinateMapper : Helper.INativeWrapper - - { - internal RootSystem.IntPtr _pNative; - RootSystem.IntPtr Helper.INativeWrapper.nativePtr { get { return _pNative; } } - - // Constructors and Finalizers - internal CoordinateMapper(RootSystem.IntPtr pNative) - { - _pNative = pNative; - Windows_Kinect_CoordinateMapper_AddRefObject(ref _pNative); - } - - ~CoordinateMapper() - { - Dispose(false); - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_CoordinateMapper_ReleaseObject(ref RootSystem.IntPtr pNative); - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_CoordinateMapper_AddRefObject(ref RootSystem.IntPtr pNative); - private void Dispose(bool disposing) - { - if (_pNative == RootSystem.IntPtr.Zero) - { - return; - } - - __EventCleanup(); - - Helper.NativeObjectCache.RemoveObject(_pNative); - Windows_Kinect_CoordinateMapper_ReleaseObject(ref _pNative); - - _pNative = RootSystem.IntPtr.Zero; - } - - - // Events - private static RootSystem.Runtime.InteropServices.GCHandle _Windows_Kinect_CoordinateMappingChangedEventArgs_Delegate_Handle; - [RootSystem.Runtime.InteropServices.UnmanagedFunctionPointer(RootSystem.Runtime.InteropServices.CallingConvention.Cdecl)] - private delegate void _Windows_Kinect_CoordinateMappingChangedEventArgs_Delegate(RootSystem.IntPtr args, RootSystem.IntPtr pNative); - private static Helper.CollectionMap>> Windows_Kinect_CoordinateMappingChangedEventArgs_Delegate_callbacks = new Helper.CollectionMap>>(); - [AOT.MonoPInvokeCallbackAttribute(typeof(_Windows_Kinect_CoordinateMappingChangedEventArgs_Delegate))] - private static void Windows_Kinect_CoordinateMappingChangedEventArgs_Delegate_Handler(RootSystem.IntPtr result, RootSystem.IntPtr pNative) - { - List> callbackList = null; - Windows_Kinect_CoordinateMappingChangedEventArgs_Delegate_callbacks.TryGetValue(pNative, out callbackList); - lock(callbackList) - { - var objThis = Helper.NativeObjectCache.GetObject(pNative); - var args = new Windows.Kinect.CoordinateMappingChangedEventArgs(result); - foreach(var func in callbackList) - { - Helper.EventPump.Instance.Enqueue(() => { try { func(objThis, args); } catch { } }); - } - } - } - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_CoordinateMapper_add_CoordinateMappingChanged(RootSystem.IntPtr pNative, _Windows_Kinect_CoordinateMappingChangedEventArgs_Delegate eventCallback, bool unsubscribe); - public event RootSystem.EventHandler CoordinateMappingChanged - { - add - { - Helper.EventPump.EnsureInitialized(); - - Windows_Kinect_CoordinateMappingChangedEventArgs_Delegate_callbacks.TryAddDefault(_pNative); - var callbackList = Windows_Kinect_CoordinateMappingChangedEventArgs_Delegate_callbacks[_pNative]; - lock (callbackList) - { - callbackList.Add(value); - if(callbackList.Count == 1) - { - var del = new _Windows_Kinect_CoordinateMappingChangedEventArgs_Delegate(Windows_Kinect_CoordinateMappingChangedEventArgs_Delegate_Handler); - _Windows_Kinect_CoordinateMappingChangedEventArgs_Delegate_Handle = RootSystem.Runtime.InteropServices.GCHandle.Alloc(del); - Windows_Kinect_CoordinateMapper_add_CoordinateMappingChanged(_pNative, del, false); - } - } - } - remove - { - if (_pNative == RootSystem.IntPtr.Zero) - { - return; - } - - Windows_Kinect_CoordinateMappingChangedEventArgs_Delegate_callbacks.TryAddDefault(_pNative); - var callbackList = Windows_Kinect_CoordinateMappingChangedEventArgs_Delegate_callbacks[_pNative]; - lock (callbackList) - { - callbackList.Remove(value); - if(callbackList.Count == 0) - { - Windows_Kinect_CoordinateMapper_add_CoordinateMappingChanged(_pNative, Windows_Kinect_CoordinateMappingChangedEventArgs_Delegate_Handler, true); - _Windows_Kinect_CoordinateMappingChangedEventArgs_Delegate_Handle.Free(); - } - } - } - } - - - // Public Methods - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern RootSystem.IntPtr Windows_Kinect_CoordinateMapper_MapCameraPointToDepthSpace(RootSystem.IntPtr pNative, Windows.Kinect.CameraSpacePoint cameraPoint); - public Windows.Kinect.DepthSpacePoint MapCameraPointToDepthSpace(Windows.Kinect.CameraSpacePoint cameraPoint) - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("CoordinateMapper"); - } - - var objectPointer = Windows_Kinect_CoordinateMapper_MapCameraPointToDepthSpace(_pNative, cameraPoint); - Helper.ExceptionHelper.CheckLastError(); - var obj = (Windows.Kinect.DepthSpacePoint)RootSystem.Runtime.InteropServices.Marshal.PtrToStructure(objectPointer, typeof(Windows.Kinect.DepthSpacePoint)); - RootSystem.Runtime.InteropServices.Marshal.FreeHGlobal(objectPointer); - return obj; - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern RootSystem.IntPtr Windows_Kinect_CoordinateMapper_MapCameraPointToColorSpace(RootSystem.IntPtr pNative, Windows.Kinect.CameraSpacePoint cameraPoint); - public Windows.Kinect.ColorSpacePoint MapCameraPointToColorSpace(Windows.Kinect.CameraSpacePoint cameraPoint) - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("CoordinateMapper"); - } - - var objectPointer = Windows_Kinect_CoordinateMapper_MapCameraPointToColorSpace(_pNative, cameraPoint); - Helper.ExceptionHelper.CheckLastError(); - var obj = (Windows.Kinect.ColorSpacePoint)RootSystem.Runtime.InteropServices.Marshal.PtrToStructure(objectPointer, typeof(Windows.Kinect.ColorSpacePoint)); - RootSystem.Runtime.InteropServices.Marshal.FreeHGlobal(objectPointer); - return obj; - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern RootSystem.IntPtr Windows_Kinect_CoordinateMapper_MapDepthPointToCameraSpace(RootSystem.IntPtr pNative, Windows.Kinect.DepthSpacePoint depthPoint, ushort depth); - public Windows.Kinect.CameraSpacePoint MapDepthPointToCameraSpace(Windows.Kinect.DepthSpacePoint depthPoint, ushort depth) - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("CoordinateMapper"); - } - - var objectPointer = Windows_Kinect_CoordinateMapper_MapDepthPointToCameraSpace(_pNative, depthPoint, depth); - Helper.ExceptionHelper.CheckLastError(); - var obj = (Windows.Kinect.CameraSpacePoint)RootSystem.Runtime.InteropServices.Marshal.PtrToStructure(objectPointer, typeof(Windows.Kinect.CameraSpacePoint)); - RootSystem.Runtime.InteropServices.Marshal.FreeHGlobal(objectPointer); - return obj; - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern RootSystem.IntPtr Windows_Kinect_CoordinateMapper_MapDepthPointToColorSpace(RootSystem.IntPtr pNative, Windows.Kinect.DepthSpacePoint depthPoint, ushort depth); - public Windows.Kinect.ColorSpacePoint MapDepthPointToColorSpace(Windows.Kinect.DepthSpacePoint depthPoint, ushort depth) - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("CoordinateMapper"); - } - - var objectPointer = Windows_Kinect_CoordinateMapper_MapDepthPointToColorSpace(_pNative, depthPoint, depth); - Helper.ExceptionHelper.CheckLastError(); - var obj = (Windows.Kinect.ColorSpacePoint)RootSystem.Runtime.InteropServices.Marshal.PtrToStructure(objectPointer, typeof(Windows.Kinect.ColorSpacePoint)); - RootSystem.Runtime.InteropServices.Marshal.FreeHGlobal(objectPointer); - return obj; - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_CoordinateMapper_MapCameraPointsToDepthSpace(RootSystem.IntPtr pNative, RootSystem.IntPtr cameraPoints, int cameraPointsSize, RootSystem.IntPtr depthPoints, int depthPointsSize); - public void MapCameraPointsToDepthSpace(Windows.Kinect.CameraSpacePoint[] cameraPoints, Windows.Kinect.DepthSpacePoint[] depthPoints) - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("CoordinateMapper"); - } - - var cameraPointsSmartGCHandle = new Helper.SmartGCHandle(RootSystem.Runtime.InteropServices.GCHandle.Alloc(cameraPoints, RootSystem.Runtime.InteropServices.GCHandleType.Pinned)); - var _cameraPoints = cameraPointsSmartGCHandle.AddrOfPinnedObject(); - var depthPointsSmartGCHandle = new Helper.SmartGCHandle(RootSystem.Runtime.InteropServices.GCHandle.Alloc(depthPoints, RootSystem.Runtime.InteropServices.GCHandleType.Pinned)); - var _depthPoints = depthPointsSmartGCHandle.AddrOfPinnedObject(); - Windows_Kinect_CoordinateMapper_MapCameraPointsToDepthSpace(_pNative, _cameraPoints, cameraPoints.Length, _depthPoints, depthPoints.Length); - Helper.ExceptionHelper.CheckLastError(); - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_CoordinateMapper_MapCameraPointsToColorSpace(RootSystem.IntPtr pNative, RootSystem.IntPtr cameraPoints, int cameraPointsSize, RootSystem.IntPtr colorPoints, int colorPointsSize); - public void MapCameraPointsToColorSpace(Windows.Kinect.CameraSpacePoint[] cameraPoints, Windows.Kinect.ColorSpacePoint[] colorPoints) - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("CoordinateMapper"); - } - - var cameraPointsSmartGCHandle = new Helper.SmartGCHandle(RootSystem.Runtime.InteropServices.GCHandle.Alloc(cameraPoints, RootSystem.Runtime.InteropServices.GCHandleType.Pinned)); - var _cameraPoints = cameraPointsSmartGCHandle.AddrOfPinnedObject(); - var colorPointsSmartGCHandle = new Helper.SmartGCHandle(RootSystem.Runtime.InteropServices.GCHandle.Alloc(colorPoints, RootSystem.Runtime.InteropServices.GCHandleType.Pinned)); - var _colorPoints = colorPointsSmartGCHandle.AddrOfPinnedObject(); - Windows_Kinect_CoordinateMapper_MapCameraPointsToColorSpace(_pNative, _cameraPoints, cameraPoints.Length, _colorPoints, colorPoints.Length); - Helper.ExceptionHelper.CheckLastError(); - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_CoordinateMapper_MapDepthPointsToCameraSpace(RootSystem.IntPtr pNative, RootSystem.IntPtr depthPoints, int depthPointsSize, RootSystem.IntPtr depths, int depthsSize, RootSystem.IntPtr cameraPoints, int cameraPointsSize); - public void MapDepthPointsToCameraSpace(Windows.Kinect.DepthSpacePoint[] depthPoints, ushort[] depths, Windows.Kinect.CameraSpacePoint[] cameraPoints) - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("CoordinateMapper"); - } - - var depthPointsSmartGCHandle = new Helper.SmartGCHandle(RootSystem.Runtime.InteropServices.GCHandle.Alloc(depthPoints, RootSystem.Runtime.InteropServices.GCHandleType.Pinned)); - var _depthPoints = depthPointsSmartGCHandle.AddrOfPinnedObject(); - var depthsSmartGCHandle = new Helper.SmartGCHandle(RootSystem.Runtime.InteropServices.GCHandle.Alloc(depths, RootSystem.Runtime.InteropServices.GCHandleType.Pinned)); - var _depths = depthsSmartGCHandle.AddrOfPinnedObject(); - var cameraPointsSmartGCHandle = new Helper.SmartGCHandle(RootSystem.Runtime.InteropServices.GCHandle.Alloc(cameraPoints, RootSystem.Runtime.InteropServices.GCHandleType.Pinned)); - var _cameraPoints = cameraPointsSmartGCHandle.AddrOfPinnedObject(); - Windows_Kinect_CoordinateMapper_MapDepthPointsToCameraSpace(_pNative, _depthPoints, depthPoints.Length, _depths, depths.Length, _cameraPoints, cameraPoints.Length); - Helper.ExceptionHelper.CheckLastError(); - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_CoordinateMapper_MapDepthPointsToColorSpace(RootSystem.IntPtr pNative, RootSystem.IntPtr depthPoints, int depthPointsSize, RootSystem.IntPtr depths, int depthsSize, RootSystem.IntPtr colorPoints, int colorPointsSize); - public void MapDepthPointsToColorSpace(Windows.Kinect.DepthSpacePoint[] depthPoints, ushort[] depths, Windows.Kinect.ColorSpacePoint[] colorPoints) - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("CoordinateMapper"); - } - - var depthPointsSmartGCHandle = new Helper.SmartGCHandle(RootSystem.Runtime.InteropServices.GCHandle.Alloc(depthPoints, RootSystem.Runtime.InteropServices.GCHandleType.Pinned)); - var _depthPoints = depthPointsSmartGCHandle.AddrOfPinnedObject(); - var depthsSmartGCHandle = new Helper.SmartGCHandle(RootSystem.Runtime.InteropServices.GCHandle.Alloc(depths, RootSystem.Runtime.InteropServices.GCHandleType.Pinned)); - var _depths = depthsSmartGCHandle.AddrOfPinnedObject(); - var colorPointsSmartGCHandle = new Helper.SmartGCHandle(RootSystem.Runtime.InteropServices.GCHandle.Alloc(colorPoints, RootSystem.Runtime.InteropServices.GCHandleType.Pinned)); - var _colorPoints = colorPointsSmartGCHandle.AddrOfPinnedObject(); - Windows_Kinect_CoordinateMapper_MapDepthPointsToColorSpace(_pNative, _depthPoints, depthPoints.Length, _depths, depths.Length, _colorPoints, colorPoints.Length); - Helper.ExceptionHelper.CheckLastError(); - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_CoordinateMapper_MapDepthFrameToCameraSpace(RootSystem.IntPtr pNative, RootSystem.IntPtr depthFrameData, int depthFrameDataSize, RootSystem.IntPtr cameraSpacePoints, int cameraSpacePointsSize); - public void MapDepthFrameToCameraSpace(ushort[] depthFrameData, Windows.Kinect.CameraSpacePoint[] cameraSpacePoints) - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("CoordinateMapper"); - } - - var depthFrameDataSmartGCHandle = new Helper.SmartGCHandle(RootSystem.Runtime.InteropServices.GCHandle.Alloc(depthFrameData, RootSystem.Runtime.InteropServices.GCHandleType.Pinned)); - var _depthFrameData = depthFrameDataSmartGCHandle.AddrOfPinnedObject(); - var cameraSpacePointsSmartGCHandle = new Helper.SmartGCHandle(RootSystem.Runtime.InteropServices.GCHandle.Alloc(cameraSpacePoints, RootSystem.Runtime.InteropServices.GCHandleType.Pinned)); - var _cameraSpacePoints = cameraSpacePointsSmartGCHandle.AddrOfPinnedObject(); - Windows_Kinect_CoordinateMapper_MapDepthFrameToCameraSpace(_pNative, _depthFrameData, depthFrameData.Length, _cameraSpacePoints, cameraSpacePoints.Length); - Helper.ExceptionHelper.CheckLastError(); - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_CoordinateMapper_MapDepthFrameToColorSpace(RootSystem.IntPtr pNative, RootSystem.IntPtr depthFrameData, int depthFrameDataSize, RootSystem.IntPtr colorSpacePoints, int colorSpacePointsSize); - public void MapDepthFrameToColorSpace(ushort[] depthFrameData, Windows.Kinect.ColorSpacePoint[] colorSpacePoints) - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("CoordinateMapper"); - } - - var depthFrameDataSmartGCHandle = new Helper.SmartGCHandle(RootSystem.Runtime.InteropServices.GCHandle.Alloc(depthFrameData, RootSystem.Runtime.InteropServices.GCHandleType.Pinned)); - var _depthFrameData = depthFrameDataSmartGCHandle.AddrOfPinnedObject(); - var colorSpacePointsSmartGCHandle = new Helper.SmartGCHandle(RootSystem.Runtime.InteropServices.GCHandle.Alloc(colorSpacePoints, RootSystem.Runtime.InteropServices.GCHandleType.Pinned)); - var _colorSpacePoints = colorSpacePointsSmartGCHandle.AddrOfPinnedObject(); - Windows_Kinect_CoordinateMapper_MapDepthFrameToColorSpace(_pNative, _depthFrameData, depthFrameData.Length, _colorSpacePoints, colorSpacePoints.Length); - Helper.ExceptionHelper.CheckLastError(); - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_CoordinateMapper_MapColorFrameToDepthSpace(RootSystem.IntPtr pNative, RootSystem.IntPtr depthFrameData, int depthFrameDataSize, RootSystem.IntPtr depthSpacePoints, int depthSpacePointsSize); - public void MapColorFrameToDepthSpace(ushort[] depthFrameData, Windows.Kinect.DepthSpacePoint[] depthSpacePoints) - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("CoordinateMapper"); - } - - var depthFrameDataSmartGCHandle = new Helper.SmartGCHandle(RootSystem.Runtime.InteropServices.GCHandle.Alloc(depthFrameData, RootSystem.Runtime.InteropServices.GCHandleType.Pinned)); - var _depthFrameData = depthFrameDataSmartGCHandle.AddrOfPinnedObject(); - var depthSpacePointsSmartGCHandle = new Helper.SmartGCHandle(RootSystem.Runtime.InteropServices.GCHandle.Alloc(depthSpacePoints, RootSystem.Runtime.InteropServices.GCHandleType.Pinned)); - var _depthSpacePoints = depthSpacePointsSmartGCHandle.AddrOfPinnedObject(); - Windows_Kinect_CoordinateMapper_MapColorFrameToDepthSpace(_pNative, _depthFrameData, depthFrameData.Length, _depthSpacePoints, depthSpacePoints.Length); - Helper.ExceptionHelper.CheckLastError(); - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_CoordinateMapper_MapColorFrameToCameraSpace(RootSystem.IntPtr pNative, RootSystem.IntPtr depthFrameData, int depthFrameDataSize, RootSystem.IntPtr cameraSpacePoints, int cameraSpacePointsSize); - public void MapColorFrameToCameraSpace(ushort[] depthFrameData, Windows.Kinect.CameraSpacePoint[] cameraSpacePoints) - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("CoordinateMapper"); - } - - var depthFrameDataSmartGCHandle = new Helper.SmartGCHandle(RootSystem.Runtime.InteropServices.GCHandle.Alloc(depthFrameData, RootSystem.Runtime.InteropServices.GCHandleType.Pinned)); - var _depthFrameData = depthFrameDataSmartGCHandle.AddrOfPinnedObject(); - var cameraSpacePointsSmartGCHandle = new Helper.SmartGCHandle(RootSystem.Runtime.InteropServices.GCHandle.Alloc(cameraSpacePoints, RootSystem.Runtime.InteropServices.GCHandleType.Pinned)); - var _cameraSpacePoints = cameraSpacePointsSmartGCHandle.AddrOfPinnedObject(); - Windows_Kinect_CoordinateMapper_MapColorFrameToCameraSpace(_pNative, _depthFrameData, depthFrameData.Length, _cameraSpacePoints, cameraSpacePoints.Length); - Helper.ExceptionHelper.CheckLastError(); - } - - private void __EventCleanup() - { - { - Windows_Kinect_CoordinateMappingChangedEventArgs_Delegate_callbacks.TryAddDefault(_pNative); - var callbackList = Windows_Kinect_CoordinateMappingChangedEventArgs_Delegate_callbacks[_pNative]; - lock (callbackList) - { - if (callbackList.Count > 0) - { - callbackList.Clear(); - if (_pNative != RootSystem.IntPtr.Zero) - { - Windows_Kinect_CoordinateMapper_add_CoordinateMappingChanged(_pNative, Windows_Kinect_CoordinateMappingChangedEventArgs_Delegate_Handler, true); - } - _Windows_Kinect_CoordinateMappingChangedEventArgs_Delegate_Handle.Free(); - } - } - } - } - } - -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/CoordinateMapper.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/CoordinateMapper.cs.meta deleted file mode 100644 index 9afe067..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/CoordinateMapper.cs.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 452370c006443bb40bc44aa5d4bd8def -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/CoordinateMappingChangedEventArgs.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/CoordinateMappingChangedEventArgs.cs deleted file mode 100644 index e1b02ac..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/CoordinateMappingChangedEventArgs.cs +++ /dev/null @@ -1,51 +0,0 @@ -using RootSystem = System; -using System.Linq; -using System.Collections.Generic; -namespace Windows.Kinect -{ - // - // Windows.Kinect.CoordinateMappingChangedEventArgs - // - public sealed partial class CoordinateMappingChangedEventArgs : RootSystem.EventArgs, Helper.INativeWrapper - - { - internal RootSystem.IntPtr _pNative; - RootSystem.IntPtr Helper.INativeWrapper.nativePtr { get { return _pNative; } } - - // Constructors and Finalizers - internal CoordinateMappingChangedEventArgs(RootSystem.IntPtr pNative) - { - _pNative = pNative; - Windows_Kinect_CoordinateMappingChangedEventArgs_AddRefObject(ref _pNative); - } - - ~CoordinateMappingChangedEventArgs() - { - Dispose(false); - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_CoordinateMappingChangedEventArgs_ReleaseObject(ref RootSystem.IntPtr pNative); - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_CoordinateMappingChangedEventArgs_AddRefObject(ref RootSystem.IntPtr pNative); - private void Dispose(bool disposing) - { - if (_pNative == RootSystem.IntPtr.Zero) - { - return; - } - - __EventCleanup(); - - Helper.NativeObjectCache.RemoveObject(_pNative); - Windows_Kinect_CoordinateMappingChangedEventArgs_ReleaseObject(ref _pNative); - - _pNative = RootSystem.IntPtr.Zero; - } - - private void __EventCleanup() - { - } - } - -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/CoordinateMappingChangedEventArgs.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/CoordinateMappingChangedEventArgs.cs.meta deleted file mode 100644 index ff3b4c3..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/CoordinateMappingChangedEventArgs.cs.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 82cb5d8afd91cba43a5380999e22e2cb -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/DepthFrame.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/DepthFrame.cs deleted file mode 100644 index 03535d7..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/DepthFrame.cs +++ /dev/null @@ -1,177 +0,0 @@ -using RootSystem = System; -using System.Linq; -using System.Collections.Generic; -namespace Windows.Kinect -{ - // - // Windows.Kinect.DepthFrame - // - public sealed partial class DepthFrame : RootSystem.IDisposable, Helper.INativeWrapper - - { - internal RootSystem.IntPtr _pNative; - RootSystem.IntPtr Helper.INativeWrapper.nativePtr { get { return _pNative; } } - - // Constructors and Finalizers - internal DepthFrame(RootSystem.IntPtr pNative) - { - _pNative = pNative; - Windows_Kinect_DepthFrame_AddRefObject(ref _pNative); - } - - ~DepthFrame() - { - Dispose(false); - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_DepthFrame_ReleaseObject(ref RootSystem.IntPtr pNative); - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_DepthFrame_AddRefObject(ref RootSystem.IntPtr pNative); - private void Dispose(bool disposing) - { - if (_pNative == RootSystem.IntPtr.Zero) - { - return; - } - - __EventCleanup(); - - Helper.NativeObjectCache.RemoveObject(_pNative); - - if (disposing) - { - Windows_Kinect_DepthFrame_Dispose(_pNative); - } - Windows_Kinect_DepthFrame_ReleaseObject(ref _pNative); - - _pNative = RootSystem.IntPtr.Zero; - } - - - // Public Properties - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern RootSystem.IntPtr Windows_Kinect_DepthFrame_get_DepthFrameSource(RootSystem.IntPtr pNative); - public Windows.Kinect.DepthFrameSource DepthFrameSource - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("DepthFrame"); - } - - RootSystem.IntPtr objectPointer = Windows_Kinect_DepthFrame_get_DepthFrameSource(_pNative); - Helper.ExceptionHelper.CheckLastError(); - if (objectPointer == RootSystem.IntPtr.Zero) - { - return null; - } - - return Helper.NativeObjectCache.CreateOrGetObject(objectPointer, n => new Windows.Kinect.DepthFrameSource(n)); - } - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern ushort Windows_Kinect_DepthFrame_get_DepthMaxReliableDistance(RootSystem.IntPtr pNative); - public ushort DepthMaxReliableDistance - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("DepthFrame"); - } - - return Windows_Kinect_DepthFrame_get_DepthMaxReliableDistance(_pNative); - } - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern ushort Windows_Kinect_DepthFrame_get_DepthMinReliableDistance(RootSystem.IntPtr pNative); - public ushort DepthMinReliableDistance - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("DepthFrame"); - } - - return Windows_Kinect_DepthFrame_get_DepthMinReliableDistance(_pNative); - } - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern RootSystem.IntPtr Windows_Kinect_DepthFrame_get_FrameDescription(RootSystem.IntPtr pNative); - public Windows.Kinect.FrameDescription FrameDescription - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("DepthFrame"); - } - - RootSystem.IntPtr objectPointer = Windows_Kinect_DepthFrame_get_FrameDescription(_pNative); - Helper.ExceptionHelper.CheckLastError(); - if (objectPointer == RootSystem.IntPtr.Zero) - { - return null; - } - - return Helper.NativeObjectCache.CreateOrGetObject(objectPointer, n => new Windows.Kinect.FrameDescription(n)); - } - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern long Windows_Kinect_DepthFrame_get_RelativeTime(RootSystem.IntPtr pNative); - public RootSystem.TimeSpan RelativeTime - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("DepthFrame"); - } - - return RootSystem.TimeSpan.FromMilliseconds(Windows_Kinect_DepthFrame_get_RelativeTime(_pNative)); - } - } - - - // Public Methods - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_DepthFrame_CopyFrameDataToArray(RootSystem.IntPtr pNative, RootSystem.IntPtr frameData, int frameDataSize); - public void CopyFrameDataToArray(ushort[] frameData) - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("DepthFrame"); - } - - var frameDataSmartGCHandle = new Helper.SmartGCHandle(RootSystem.Runtime.InteropServices.GCHandle.Alloc(frameData, RootSystem.Runtime.InteropServices.GCHandleType.Pinned)); - var _frameData = frameDataSmartGCHandle.AddrOfPinnedObject(); - Windows_Kinect_DepthFrame_CopyFrameDataToArray(_pNative, _frameData, frameData.Length); - Helper.ExceptionHelper.CheckLastError(); - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_DepthFrame_Dispose(RootSystem.IntPtr pNative); - public void Dispose() - { - if (_pNative == RootSystem.IntPtr.Zero) - { - return; - } - - Dispose(true); - RootSystem.GC.SuppressFinalize(this); - } - - private void __EventCleanup() - { - } - } - -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/DepthFrame.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/DepthFrame.cs.meta deleted file mode 100644 index d09734a..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/DepthFrame.cs.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 1cc3d786ee7037e40b806839fdca184a -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/DepthFrameArrivedEventArgs.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/DepthFrameArrivedEventArgs.cs deleted file mode 100644 index 17c4046..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/DepthFrameArrivedEventArgs.cs +++ /dev/null @@ -1,75 +0,0 @@ -using RootSystem = System; -using System.Linq; -using System.Collections.Generic; -namespace Windows.Kinect -{ - // - // Windows.Kinect.DepthFrameArrivedEventArgs - // - public sealed partial class DepthFrameArrivedEventArgs : RootSystem.EventArgs, Helper.INativeWrapper - - { - internal RootSystem.IntPtr _pNative; - RootSystem.IntPtr Helper.INativeWrapper.nativePtr { get { return _pNative; } } - - // Constructors and Finalizers - internal DepthFrameArrivedEventArgs(RootSystem.IntPtr pNative) - { - _pNative = pNative; - Windows_Kinect_DepthFrameArrivedEventArgs_AddRefObject(ref _pNative); - } - - ~DepthFrameArrivedEventArgs() - { - Dispose(false); - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_DepthFrameArrivedEventArgs_ReleaseObject(ref RootSystem.IntPtr pNative); - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_DepthFrameArrivedEventArgs_AddRefObject(ref RootSystem.IntPtr pNative); - private void Dispose(bool disposing) - { - if (_pNative == RootSystem.IntPtr.Zero) - { - return; - } - - __EventCleanup(); - - Helper.NativeObjectCache.RemoveObject(_pNative); - Windows_Kinect_DepthFrameArrivedEventArgs_ReleaseObject(ref _pNative); - - _pNative = RootSystem.IntPtr.Zero; - } - - - // Public Properties - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern RootSystem.IntPtr Windows_Kinect_DepthFrameArrivedEventArgs_get_FrameReference(RootSystem.IntPtr pNative); - public Windows.Kinect.DepthFrameReference FrameReference - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("DepthFrameArrivedEventArgs"); - } - - RootSystem.IntPtr objectPointer = Windows_Kinect_DepthFrameArrivedEventArgs_get_FrameReference(_pNative); - Helper.ExceptionHelper.CheckLastError(); - if (objectPointer == RootSystem.IntPtr.Zero) - { - return null; - } - - return Helper.NativeObjectCache.CreateOrGetObject(objectPointer, n => new Windows.Kinect.DepthFrameReference(n)); - } - } - - private void __EventCleanup() - { - } - } - -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/DepthFrameArrivedEventArgs.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/DepthFrameArrivedEventArgs.cs.meta deleted file mode 100644 index 1efa195..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/DepthFrameArrivedEventArgs.cs.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: c09496fb04e3d9c43b5fbf4ac998ff6e -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/DepthFrameReader.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/DepthFrameReader.cs deleted file mode 100644 index 3e589a8..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/DepthFrameReader.cs +++ /dev/null @@ -1,297 +0,0 @@ -using RootSystem = System; -using System.Linq; -using System.Collections.Generic; -namespace Windows.Kinect -{ - // - // Windows.Kinect.DepthFrameReader - // - public sealed partial class DepthFrameReader : RootSystem.IDisposable, Helper.INativeWrapper - - { - internal RootSystem.IntPtr _pNative; - RootSystem.IntPtr Helper.INativeWrapper.nativePtr { get { return _pNative; } } - - // Constructors and Finalizers - internal DepthFrameReader(RootSystem.IntPtr pNative) - { - _pNative = pNative; - Windows_Kinect_DepthFrameReader_AddRefObject(ref _pNative); - } - - ~DepthFrameReader() - { - Dispose(false); - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_DepthFrameReader_ReleaseObject(ref RootSystem.IntPtr pNative); - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_DepthFrameReader_AddRefObject(ref RootSystem.IntPtr pNative); - private void Dispose(bool disposing) - { - if (_pNative == RootSystem.IntPtr.Zero) - { - return; - } - - __EventCleanup(); - - Helper.NativeObjectCache.RemoveObject(_pNative); - - if (disposing) - { - Windows_Kinect_DepthFrameReader_Dispose(_pNative); - } - Windows_Kinect_DepthFrameReader_ReleaseObject(ref _pNative); - - _pNative = RootSystem.IntPtr.Zero; - } - - - // Public Properties - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern RootSystem.IntPtr Windows_Kinect_DepthFrameReader_get_DepthFrameSource(RootSystem.IntPtr pNative); - public Windows.Kinect.DepthFrameSource DepthFrameSource - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("DepthFrameReader"); - } - - RootSystem.IntPtr objectPointer = Windows_Kinect_DepthFrameReader_get_DepthFrameSource(_pNative); - Helper.ExceptionHelper.CheckLastError(); - if (objectPointer == RootSystem.IntPtr.Zero) - { - return null; - } - - return Helper.NativeObjectCache.CreateOrGetObject(objectPointer, n => new Windows.Kinect.DepthFrameSource(n)); - } - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern bool Windows_Kinect_DepthFrameReader_get_IsPaused(RootSystem.IntPtr pNative); - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_DepthFrameReader_put_IsPaused(RootSystem.IntPtr pNative, bool isPaused); - public bool IsPaused - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("DepthFrameReader"); - } - - return Windows_Kinect_DepthFrameReader_get_IsPaused(_pNative); - } - set - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("DepthFrameReader"); - } - - Windows_Kinect_DepthFrameReader_put_IsPaused(_pNative, value); - Helper.ExceptionHelper.CheckLastError(); - } - } - - - // Events - private static RootSystem.Runtime.InteropServices.GCHandle _Windows_Kinect_DepthFrameArrivedEventArgs_Delegate_Handle; - [RootSystem.Runtime.InteropServices.UnmanagedFunctionPointer(RootSystem.Runtime.InteropServices.CallingConvention.Cdecl)] - private delegate void _Windows_Kinect_DepthFrameArrivedEventArgs_Delegate(RootSystem.IntPtr args, RootSystem.IntPtr pNative); - private static Helper.CollectionMap>> Windows_Kinect_DepthFrameArrivedEventArgs_Delegate_callbacks = new Helper.CollectionMap>>(); - [AOT.MonoPInvokeCallbackAttribute(typeof(_Windows_Kinect_DepthFrameArrivedEventArgs_Delegate))] - private static void Windows_Kinect_DepthFrameArrivedEventArgs_Delegate_Handler(RootSystem.IntPtr result, RootSystem.IntPtr pNative) - { - List> callbackList = null; - Windows_Kinect_DepthFrameArrivedEventArgs_Delegate_callbacks.TryGetValue(pNative, out callbackList); - lock(callbackList) - { - var objThis = Helper.NativeObjectCache.GetObject(pNative); - var args = new Windows.Kinect.DepthFrameArrivedEventArgs(result); - foreach(var func in callbackList) - { - Helper.EventPump.Instance.Enqueue(() => { try { func(objThis, args); } catch { } }); - } - } - } - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_DepthFrameReader_add_FrameArrived(RootSystem.IntPtr pNative, _Windows_Kinect_DepthFrameArrivedEventArgs_Delegate eventCallback, bool unsubscribe); - public event RootSystem.EventHandler FrameArrived - { - add - { - Helper.EventPump.EnsureInitialized(); - - Windows_Kinect_DepthFrameArrivedEventArgs_Delegate_callbacks.TryAddDefault(_pNative); - var callbackList = Windows_Kinect_DepthFrameArrivedEventArgs_Delegate_callbacks[_pNative]; - lock (callbackList) - { - callbackList.Add(value); - if(callbackList.Count == 1) - { - var del = new _Windows_Kinect_DepthFrameArrivedEventArgs_Delegate(Windows_Kinect_DepthFrameArrivedEventArgs_Delegate_Handler); - _Windows_Kinect_DepthFrameArrivedEventArgs_Delegate_Handle = RootSystem.Runtime.InteropServices.GCHandle.Alloc(del); - Windows_Kinect_DepthFrameReader_add_FrameArrived(_pNative, del, false); - } - } - } - remove - { - if (_pNative == RootSystem.IntPtr.Zero) - { - return; - } - - Windows_Kinect_DepthFrameArrivedEventArgs_Delegate_callbacks.TryAddDefault(_pNative); - var callbackList = Windows_Kinect_DepthFrameArrivedEventArgs_Delegate_callbacks[_pNative]; - lock (callbackList) - { - callbackList.Remove(value); - if(callbackList.Count == 0) - { - Windows_Kinect_DepthFrameReader_add_FrameArrived(_pNative, Windows_Kinect_DepthFrameArrivedEventArgs_Delegate_Handler, true); - _Windows_Kinect_DepthFrameArrivedEventArgs_Delegate_Handle.Free(); - } - } - } - } - - private static RootSystem.Runtime.InteropServices.GCHandle _Windows_Data_PropertyChangedEventArgs_Delegate_Handle; - [RootSystem.Runtime.InteropServices.UnmanagedFunctionPointer(RootSystem.Runtime.InteropServices.CallingConvention.Cdecl)] - private delegate void _Windows_Data_PropertyChangedEventArgs_Delegate(RootSystem.IntPtr args, RootSystem.IntPtr pNative); - private static Helper.CollectionMap>> Windows_Data_PropertyChangedEventArgs_Delegate_callbacks = new Helper.CollectionMap>>(); - [AOT.MonoPInvokeCallbackAttribute(typeof(_Windows_Data_PropertyChangedEventArgs_Delegate))] - private static void Windows_Data_PropertyChangedEventArgs_Delegate_Handler(RootSystem.IntPtr result, RootSystem.IntPtr pNative) - { - List> callbackList = null; - Windows_Data_PropertyChangedEventArgs_Delegate_callbacks.TryGetValue(pNative, out callbackList); - lock(callbackList) - { - var objThis = Helper.NativeObjectCache.GetObject(pNative); - var args = new Windows.Data.PropertyChangedEventArgs(result); - foreach(var func in callbackList) - { - Helper.EventPump.Instance.Enqueue(() => { try { func(objThis, args); } catch { } }); - } - } - } - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_DepthFrameReader_add_PropertyChanged(RootSystem.IntPtr pNative, _Windows_Data_PropertyChangedEventArgs_Delegate eventCallback, bool unsubscribe); - public event RootSystem.EventHandler PropertyChanged - { - add - { - Helper.EventPump.EnsureInitialized(); - - Windows_Data_PropertyChangedEventArgs_Delegate_callbacks.TryAddDefault(_pNative); - var callbackList = Windows_Data_PropertyChangedEventArgs_Delegate_callbacks[_pNative]; - lock (callbackList) - { - callbackList.Add(value); - if(callbackList.Count == 1) - { - var del = new _Windows_Data_PropertyChangedEventArgs_Delegate(Windows_Data_PropertyChangedEventArgs_Delegate_Handler); - _Windows_Data_PropertyChangedEventArgs_Delegate_Handle = RootSystem.Runtime.InteropServices.GCHandle.Alloc(del); - Windows_Kinect_DepthFrameReader_add_PropertyChanged(_pNative, del, false); - } - } - } - remove - { - if (_pNative == RootSystem.IntPtr.Zero) - { - return; - } - - Windows_Data_PropertyChangedEventArgs_Delegate_callbacks.TryAddDefault(_pNative); - var callbackList = Windows_Data_PropertyChangedEventArgs_Delegate_callbacks[_pNative]; - lock (callbackList) - { - callbackList.Remove(value); - if(callbackList.Count == 0) - { - Windows_Kinect_DepthFrameReader_add_PropertyChanged(_pNative, Windows_Data_PropertyChangedEventArgs_Delegate_Handler, true); - _Windows_Data_PropertyChangedEventArgs_Delegate_Handle.Free(); - } - } - } - } - - - // Public Methods - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern RootSystem.IntPtr Windows_Kinect_DepthFrameReader_AcquireLatestFrame(RootSystem.IntPtr pNative); - public Windows.Kinect.DepthFrame AcquireLatestFrame() - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("DepthFrameReader"); - } - - RootSystem.IntPtr objectPointer = Windows_Kinect_DepthFrameReader_AcquireLatestFrame(_pNative); - Helper.ExceptionHelper.CheckLastError(); - if (objectPointer == RootSystem.IntPtr.Zero) - { - return null; - } - - return Helper.NativeObjectCache.CreateOrGetObject(objectPointer, n => new Windows.Kinect.DepthFrame(n)); - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_DepthFrameReader_Dispose(RootSystem.IntPtr pNative); - public void Dispose() - { - if (_pNative == RootSystem.IntPtr.Zero) - { - return; - } - - Dispose(true); - RootSystem.GC.SuppressFinalize(this); - } - - private void __EventCleanup() - { - { - Windows_Kinect_DepthFrameArrivedEventArgs_Delegate_callbacks.TryAddDefault(_pNative); - var callbackList = Windows_Kinect_DepthFrameArrivedEventArgs_Delegate_callbacks[_pNative]; - lock (callbackList) - { - if (callbackList.Count > 0) - { - callbackList.Clear(); - if (_pNative != RootSystem.IntPtr.Zero) - { - Windows_Kinect_DepthFrameReader_add_FrameArrived(_pNative, Windows_Kinect_DepthFrameArrivedEventArgs_Delegate_Handler, true); - } - _Windows_Kinect_DepthFrameArrivedEventArgs_Delegate_Handle.Free(); - } - } - } - { - Windows_Data_PropertyChangedEventArgs_Delegate_callbacks.TryAddDefault(_pNative); - var callbackList = Windows_Data_PropertyChangedEventArgs_Delegate_callbacks[_pNative]; - lock (callbackList) - { - if (callbackList.Count > 0) - { - callbackList.Clear(); - if (_pNative != RootSystem.IntPtr.Zero) - { - Windows_Kinect_DepthFrameReader_add_PropertyChanged(_pNative, Windows_Data_PropertyChangedEventArgs_Delegate_Handler, true); - } - _Windows_Data_PropertyChangedEventArgs_Delegate_Handle.Free(); - } - } - } - } - } - -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/DepthFrameReader.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/DepthFrameReader.cs.meta deleted file mode 100644 index 46bbf37..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/DepthFrameReader.cs.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 19e437f0dfc211640b0b56e1e0221a8f -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/DepthFrameReference.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/DepthFrameReference.cs deleted file mode 100644 index e9ebd58..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/DepthFrameReference.cs +++ /dev/null @@ -1,89 +0,0 @@ -using RootSystem = System; -using System.Linq; -using System.Collections.Generic; -namespace Windows.Kinect -{ - // - // Windows.Kinect.DepthFrameReference - // - public sealed partial class DepthFrameReference : Helper.INativeWrapper - - { - internal RootSystem.IntPtr _pNative; - RootSystem.IntPtr Helper.INativeWrapper.nativePtr { get { return _pNative; } } - - // Constructors and Finalizers - internal DepthFrameReference(RootSystem.IntPtr pNative) - { - _pNative = pNative; - Windows_Kinect_DepthFrameReference_AddRefObject(ref _pNative); - } - - ~DepthFrameReference() - { - Dispose(false); - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_DepthFrameReference_ReleaseObject(ref RootSystem.IntPtr pNative); - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_DepthFrameReference_AddRefObject(ref RootSystem.IntPtr pNative); - private void Dispose(bool disposing) - { - if (_pNative == RootSystem.IntPtr.Zero) - { - return; - } - - __EventCleanup(); - - Helper.NativeObjectCache.RemoveObject(_pNative); - Windows_Kinect_DepthFrameReference_ReleaseObject(ref _pNative); - - _pNative = RootSystem.IntPtr.Zero; - } - - - // Public Properties - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern long Windows_Kinect_DepthFrameReference_get_RelativeTime(RootSystem.IntPtr pNative); - public RootSystem.TimeSpan RelativeTime - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("DepthFrameReference"); - } - - return RootSystem.TimeSpan.FromMilliseconds(Windows_Kinect_DepthFrameReference_get_RelativeTime(_pNative)); - } - } - - - // Public Methods - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern RootSystem.IntPtr Windows_Kinect_DepthFrameReference_AcquireFrame(RootSystem.IntPtr pNative); - public Windows.Kinect.DepthFrame AcquireFrame() - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("DepthFrameReference"); - } - - RootSystem.IntPtr objectPointer = Windows_Kinect_DepthFrameReference_AcquireFrame(_pNative); - Helper.ExceptionHelper.CheckLastError(); - if (objectPointer == RootSystem.IntPtr.Zero) - { - return null; - } - - return Helper.NativeObjectCache.CreateOrGetObject(objectPointer, n => new Windows.Kinect.DepthFrame(n)); - } - - private void __EventCleanup() - { - } - } - -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/DepthFrameReference.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/DepthFrameReference.cs.meta deleted file mode 100644 index 6fc0e5b..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/DepthFrameReference.cs.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: f53daf0889b08bf4494ecbd1914a99d6 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/DepthFrameSource.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/DepthFrameSource.cs deleted file mode 100644 index 829f946..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/DepthFrameSource.cs +++ /dev/null @@ -1,319 +0,0 @@ -using RootSystem = System; -using System.Linq; -using System.Collections.Generic; -namespace Windows.Kinect -{ - // - // Windows.Kinect.DepthFrameSource - // - public sealed partial class DepthFrameSource : Helper.INativeWrapper - - { - internal RootSystem.IntPtr _pNative; - RootSystem.IntPtr Helper.INativeWrapper.nativePtr { get { return _pNative; } } - - // Constructors and Finalizers - internal DepthFrameSource(RootSystem.IntPtr pNative) - { - _pNative = pNative; - Windows_Kinect_DepthFrameSource_AddRefObject(ref _pNative); - } - - ~DepthFrameSource() - { - Dispose(false); - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_DepthFrameSource_ReleaseObject(ref RootSystem.IntPtr pNative); - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_DepthFrameSource_AddRefObject(ref RootSystem.IntPtr pNative); - private void Dispose(bool disposing) - { - if (_pNative == RootSystem.IntPtr.Zero) - { - return; - } - - __EventCleanup(); - - Helper.NativeObjectCache.RemoveObject(_pNative); - Windows_Kinect_DepthFrameSource_ReleaseObject(ref _pNative); - - _pNative = RootSystem.IntPtr.Zero; - } - - - // Public Properties - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern ushort Windows_Kinect_DepthFrameSource_get_DepthMaxReliableDistance(RootSystem.IntPtr pNative); - public ushort DepthMaxReliableDistance - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("DepthFrameSource"); - } - - return Windows_Kinect_DepthFrameSource_get_DepthMaxReliableDistance(_pNative); - } - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern ushort Windows_Kinect_DepthFrameSource_get_DepthMinReliableDistance(RootSystem.IntPtr pNative); - public ushort DepthMinReliableDistance - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("DepthFrameSource"); - } - - return Windows_Kinect_DepthFrameSource_get_DepthMinReliableDistance(_pNative); - } - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern RootSystem.IntPtr Windows_Kinect_DepthFrameSource_get_FrameDescription(RootSystem.IntPtr pNative); - public Windows.Kinect.FrameDescription FrameDescription - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("DepthFrameSource"); - } - - RootSystem.IntPtr objectPointer = Windows_Kinect_DepthFrameSource_get_FrameDescription(_pNative); - Helper.ExceptionHelper.CheckLastError(); - if (objectPointer == RootSystem.IntPtr.Zero) - { - return null; - } - - return Helper.NativeObjectCache.CreateOrGetObject(objectPointer, n => new Windows.Kinect.FrameDescription(n)); - } - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern bool Windows_Kinect_DepthFrameSource_get_IsActive(RootSystem.IntPtr pNative); - public bool IsActive - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("DepthFrameSource"); - } - - return Windows_Kinect_DepthFrameSource_get_IsActive(_pNative); - } - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern RootSystem.IntPtr Windows_Kinect_DepthFrameSource_get_KinectSensor(RootSystem.IntPtr pNative); - public Windows.Kinect.KinectSensor KinectSensor - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("DepthFrameSource"); - } - - RootSystem.IntPtr objectPointer = Windows_Kinect_DepthFrameSource_get_KinectSensor(_pNative); - Helper.ExceptionHelper.CheckLastError(); - if (objectPointer == RootSystem.IntPtr.Zero) - { - return null; - } - - return Helper.NativeObjectCache.CreateOrGetObject(objectPointer, n => new Windows.Kinect.KinectSensor(n)); - } - } - - - // Events - private static RootSystem.Runtime.InteropServices.GCHandle _Windows_Kinect_FrameCapturedEventArgs_Delegate_Handle; - [RootSystem.Runtime.InteropServices.UnmanagedFunctionPointer(RootSystem.Runtime.InteropServices.CallingConvention.Cdecl)] - private delegate void _Windows_Kinect_FrameCapturedEventArgs_Delegate(RootSystem.IntPtr args, RootSystem.IntPtr pNative); - private static Helper.CollectionMap>> Windows_Kinect_FrameCapturedEventArgs_Delegate_callbacks = new Helper.CollectionMap>>(); - [AOT.MonoPInvokeCallbackAttribute(typeof(_Windows_Kinect_FrameCapturedEventArgs_Delegate))] - private static void Windows_Kinect_FrameCapturedEventArgs_Delegate_Handler(RootSystem.IntPtr result, RootSystem.IntPtr pNative) - { - List> callbackList = null; - Windows_Kinect_FrameCapturedEventArgs_Delegate_callbacks.TryGetValue(pNative, out callbackList); - lock(callbackList) - { - var objThis = Helper.NativeObjectCache.GetObject(pNative); - var args = new Windows.Kinect.FrameCapturedEventArgs(result); - foreach(var func in callbackList) - { - Helper.EventPump.Instance.Enqueue(() => { try { func(objThis, args); } catch { } }); - } - } - } - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_DepthFrameSource_add_FrameCaptured(RootSystem.IntPtr pNative, _Windows_Kinect_FrameCapturedEventArgs_Delegate eventCallback, bool unsubscribe); - public event RootSystem.EventHandler FrameCaptured - { - add - { - Helper.EventPump.EnsureInitialized(); - - Windows_Kinect_FrameCapturedEventArgs_Delegate_callbacks.TryAddDefault(_pNative); - var callbackList = Windows_Kinect_FrameCapturedEventArgs_Delegate_callbacks[_pNative]; - lock (callbackList) - { - callbackList.Add(value); - if(callbackList.Count == 1) - { - var del = new _Windows_Kinect_FrameCapturedEventArgs_Delegate(Windows_Kinect_FrameCapturedEventArgs_Delegate_Handler); - _Windows_Kinect_FrameCapturedEventArgs_Delegate_Handle = RootSystem.Runtime.InteropServices.GCHandle.Alloc(del); - Windows_Kinect_DepthFrameSource_add_FrameCaptured(_pNative, del, false); - } - } - } - remove - { - if (_pNative == RootSystem.IntPtr.Zero) - { - return; - } - - Windows_Kinect_FrameCapturedEventArgs_Delegate_callbacks.TryAddDefault(_pNative); - var callbackList = Windows_Kinect_FrameCapturedEventArgs_Delegate_callbacks[_pNative]; - lock (callbackList) - { - callbackList.Remove(value); - if(callbackList.Count == 0) - { - Windows_Kinect_DepthFrameSource_add_FrameCaptured(_pNative, Windows_Kinect_FrameCapturedEventArgs_Delegate_Handler, true); - _Windows_Kinect_FrameCapturedEventArgs_Delegate_Handle.Free(); - } - } - } - } - - private static RootSystem.Runtime.InteropServices.GCHandle _Windows_Data_PropertyChangedEventArgs_Delegate_Handle; - [RootSystem.Runtime.InteropServices.UnmanagedFunctionPointer(RootSystem.Runtime.InteropServices.CallingConvention.Cdecl)] - private delegate void _Windows_Data_PropertyChangedEventArgs_Delegate(RootSystem.IntPtr args, RootSystem.IntPtr pNative); - private static Helper.CollectionMap>> Windows_Data_PropertyChangedEventArgs_Delegate_callbacks = new Helper.CollectionMap>>(); - [AOT.MonoPInvokeCallbackAttribute(typeof(_Windows_Data_PropertyChangedEventArgs_Delegate))] - private static void Windows_Data_PropertyChangedEventArgs_Delegate_Handler(RootSystem.IntPtr result, RootSystem.IntPtr pNative) - { - List> callbackList = null; - Windows_Data_PropertyChangedEventArgs_Delegate_callbacks.TryGetValue(pNative, out callbackList); - lock(callbackList) - { - var objThis = Helper.NativeObjectCache.GetObject(pNative); - var args = new Windows.Data.PropertyChangedEventArgs(result); - foreach(var func in callbackList) - { - Helper.EventPump.Instance.Enqueue(() => { try { func(objThis, args); } catch { } }); - } - } - } - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_DepthFrameSource_add_PropertyChanged(RootSystem.IntPtr pNative, _Windows_Data_PropertyChangedEventArgs_Delegate eventCallback, bool unsubscribe); - public event RootSystem.EventHandler PropertyChanged - { - add - { - Helper.EventPump.EnsureInitialized(); - - Windows_Data_PropertyChangedEventArgs_Delegate_callbacks.TryAddDefault(_pNative); - var callbackList = Windows_Data_PropertyChangedEventArgs_Delegate_callbacks[_pNative]; - lock (callbackList) - { - callbackList.Add(value); - if(callbackList.Count == 1) - { - var del = new _Windows_Data_PropertyChangedEventArgs_Delegate(Windows_Data_PropertyChangedEventArgs_Delegate_Handler); - _Windows_Data_PropertyChangedEventArgs_Delegate_Handle = RootSystem.Runtime.InteropServices.GCHandle.Alloc(del); - Windows_Kinect_DepthFrameSource_add_PropertyChanged(_pNative, del, false); - } - } - } - remove - { - if (_pNative == RootSystem.IntPtr.Zero) - { - return; - } - - Windows_Data_PropertyChangedEventArgs_Delegate_callbacks.TryAddDefault(_pNative); - var callbackList = Windows_Data_PropertyChangedEventArgs_Delegate_callbacks[_pNative]; - lock (callbackList) - { - callbackList.Remove(value); - if(callbackList.Count == 0) - { - Windows_Kinect_DepthFrameSource_add_PropertyChanged(_pNative, Windows_Data_PropertyChangedEventArgs_Delegate_Handler, true); - _Windows_Data_PropertyChangedEventArgs_Delegate_Handle.Free(); - } - } - } - } - - - // Public Methods - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern RootSystem.IntPtr Windows_Kinect_DepthFrameSource_OpenReader(RootSystem.IntPtr pNative); - public Windows.Kinect.DepthFrameReader OpenReader() - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("DepthFrameSource"); - } - - RootSystem.IntPtr objectPointer = Windows_Kinect_DepthFrameSource_OpenReader(_pNative); - Helper.ExceptionHelper.CheckLastError(); - if (objectPointer == RootSystem.IntPtr.Zero) - { - return null; - } - - return Helper.NativeObjectCache.CreateOrGetObject(objectPointer, n => new Windows.Kinect.DepthFrameReader(n)); - } - - private void __EventCleanup() - { - { - Windows_Kinect_FrameCapturedEventArgs_Delegate_callbacks.TryAddDefault(_pNative); - var callbackList = Windows_Kinect_FrameCapturedEventArgs_Delegate_callbacks[_pNative]; - lock (callbackList) - { - if (callbackList.Count > 0) - { - callbackList.Clear(); - if (_pNative != RootSystem.IntPtr.Zero) - { - Windows_Kinect_DepthFrameSource_add_FrameCaptured(_pNative, Windows_Kinect_FrameCapturedEventArgs_Delegate_Handler, true); - } - _Windows_Kinect_FrameCapturedEventArgs_Delegate_Handle.Free(); - } - } - } - { - Windows_Data_PropertyChangedEventArgs_Delegate_callbacks.TryAddDefault(_pNative); - var callbackList = Windows_Data_PropertyChangedEventArgs_Delegate_callbacks[_pNative]; - lock (callbackList) - { - if (callbackList.Count > 0) - { - callbackList.Clear(); - if (_pNative != RootSystem.IntPtr.Zero) - { - Windows_Kinect_DepthFrameSource_add_PropertyChanged(_pNative, Windows_Data_PropertyChangedEventArgs_Delegate_Handler, true); - } - _Windows_Data_PropertyChangedEventArgs_Delegate_Handle.Free(); - } - } - } - } - } - -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/DepthFrameSource.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/DepthFrameSource.cs.meta deleted file mode 100644 index 0977ef2..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/DepthFrameSource.cs.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: ec16a6a3c150d4c479a008f45c1851ec -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/DepthSpacePoint.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/DepthSpacePoint.cs deleted file mode 100644 index fc94cfe..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/DepthSpacePoint.cs +++ /dev/null @@ -1,46 +0,0 @@ -using RootSystem = System; -using System.Linq; -using System.Collections.Generic; -namespace Windows.Kinect -{ - // - // Windows.Kinect.DepthSpacePoint - // - [RootSystem.Runtime.InteropServices.StructLayout(RootSystem.Runtime.InteropServices.LayoutKind.Sequential)] - public struct DepthSpacePoint - { - public float X { get; set; } - public float Y { get; set; } - - public override int GetHashCode() - { - return X.GetHashCode() ^ Y.GetHashCode(); - } - - public override bool Equals(object obj) - { - if (!(obj is DepthSpacePoint)) - { - return false; - } - - return this.Equals((DepthSpacePoint)obj); - } - - public bool Equals(DepthSpacePoint obj) - { - return X.Equals(obj.X) && Y.Equals(obj.Y); - } - - public static bool operator ==(DepthSpacePoint a, DepthSpacePoint b) - { - return a.Equals(b); - } - - public static bool operator !=(DepthSpacePoint a, DepthSpacePoint b) - { - return !(a.Equals(b)); - } - } - -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/DepthSpacePoint.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/DepthSpacePoint.cs.meta deleted file mode 100644 index 789f96c..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/DepthSpacePoint.cs.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 87a047e9c131269479b899f8dd9cac89 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/DetectionResult.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/DetectionResult.cs deleted file mode 100644 index 6558bf7..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/DetectionResult.cs +++ /dev/null @@ -1,17 +0,0 @@ -using RootSystem = System; -using System.Linq; -using System.Collections.Generic; -namespace Windows.Kinect -{ - // - // Windows.Kinect.DetectionResult - // - public enum DetectionResult : int - { - Unknown =0, - No =1, - Maybe =2, - Yes =3, - } - -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/DetectionResult.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/DetectionResult.cs.meta deleted file mode 100644 index 1abbbd1..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/DetectionResult.cs.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 6f242e10b172a6340a49529ef0ad2d90 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/EventPump.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/EventPump.cs deleted file mode 100644 index c2dc3c0..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/EventPump.cs +++ /dev/null @@ -1,78 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Runtime.InteropServices; -using System.Linq; - -namespace Helper -{ - internal class EventPump : UnityEngine.MonoBehaviour - { - private static object s_Lock = new object(); - private Queue m_Queue = new Queue(); - - public static EventPump Instance - { - get; - private set; - } - - public static void EnsureInitialized() - { - try - { - if (EventPump.Instance == null) - { - lock (s_Lock) - { - if (EventPump.Instance == null) - { - UnityEngine.GameObject parent = new UnityEngine.GameObject("Kinect Desktop Event Pump"); - EventPump.Instance = parent.AddComponent(); - DontDestroyOnLoad(parent); - } - } - } - } - catch - { - UnityEngine.Debug.LogError("Events must be registered on the main thread."); - return; - } - } - - private void Update() - { - lock (m_Queue) - { - while (m_Queue.Count > 0) - { - var action = m_Queue.Dequeue(); - try - { - action.Invoke(); - } - catch { } - } - } - } - - private void OnApplicationQuit() - { - var sensor = Windows.Kinect.KinectSensor.GetDefault(); - if (sensor != null && sensor.IsOpen) - { - sensor.Close(); - } - - NativeObjectCache.Flush(); - } - - public void Enqueue(Action action) - { - lock (m_Queue) - { - m_Queue.Enqueue(action); - } - } - } -} \ No newline at end of file diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/EventPump.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/EventPump.cs.meta deleted file mode 100644 index e3f4298..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/EventPump.cs.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: debd3e6b79ccfa7439ef3bc59b8d30e6 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/ExceptionHelper.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/ExceptionHelper.cs deleted file mode 100644 index 4d89ac3..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/ExceptionHelper.cs +++ /dev/null @@ -1,50 +0,0 @@ -using System; -using System.Runtime.InteropServices; - -namespace Helper -{ - public static class ExceptionHelper - { - private const int E_NOTIMPL = unchecked((int)0x80004001); - private const int E_OUTOFMEMORY = unchecked((int)0x8007000E); - private const int E_INVALIDARG = unchecked((int)0x80070057); - private const int E_POINTER = unchecked((int) 0x80004003); - private const int E_PENDING = unchecked((int)0x8000000A); - private const int E_FAIL = unchecked((int)0x80004005); - - public static void CheckLastError() - { - int hr = Marshal.GetLastWin32Error(); - - if ((hr == E_PENDING) || (hr == E_FAIL)) - { - // Ignore E_PENDING/E_FAIL - We use this to indicate no pending or missed frames - return; - } - - if (hr < 0) - { - Exception exception = Marshal.GetExceptionForHR(hr); - string message = string.Format("This API has returned an exception from an HRESULT: 0x{0:X}", hr); - - switch (hr) - { - case E_NOTIMPL: - throw new NotImplementedException(message, exception); - - case E_OUTOFMEMORY: - throw new OutOfMemoryException(message, exception); - - case E_INVALIDARG: - throw new ArgumentException(message, exception); - - case E_POINTER: - throw new ArgumentNullException(message, exception); - - default: - throw new InvalidOperationException(message, exception); - } - } - } - } -} \ No newline at end of file diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/ExceptionHelper.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/ExceptionHelper.cs.meta deleted file mode 100644 index 09c2e28..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/ExceptionHelper.cs.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 86085617855511d45b0648e6b62e1584 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/Expression.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/Expression.cs deleted file mode 100644 index 5d4bb22..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/Expression.cs +++ /dev/null @@ -1,15 +0,0 @@ -using RootSystem = System; -using System.Linq; -using System.Collections.Generic; -namespace Windows.Kinect -{ - // - // Windows.Kinect.Expression - // - public enum Expression : int - { - Neutral =0, - Happy =1, - } - -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/Expression.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/Expression.cs.meta deleted file mode 100644 index e8006c9..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/Expression.cs.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 13c84518ab4fa60499742f896207e91e -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/FrameCapturedEventArgs.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/FrameCapturedEventArgs.cs deleted file mode 100644 index 307b970..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/FrameCapturedEventArgs.cs +++ /dev/null @@ -1,98 +0,0 @@ -using RootSystem = System; -using System.Linq; -using System.Collections.Generic; -namespace Windows.Kinect -{ - // - // Windows.Kinect.FrameCapturedEventArgs - // - public sealed partial class FrameCapturedEventArgs : RootSystem.EventArgs, Helper.INativeWrapper - - { - internal RootSystem.IntPtr _pNative; - RootSystem.IntPtr Helper.INativeWrapper.nativePtr { get { return _pNative; } } - - // Constructors and Finalizers - internal FrameCapturedEventArgs(RootSystem.IntPtr pNative) - { - _pNative = pNative; - Windows_Kinect_FrameCapturedEventArgs_AddRefObject(ref _pNative); - } - - ~FrameCapturedEventArgs() - { - Dispose(false); - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_FrameCapturedEventArgs_ReleaseObject(ref RootSystem.IntPtr pNative); - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_FrameCapturedEventArgs_AddRefObject(ref RootSystem.IntPtr pNative); - private void Dispose(bool disposing) - { - if (_pNative == RootSystem.IntPtr.Zero) - { - return; - } - - __EventCleanup(); - - Helper.NativeObjectCache.RemoveObject(_pNative); - Windows_Kinect_FrameCapturedEventArgs_ReleaseObject(ref _pNative); - - _pNative = RootSystem.IntPtr.Zero; - } - - - // Public Properties - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern Windows.Kinect.FrameCapturedStatus Windows_Kinect_FrameCapturedEventArgs_get_FrameStatus(RootSystem.IntPtr pNative); - public Windows.Kinect.FrameCapturedStatus FrameStatus - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("FrameCapturedEventArgs"); - } - - return Windows_Kinect_FrameCapturedEventArgs_get_FrameStatus(_pNative); - } - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern Windows.Kinect.FrameSourceTypes Windows_Kinect_FrameCapturedEventArgs_get_FrameType(RootSystem.IntPtr pNative); - public Windows.Kinect.FrameSourceTypes FrameType - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("FrameCapturedEventArgs"); - } - - return Windows_Kinect_FrameCapturedEventArgs_get_FrameType(_pNative); - } - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern long Windows_Kinect_FrameCapturedEventArgs_get_RelativeTime(RootSystem.IntPtr pNative); - public RootSystem.TimeSpan RelativeTime - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("FrameCapturedEventArgs"); - } - - return RootSystem.TimeSpan.FromMilliseconds(Windows_Kinect_FrameCapturedEventArgs_get_RelativeTime(_pNative)); - } - } - - private void __EventCleanup() - { - } - } - -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/FrameCapturedEventArgs.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/FrameCapturedEventArgs.cs.meta deleted file mode 100644 index 059623c..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/FrameCapturedEventArgs.cs.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 085ec75a343f958408701e00ba2168ce -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/FrameCapturedStatus.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/FrameCapturedStatus.cs deleted file mode 100644 index a42cf71..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/FrameCapturedStatus.cs +++ /dev/null @@ -1,16 +0,0 @@ -using RootSystem = System; -using System.Linq; -using System.Collections.Generic; -namespace Windows.Kinect -{ - // - // Windows.Kinect.FrameCapturedStatus - // - public enum FrameCapturedStatus : int - { - Unknown =0, - Queued =1, - Dropped =2, - } - -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/FrameCapturedStatus.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/FrameCapturedStatus.cs.meta deleted file mode 100644 index d8947c1..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/FrameCapturedStatus.cs.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: ccf1cabe437c4764d9818a2fd30827f0 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/FrameDescription.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/FrameDescription.cs deleted file mode 100644 index 25d46ab..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/FrameDescription.cs +++ /dev/null @@ -1,158 +0,0 @@ -using RootSystem = System; -using System.Linq; -using System.Collections.Generic; -namespace Windows.Kinect -{ - // - // Windows.Kinect.FrameDescription - // - public sealed partial class FrameDescription : Helper.INativeWrapper - - { - internal RootSystem.IntPtr _pNative; - RootSystem.IntPtr Helper.INativeWrapper.nativePtr { get { return _pNative; } } - - // Constructors and Finalizers - internal FrameDescription(RootSystem.IntPtr pNative) - { - _pNative = pNative; - Windows_Kinect_FrameDescription_AddRefObject(ref _pNative); - } - - ~FrameDescription() - { - Dispose(false); - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_FrameDescription_ReleaseObject(ref RootSystem.IntPtr pNative); - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_FrameDescription_AddRefObject(ref RootSystem.IntPtr pNative); - private void Dispose(bool disposing) - { - if (_pNative == RootSystem.IntPtr.Zero) - { - return; - } - - __EventCleanup(); - - Helper.NativeObjectCache.RemoveObject(_pNative); - Windows_Kinect_FrameDescription_ReleaseObject(ref _pNative); - - _pNative = RootSystem.IntPtr.Zero; - } - - - // Public Properties - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern uint Windows_Kinect_FrameDescription_get_BytesPerPixel(RootSystem.IntPtr pNative); - public uint BytesPerPixel - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("FrameDescription"); - } - - return Windows_Kinect_FrameDescription_get_BytesPerPixel(_pNative); - } - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern float Windows_Kinect_FrameDescription_get_DiagonalFieldOfView(RootSystem.IntPtr pNative); - public float DiagonalFieldOfView - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("FrameDescription"); - } - - return Windows_Kinect_FrameDescription_get_DiagonalFieldOfView(_pNative); - } - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern int Windows_Kinect_FrameDescription_get_Height(RootSystem.IntPtr pNative); - public int Height - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("FrameDescription"); - } - - return Windows_Kinect_FrameDescription_get_Height(_pNative); - } - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern float Windows_Kinect_FrameDescription_get_HorizontalFieldOfView(RootSystem.IntPtr pNative); - public float HorizontalFieldOfView - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("FrameDescription"); - } - - return Windows_Kinect_FrameDescription_get_HorizontalFieldOfView(_pNative); - } - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern uint Windows_Kinect_FrameDescription_get_LengthInPixels(RootSystem.IntPtr pNative); - public uint LengthInPixels - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("FrameDescription"); - } - - return Windows_Kinect_FrameDescription_get_LengthInPixels(_pNative); - } - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern float Windows_Kinect_FrameDescription_get_VerticalFieldOfView(RootSystem.IntPtr pNative); - public float VerticalFieldOfView - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("FrameDescription"); - } - - return Windows_Kinect_FrameDescription_get_VerticalFieldOfView(_pNative); - } - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern int Windows_Kinect_FrameDescription_get_Width(RootSystem.IntPtr pNative); - public int Width - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("FrameDescription"); - } - - return Windows_Kinect_FrameDescription_get_Width(_pNative); - } - } - - private void __EventCleanup() - { - } - } - -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/FrameDescription.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/FrameDescription.cs.meta deleted file mode 100644 index 2a2a7ff..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/FrameDescription.cs.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 855fcb405500ab14b8902d15d27ed0ab -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/FrameEdges.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/FrameEdges.cs deleted file mode 100644 index 4751626..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/FrameEdges.cs +++ /dev/null @@ -1,19 +0,0 @@ -using RootSystem = System; -using System.Linq; -using System.Collections.Generic; -namespace Windows.Kinect -{ - // - // Windows.Kinect.FrameEdges - // - [RootSystem.Flags] - public enum FrameEdges : uint - { - None =0, - Right =1, - Left =2, - Top =4, - Bottom =8, - } - -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/FrameEdges.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/FrameEdges.cs.meta deleted file mode 100644 index f775dcd..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/FrameEdges.cs.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 34cd6f0c5382cd9458b3b1ef06e001ba -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/FrameSourceTypes.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/FrameSourceTypes.cs deleted file mode 100644 index cb639bb..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/FrameSourceTypes.cs +++ /dev/null @@ -1,22 +0,0 @@ -using RootSystem = System; -using System.Linq; -using System.Collections.Generic; -namespace Windows.Kinect -{ - // - // Windows.Kinect.FrameSourceTypes - // - [RootSystem.Flags] - public enum FrameSourceTypes : uint - { - None =0, - Color =1, - Infrared =2, - LongExposureInfrared =4, - Depth =8, - BodyIndex =16, - Body =32, - Audio =64, - } - -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/FrameSourceTypes.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/FrameSourceTypes.cs.meta deleted file mode 100644 index 507d3f9..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/FrameSourceTypes.cs.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: bbb237f869b7c684aa4bff904d74ceed -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/HandState.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/HandState.cs deleted file mode 100644 index 6ae6efc..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/HandState.cs +++ /dev/null @@ -1,18 +0,0 @@ -using RootSystem = System; -using System.Linq; -using System.Collections.Generic; -namespace Windows.Kinect -{ - // - // Windows.Kinect.HandState - // - public enum HandState : int - { - Unknown =0, - NotTracked =1, - Open =2, - Closed =3, - Lasso =4, - } - -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/HandState.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/HandState.cs.meta deleted file mode 100644 index 5da3a2c..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/HandState.cs.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 61c6c0071af9a08459843e571124cbef -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/INativeWrapper.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/INativeWrapper.cs deleted file mode 100644 index 32a562c..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/INativeWrapper.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Runtime.InteropServices; -using System.Linq; - -namespace Helper -{ - internal interface INativeWrapper - { - System.IntPtr nativePtr { get; } - } -} \ No newline at end of file diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/INativeWrapper.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/INativeWrapper.cs.meta deleted file mode 100644 index 2813b4a..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/INativeWrapper.cs.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 010db25b57d940546a60549c96171b70 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/InfraredFrame.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/InfraredFrame.cs deleted file mode 100644 index e097592..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/InfraredFrame.cs +++ /dev/null @@ -1,147 +0,0 @@ -using RootSystem = System; -using System.Linq; -using System.Collections.Generic; -namespace Windows.Kinect -{ - // - // Windows.Kinect.InfraredFrame - // - public sealed partial class InfraredFrame : RootSystem.IDisposable, Helper.INativeWrapper - - { - internal RootSystem.IntPtr _pNative; - RootSystem.IntPtr Helper.INativeWrapper.nativePtr { get { return _pNative; } } - - // Constructors and Finalizers - internal InfraredFrame(RootSystem.IntPtr pNative) - { - _pNative = pNative; - Windows_Kinect_InfraredFrame_AddRefObject(ref _pNative); - } - - ~InfraredFrame() - { - Dispose(false); - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_InfraredFrame_ReleaseObject(ref RootSystem.IntPtr pNative); - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_InfraredFrame_AddRefObject(ref RootSystem.IntPtr pNative); - private void Dispose(bool disposing) - { - if (_pNative == RootSystem.IntPtr.Zero) - { - return; - } - - __EventCleanup(); - - Helper.NativeObjectCache.RemoveObject(_pNative); - - if (disposing) - { - Windows_Kinect_InfraredFrame_Dispose(_pNative); - } - Windows_Kinect_InfraredFrame_ReleaseObject(ref _pNative); - - _pNative = RootSystem.IntPtr.Zero; - } - - - // Public Properties - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern RootSystem.IntPtr Windows_Kinect_InfraredFrame_get_FrameDescription(RootSystem.IntPtr pNative); - public Windows.Kinect.FrameDescription FrameDescription - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("InfraredFrame"); - } - - RootSystem.IntPtr objectPointer = Windows_Kinect_InfraredFrame_get_FrameDescription(_pNative); - Helper.ExceptionHelper.CheckLastError(); - if (objectPointer == RootSystem.IntPtr.Zero) - { - return null; - } - - return Helper.NativeObjectCache.CreateOrGetObject(objectPointer, n => new Windows.Kinect.FrameDescription(n)); - } - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern RootSystem.IntPtr Windows_Kinect_InfraredFrame_get_InfraredFrameSource(RootSystem.IntPtr pNative); - public Windows.Kinect.InfraredFrameSource InfraredFrameSource - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("InfraredFrame"); - } - - RootSystem.IntPtr objectPointer = Windows_Kinect_InfraredFrame_get_InfraredFrameSource(_pNative); - Helper.ExceptionHelper.CheckLastError(); - if (objectPointer == RootSystem.IntPtr.Zero) - { - return null; - } - - return Helper.NativeObjectCache.CreateOrGetObject(objectPointer, n => new Windows.Kinect.InfraredFrameSource(n)); - } - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern long Windows_Kinect_InfraredFrame_get_RelativeTime(RootSystem.IntPtr pNative); - public RootSystem.TimeSpan RelativeTime - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("InfraredFrame"); - } - - return RootSystem.TimeSpan.FromMilliseconds(Windows_Kinect_InfraredFrame_get_RelativeTime(_pNative)); - } - } - - - // Public Methods - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_InfraredFrame_CopyFrameDataToArray(RootSystem.IntPtr pNative, RootSystem.IntPtr frameData, int frameDataSize); - public void CopyFrameDataToArray(ushort[] frameData) - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("InfraredFrame"); - } - - var frameDataSmartGCHandle = new Helper.SmartGCHandle(RootSystem.Runtime.InteropServices.GCHandle.Alloc(frameData, RootSystem.Runtime.InteropServices.GCHandleType.Pinned)); - var _frameData = frameDataSmartGCHandle.AddrOfPinnedObject(); - Windows_Kinect_InfraredFrame_CopyFrameDataToArray(_pNative, _frameData, frameData.Length); - Helper.ExceptionHelper.CheckLastError(); - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_InfraredFrame_Dispose(RootSystem.IntPtr pNative); - public void Dispose() - { - if (_pNative == RootSystem.IntPtr.Zero) - { - return; - } - - Dispose(true); - RootSystem.GC.SuppressFinalize(this); - } - - private void __EventCleanup() - { - } - } - -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/InfraredFrame.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/InfraredFrame.cs.meta deleted file mode 100644 index cb29b92..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/InfraredFrame.cs.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 716d52dd0cd344f439914ed99e62b0e5 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/InfraredFrameArrivedEventArgs.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/InfraredFrameArrivedEventArgs.cs deleted file mode 100644 index 443b235..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/InfraredFrameArrivedEventArgs.cs +++ /dev/null @@ -1,75 +0,0 @@ -using RootSystem = System; -using System.Linq; -using System.Collections.Generic; -namespace Windows.Kinect -{ - // - // Windows.Kinect.InfraredFrameArrivedEventArgs - // - public sealed partial class InfraredFrameArrivedEventArgs : RootSystem.EventArgs, Helper.INativeWrapper - - { - internal RootSystem.IntPtr _pNative; - RootSystem.IntPtr Helper.INativeWrapper.nativePtr { get { return _pNative; } } - - // Constructors and Finalizers - internal InfraredFrameArrivedEventArgs(RootSystem.IntPtr pNative) - { - _pNative = pNative; - Windows_Kinect_InfraredFrameArrivedEventArgs_AddRefObject(ref _pNative); - } - - ~InfraredFrameArrivedEventArgs() - { - Dispose(false); - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_InfraredFrameArrivedEventArgs_ReleaseObject(ref RootSystem.IntPtr pNative); - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_InfraredFrameArrivedEventArgs_AddRefObject(ref RootSystem.IntPtr pNative); - private void Dispose(bool disposing) - { - if (_pNative == RootSystem.IntPtr.Zero) - { - return; - } - - __EventCleanup(); - - Helper.NativeObjectCache.RemoveObject(_pNative); - Windows_Kinect_InfraredFrameArrivedEventArgs_ReleaseObject(ref _pNative); - - _pNative = RootSystem.IntPtr.Zero; - } - - - // Public Properties - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern RootSystem.IntPtr Windows_Kinect_InfraredFrameArrivedEventArgs_get_FrameReference(RootSystem.IntPtr pNative); - public Windows.Kinect.InfraredFrameReference FrameReference - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("InfraredFrameArrivedEventArgs"); - } - - RootSystem.IntPtr objectPointer = Windows_Kinect_InfraredFrameArrivedEventArgs_get_FrameReference(_pNative); - Helper.ExceptionHelper.CheckLastError(); - if (objectPointer == RootSystem.IntPtr.Zero) - { - return null; - } - - return Helper.NativeObjectCache.CreateOrGetObject(objectPointer, n => new Windows.Kinect.InfraredFrameReference(n)); - } - } - - private void __EventCleanup() - { - } - } - -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/InfraredFrameArrivedEventArgs.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/InfraredFrameArrivedEventArgs.cs.meta deleted file mode 100644 index 5068e4b..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/InfraredFrameArrivedEventArgs.cs.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 47e956b7b74fcd447a28c068f2fcaf56 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/InfraredFrameReader.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/InfraredFrameReader.cs deleted file mode 100644 index 5bda30b..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/InfraredFrameReader.cs +++ /dev/null @@ -1,297 +0,0 @@ -using RootSystem = System; -using System.Linq; -using System.Collections.Generic; -namespace Windows.Kinect -{ - // - // Windows.Kinect.InfraredFrameReader - // - public sealed partial class InfraredFrameReader : RootSystem.IDisposable, Helper.INativeWrapper - - { - internal RootSystem.IntPtr _pNative; - RootSystem.IntPtr Helper.INativeWrapper.nativePtr { get { return _pNative; } } - - // Constructors and Finalizers - internal InfraredFrameReader(RootSystem.IntPtr pNative) - { - _pNative = pNative; - Windows_Kinect_InfraredFrameReader_AddRefObject(ref _pNative); - } - - ~InfraredFrameReader() - { - Dispose(false); - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_InfraredFrameReader_ReleaseObject(ref RootSystem.IntPtr pNative); - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_InfraredFrameReader_AddRefObject(ref RootSystem.IntPtr pNative); - private void Dispose(bool disposing) - { - if (_pNative == RootSystem.IntPtr.Zero) - { - return; - } - - __EventCleanup(); - - Helper.NativeObjectCache.RemoveObject(_pNative); - - if (disposing) - { - Windows_Kinect_InfraredFrameReader_Dispose(_pNative); - } - Windows_Kinect_InfraredFrameReader_ReleaseObject(ref _pNative); - - _pNative = RootSystem.IntPtr.Zero; - } - - - // Public Properties - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern RootSystem.IntPtr Windows_Kinect_InfraredFrameReader_get_InfraredFrameSource(RootSystem.IntPtr pNative); - public Windows.Kinect.InfraredFrameSource InfraredFrameSource - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("InfraredFrameReader"); - } - - RootSystem.IntPtr objectPointer = Windows_Kinect_InfraredFrameReader_get_InfraredFrameSource(_pNative); - Helper.ExceptionHelper.CheckLastError(); - if (objectPointer == RootSystem.IntPtr.Zero) - { - return null; - } - - return Helper.NativeObjectCache.CreateOrGetObject(objectPointer, n => new Windows.Kinect.InfraredFrameSource(n)); - } - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern bool Windows_Kinect_InfraredFrameReader_get_IsPaused(RootSystem.IntPtr pNative); - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_InfraredFrameReader_put_IsPaused(RootSystem.IntPtr pNative, bool isPaused); - public bool IsPaused - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("InfraredFrameReader"); - } - - return Windows_Kinect_InfraredFrameReader_get_IsPaused(_pNative); - } - set - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("InfraredFrameReader"); - } - - Windows_Kinect_InfraredFrameReader_put_IsPaused(_pNative, value); - Helper.ExceptionHelper.CheckLastError(); - } - } - - - // Events - private static RootSystem.Runtime.InteropServices.GCHandle _Windows_Kinect_InfraredFrameArrivedEventArgs_Delegate_Handle; - [RootSystem.Runtime.InteropServices.UnmanagedFunctionPointer(RootSystem.Runtime.InteropServices.CallingConvention.Cdecl)] - private delegate void _Windows_Kinect_InfraredFrameArrivedEventArgs_Delegate(RootSystem.IntPtr args, RootSystem.IntPtr pNative); - private static Helper.CollectionMap>> Windows_Kinect_InfraredFrameArrivedEventArgs_Delegate_callbacks = new Helper.CollectionMap>>(); - [AOT.MonoPInvokeCallbackAttribute(typeof(_Windows_Kinect_InfraredFrameArrivedEventArgs_Delegate))] - private static void Windows_Kinect_InfraredFrameArrivedEventArgs_Delegate_Handler(RootSystem.IntPtr result, RootSystem.IntPtr pNative) - { - List> callbackList = null; - Windows_Kinect_InfraredFrameArrivedEventArgs_Delegate_callbacks.TryGetValue(pNative, out callbackList); - lock(callbackList) - { - var objThis = Helper.NativeObjectCache.GetObject(pNative); - var args = new Windows.Kinect.InfraredFrameArrivedEventArgs(result); - foreach(var func in callbackList) - { - Helper.EventPump.Instance.Enqueue(() => { try { func(objThis, args); } catch { } }); - } - } - } - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_InfraredFrameReader_add_FrameArrived(RootSystem.IntPtr pNative, _Windows_Kinect_InfraredFrameArrivedEventArgs_Delegate eventCallback, bool unsubscribe); - public event RootSystem.EventHandler FrameArrived - { - add - { - Helper.EventPump.EnsureInitialized(); - - Windows_Kinect_InfraredFrameArrivedEventArgs_Delegate_callbacks.TryAddDefault(_pNative); - var callbackList = Windows_Kinect_InfraredFrameArrivedEventArgs_Delegate_callbacks[_pNative]; - lock (callbackList) - { - callbackList.Add(value); - if(callbackList.Count == 1) - { - var del = new _Windows_Kinect_InfraredFrameArrivedEventArgs_Delegate(Windows_Kinect_InfraredFrameArrivedEventArgs_Delegate_Handler); - _Windows_Kinect_InfraredFrameArrivedEventArgs_Delegate_Handle = RootSystem.Runtime.InteropServices.GCHandle.Alloc(del); - Windows_Kinect_InfraredFrameReader_add_FrameArrived(_pNative, del, false); - } - } - } - remove - { - if (_pNative == RootSystem.IntPtr.Zero) - { - return; - } - - Windows_Kinect_InfraredFrameArrivedEventArgs_Delegate_callbacks.TryAddDefault(_pNative); - var callbackList = Windows_Kinect_InfraredFrameArrivedEventArgs_Delegate_callbacks[_pNative]; - lock (callbackList) - { - callbackList.Remove(value); - if(callbackList.Count == 0) - { - Windows_Kinect_InfraredFrameReader_add_FrameArrived(_pNative, Windows_Kinect_InfraredFrameArrivedEventArgs_Delegate_Handler, true); - _Windows_Kinect_InfraredFrameArrivedEventArgs_Delegate_Handle.Free(); - } - } - } - } - - private static RootSystem.Runtime.InteropServices.GCHandle _Windows_Data_PropertyChangedEventArgs_Delegate_Handle; - [RootSystem.Runtime.InteropServices.UnmanagedFunctionPointer(RootSystem.Runtime.InteropServices.CallingConvention.Cdecl)] - private delegate void _Windows_Data_PropertyChangedEventArgs_Delegate(RootSystem.IntPtr args, RootSystem.IntPtr pNative); - private static Helper.CollectionMap>> Windows_Data_PropertyChangedEventArgs_Delegate_callbacks = new Helper.CollectionMap>>(); - [AOT.MonoPInvokeCallbackAttribute(typeof(_Windows_Data_PropertyChangedEventArgs_Delegate))] - private static void Windows_Data_PropertyChangedEventArgs_Delegate_Handler(RootSystem.IntPtr result, RootSystem.IntPtr pNative) - { - List> callbackList = null; - Windows_Data_PropertyChangedEventArgs_Delegate_callbacks.TryGetValue(pNative, out callbackList); - lock(callbackList) - { - var objThis = Helper.NativeObjectCache.GetObject(pNative); - var args = new Windows.Data.PropertyChangedEventArgs(result); - foreach(var func in callbackList) - { - Helper.EventPump.Instance.Enqueue(() => { try { func(objThis, args); } catch { } }); - } - } - } - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_InfraredFrameReader_add_PropertyChanged(RootSystem.IntPtr pNative, _Windows_Data_PropertyChangedEventArgs_Delegate eventCallback, bool unsubscribe); - public event RootSystem.EventHandler PropertyChanged - { - add - { - Helper.EventPump.EnsureInitialized(); - - Windows_Data_PropertyChangedEventArgs_Delegate_callbacks.TryAddDefault(_pNative); - var callbackList = Windows_Data_PropertyChangedEventArgs_Delegate_callbacks[_pNative]; - lock (callbackList) - { - callbackList.Add(value); - if(callbackList.Count == 1) - { - var del = new _Windows_Data_PropertyChangedEventArgs_Delegate(Windows_Data_PropertyChangedEventArgs_Delegate_Handler); - _Windows_Data_PropertyChangedEventArgs_Delegate_Handle = RootSystem.Runtime.InteropServices.GCHandle.Alloc(del); - Windows_Kinect_InfraredFrameReader_add_PropertyChanged(_pNative, del, false); - } - } - } - remove - { - if (_pNative == RootSystem.IntPtr.Zero) - { - return; - } - - Windows_Data_PropertyChangedEventArgs_Delegate_callbacks.TryAddDefault(_pNative); - var callbackList = Windows_Data_PropertyChangedEventArgs_Delegate_callbacks[_pNative]; - lock (callbackList) - { - callbackList.Remove(value); - if(callbackList.Count == 0) - { - Windows_Kinect_InfraredFrameReader_add_PropertyChanged(_pNative, Windows_Data_PropertyChangedEventArgs_Delegate_Handler, true); - _Windows_Data_PropertyChangedEventArgs_Delegate_Handle.Free(); - } - } - } - } - - - // Public Methods - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern RootSystem.IntPtr Windows_Kinect_InfraredFrameReader_AcquireLatestFrame(RootSystem.IntPtr pNative); - public Windows.Kinect.InfraredFrame AcquireLatestFrame() - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("InfraredFrameReader"); - } - - RootSystem.IntPtr objectPointer = Windows_Kinect_InfraredFrameReader_AcquireLatestFrame(_pNative); - Helper.ExceptionHelper.CheckLastError(); - if (objectPointer == RootSystem.IntPtr.Zero) - { - return null; - } - - return Helper.NativeObjectCache.CreateOrGetObject(objectPointer, n => new Windows.Kinect.InfraredFrame(n)); - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_InfraredFrameReader_Dispose(RootSystem.IntPtr pNative); - public void Dispose() - { - if (_pNative == RootSystem.IntPtr.Zero) - { - return; - } - - Dispose(true); - RootSystem.GC.SuppressFinalize(this); - } - - private void __EventCleanup() - { - { - Windows_Kinect_InfraredFrameArrivedEventArgs_Delegate_callbacks.TryAddDefault(_pNative); - var callbackList = Windows_Kinect_InfraredFrameArrivedEventArgs_Delegate_callbacks[_pNative]; - lock (callbackList) - { - if (callbackList.Count > 0) - { - callbackList.Clear(); - if (_pNative != RootSystem.IntPtr.Zero) - { - Windows_Kinect_InfraredFrameReader_add_FrameArrived(_pNative, Windows_Kinect_InfraredFrameArrivedEventArgs_Delegate_Handler, true); - } - _Windows_Kinect_InfraredFrameArrivedEventArgs_Delegate_Handle.Free(); - } - } - } - { - Windows_Data_PropertyChangedEventArgs_Delegate_callbacks.TryAddDefault(_pNative); - var callbackList = Windows_Data_PropertyChangedEventArgs_Delegate_callbacks[_pNative]; - lock (callbackList) - { - if (callbackList.Count > 0) - { - callbackList.Clear(); - if (_pNative != RootSystem.IntPtr.Zero) - { - Windows_Kinect_InfraredFrameReader_add_PropertyChanged(_pNative, Windows_Data_PropertyChangedEventArgs_Delegate_Handler, true); - } - _Windows_Data_PropertyChangedEventArgs_Delegate_Handle.Free(); - } - } - } - } - } - -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/InfraredFrameReader.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/InfraredFrameReader.cs.meta deleted file mode 100644 index 0d7e833..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/InfraredFrameReader.cs.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 0937005bb1a679a40a0bffab4f8fa84b -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/InfraredFrameReference.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/InfraredFrameReference.cs deleted file mode 100644 index 38d5466..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/InfraredFrameReference.cs +++ /dev/null @@ -1,89 +0,0 @@ -using RootSystem = System; -using System.Linq; -using System.Collections.Generic; -namespace Windows.Kinect -{ - // - // Windows.Kinect.InfraredFrameReference - // - public sealed partial class InfraredFrameReference : Helper.INativeWrapper - - { - internal RootSystem.IntPtr _pNative; - RootSystem.IntPtr Helper.INativeWrapper.nativePtr { get { return _pNative; } } - - // Constructors and Finalizers - internal InfraredFrameReference(RootSystem.IntPtr pNative) - { - _pNative = pNative; - Windows_Kinect_InfraredFrameReference_AddRefObject(ref _pNative); - } - - ~InfraredFrameReference() - { - Dispose(false); - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_InfraredFrameReference_ReleaseObject(ref RootSystem.IntPtr pNative); - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_InfraredFrameReference_AddRefObject(ref RootSystem.IntPtr pNative); - private void Dispose(bool disposing) - { - if (_pNative == RootSystem.IntPtr.Zero) - { - return; - } - - __EventCleanup(); - - Helper.NativeObjectCache.RemoveObject(_pNative); - Windows_Kinect_InfraredFrameReference_ReleaseObject(ref _pNative); - - _pNative = RootSystem.IntPtr.Zero; - } - - - // Public Properties - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern long Windows_Kinect_InfraredFrameReference_get_RelativeTime(RootSystem.IntPtr pNative); - public RootSystem.TimeSpan RelativeTime - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("InfraredFrameReference"); - } - - return RootSystem.TimeSpan.FromMilliseconds(Windows_Kinect_InfraredFrameReference_get_RelativeTime(_pNative)); - } - } - - - // Public Methods - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern RootSystem.IntPtr Windows_Kinect_InfraredFrameReference_AcquireFrame(RootSystem.IntPtr pNative); - public Windows.Kinect.InfraredFrame AcquireFrame() - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("InfraredFrameReference"); - } - - RootSystem.IntPtr objectPointer = Windows_Kinect_InfraredFrameReference_AcquireFrame(_pNative); - Helper.ExceptionHelper.CheckLastError(); - if (objectPointer == RootSystem.IntPtr.Zero) - { - return null; - } - - return Helper.NativeObjectCache.CreateOrGetObject(objectPointer, n => new Windows.Kinect.InfraredFrame(n)); - } - - private void __EventCleanup() - { - } - } - -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/InfraredFrameReference.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/InfraredFrameReference.cs.meta deleted file mode 100644 index e9a1dd0..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/InfraredFrameReference.cs.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 89acda427f65cc64dbe156710db8760f -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/InfraredFrameSource.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/InfraredFrameSource.cs deleted file mode 100644 index 45e150b..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/InfraredFrameSource.cs +++ /dev/null @@ -1,289 +0,0 @@ -using RootSystem = System; -using System.Linq; -using System.Collections.Generic; -namespace Windows.Kinect -{ - // - // Windows.Kinect.InfraredFrameSource - // - public sealed partial class InfraredFrameSource : Helper.INativeWrapper - - { - internal RootSystem.IntPtr _pNative; - RootSystem.IntPtr Helper.INativeWrapper.nativePtr { get { return _pNative; } } - - // Constructors and Finalizers - internal InfraredFrameSource(RootSystem.IntPtr pNative) - { - _pNative = pNative; - Windows_Kinect_InfraredFrameSource_AddRefObject(ref _pNative); - } - - ~InfraredFrameSource() - { - Dispose(false); - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_InfraredFrameSource_ReleaseObject(ref RootSystem.IntPtr pNative); - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_InfraredFrameSource_AddRefObject(ref RootSystem.IntPtr pNative); - private void Dispose(bool disposing) - { - if (_pNative == RootSystem.IntPtr.Zero) - { - return; - } - - __EventCleanup(); - - Helper.NativeObjectCache.RemoveObject(_pNative); - Windows_Kinect_InfraredFrameSource_ReleaseObject(ref _pNative); - - _pNative = RootSystem.IntPtr.Zero; - } - - - // Public Properties - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern RootSystem.IntPtr Windows_Kinect_InfraredFrameSource_get_FrameDescription(RootSystem.IntPtr pNative); - public Windows.Kinect.FrameDescription FrameDescription - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("InfraredFrameSource"); - } - - RootSystem.IntPtr objectPointer = Windows_Kinect_InfraredFrameSource_get_FrameDescription(_pNative); - Helper.ExceptionHelper.CheckLastError(); - if (objectPointer == RootSystem.IntPtr.Zero) - { - return null; - } - - return Helper.NativeObjectCache.CreateOrGetObject(objectPointer, n => new Windows.Kinect.FrameDescription(n)); - } - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern bool Windows_Kinect_InfraredFrameSource_get_IsActive(RootSystem.IntPtr pNative); - public bool IsActive - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("InfraredFrameSource"); - } - - return Windows_Kinect_InfraredFrameSource_get_IsActive(_pNative); - } - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern RootSystem.IntPtr Windows_Kinect_InfraredFrameSource_get_KinectSensor(RootSystem.IntPtr pNative); - public Windows.Kinect.KinectSensor KinectSensor - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("InfraredFrameSource"); - } - - RootSystem.IntPtr objectPointer = Windows_Kinect_InfraredFrameSource_get_KinectSensor(_pNative); - Helper.ExceptionHelper.CheckLastError(); - if (objectPointer == RootSystem.IntPtr.Zero) - { - return null; - } - - return Helper.NativeObjectCache.CreateOrGetObject(objectPointer, n => new Windows.Kinect.KinectSensor(n)); - } - } - - - // Events - private static RootSystem.Runtime.InteropServices.GCHandle _Windows_Kinect_FrameCapturedEventArgs_Delegate_Handle; - [RootSystem.Runtime.InteropServices.UnmanagedFunctionPointer(RootSystem.Runtime.InteropServices.CallingConvention.Cdecl)] - private delegate void _Windows_Kinect_FrameCapturedEventArgs_Delegate(RootSystem.IntPtr args, RootSystem.IntPtr pNative); - private static Helper.CollectionMap>> Windows_Kinect_FrameCapturedEventArgs_Delegate_callbacks = new Helper.CollectionMap>>(); - [AOT.MonoPInvokeCallbackAttribute(typeof(_Windows_Kinect_FrameCapturedEventArgs_Delegate))] - private static void Windows_Kinect_FrameCapturedEventArgs_Delegate_Handler(RootSystem.IntPtr result, RootSystem.IntPtr pNative) - { - List> callbackList = null; - Windows_Kinect_FrameCapturedEventArgs_Delegate_callbacks.TryGetValue(pNative, out callbackList); - lock(callbackList) - { - var objThis = Helper.NativeObjectCache.GetObject(pNative); - var args = new Windows.Kinect.FrameCapturedEventArgs(result); - foreach(var func in callbackList) - { - Helper.EventPump.Instance.Enqueue(() => { try { func(objThis, args); } catch { } }); - } - } - } - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_InfraredFrameSource_add_FrameCaptured(RootSystem.IntPtr pNative, _Windows_Kinect_FrameCapturedEventArgs_Delegate eventCallback, bool unsubscribe); - public event RootSystem.EventHandler FrameCaptured - { - add - { - Helper.EventPump.EnsureInitialized(); - - Windows_Kinect_FrameCapturedEventArgs_Delegate_callbacks.TryAddDefault(_pNative); - var callbackList = Windows_Kinect_FrameCapturedEventArgs_Delegate_callbacks[_pNative]; - lock (callbackList) - { - callbackList.Add(value); - if(callbackList.Count == 1) - { - var del = new _Windows_Kinect_FrameCapturedEventArgs_Delegate(Windows_Kinect_FrameCapturedEventArgs_Delegate_Handler); - _Windows_Kinect_FrameCapturedEventArgs_Delegate_Handle = RootSystem.Runtime.InteropServices.GCHandle.Alloc(del); - Windows_Kinect_InfraredFrameSource_add_FrameCaptured(_pNative, del, false); - } - } - } - remove - { - if (_pNative == RootSystem.IntPtr.Zero) - { - return; - } - - Windows_Kinect_FrameCapturedEventArgs_Delegate_callbacks.TryAddDefault(_pNative); - var callbackList = Windows_Kinect_FrameCapturedEventArgs_Delegate_callbacks[_pNative]; - lock (callbackList) - { - callbackList.Remove(value); - if(callbackList.Count == 0) - { - Windows_Kinect_InfraredFrameSource_add_FrameCaptured(_pNative, Windows_Kinect_FrameCapturedEventArgs_Delegate_Handler, true); - _Windows_Kinect_FrameCapturedEventArgs_Delegate_Handle.Free(); - } - } - } - } - - private static RootSystem.Runtime.InteropServices.GCHandle _Windows_Data_PropertyChangedEventArgs_Delegate_Handle; - [RootSystem.Runtime.InteropServices.UnmanagedFunctionPointer(RootSystem.Runtime.InteropServices.CallingConvention.Cdecl)] - private delegate void _Windows_Data_PropertyChangedEventArgs_Delegate(RootSystem.IntPtr args, RootSystem.IntPtr pNative); - private static Helper.CollectionMap>> Windows_Data_PropertyChangedEventArgs_Delegate_callbacks = new Helper.CollectionMap>>(); - [AOT.MonoPInvokeCallbackAttribute(typeof(_Windows_Data_PropertyChangedEventArgs_Delegate))] - private static void Windows_Data_PropertyChangedEventArgs_Delegate_Handler(RootSystem.IntPtr result, RootSystem.IntPtr pNative) - { - List> callbackList = null; - Windows_Data_PropertyChangedEventArgs_Delegate_callbacks.TryGetValue(pNative, out callbackList); - lock(callbackList) - { - var objThis = Helper.NativeObjectCache.GetObject(pNative); - var args = new Windows.Data.PropertyChangedEventArgs(result); - foreach(var func in callbackList) - { - Helper.EventPump.Instance.Enqueue(() => { try { func(objThis, args); } catch { } }); - } - } - } - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_InfraredFrameSource_add_PropertyChanged(RootSystem.IntPtr pNative, _Windows_Data_PropertyChangedEventArgs_Delegate eventCallback, bool unsubscribe); - public event RootSystem.EventHandler PropertyChanged - { - add - { - Helper.EventPump.EnsureInitialized(); - - Windows_Data_PropertyChangedEventArgs_Delegate_callbacks.TryAddDefault(_pNative); - var callbackList = Windows_Data_PropertyChangedEventArgs_Delegate_callbacks[_pNative]; - lock (callbackList) - { - callbackList.Add(value); - if(callbackList.Count == 1) - { - var del = new _Windows_Data_PropertyChangedEventArgs_Delegate(Windows_Data_PropertyChangedEventArgs_Delegate_Handler); - _Windows_Data_PropertyChangedEventArgs_Delegate_Handle = RootSystem.Runtime.InteropServices.GCHandle.Alloc(del); - Windows_Kinect_InfraredFrameSource_add_PropertyChanged(_pNative, del, false); - } - } - } - remove - { - if (_pNative == RootSystem.IntPtr.Zero) - { - return; - } - - Windows_Data_PropertyChangedEventArgs_Delegate_callbacks.TryAddDefault(_pNative); - var callbackList = Windows_Data_PropertyChangedEventArgs_Delegate_callbacks[_pNative]; - lock (callbackList) - { - callbackList.Remove(value); - if(callbackList.Count == 0) - { - Windows_Kinect_InfraredFrameSource_add_PropertyChanged(_pNative, Windows_Data_PropertyChangedEventArgs_Delegate_Handler, true); - _Windows_Data_PropertyChangedEventArgs_Delegate_Handle.Free(); - } - } - } - } - - - // Public Methods - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern RootSystem.IntPtr Windows_Kinect_InfraredFrameSource_OpenReader(RootSystem.IntPtr pNative); - public Windows.Kinect.InfraredFrameReader OpenReader() - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("InfraredFrameSource"); - } - - RootSystem.IntPtr objectPointer = Windows_Kinect_InfraredFrameSource_OpenReader(_pNative); - Helper.ExceptionHelper.CheckLastError(); - if (objectPointer == RootSystem.IntPtr.Zero) - { - return null; - } - - return Helper.NativeObjectCache.CreateOrGetObject(objectPointer, n => new Windows.Kinect.InfraredFrameReader(n)); - } - - private void __EventCleanup() - { - { - Windows_Kinect_FrameCapturedEventArgs_Delegate_callbacks.TryAddDefault(_pNative); - var callbackList = Windows_Kinect_FrameCapturedEventArgs_Delegate_callbacks[_pNative]; - lock (callbackList) - { - if (callbackList.Count > 0) - { - callbackList.Clear(); - if (_pNative != RootSystem.IntPtr.Zero) - { - Windows_Kinect_InfraredFrameSource_add_FrameCaptured(_pNative, Windows_Kinect_FrameCapturedEventArgs_Delegate_Handler, true); - } - _Windows_Kinect_FrameCapturedEventArgs_Delegate_Handle.Free(); - } - } - } - { - Windows_Data_PropertyChangedEventArgs_Delegate_callbacks.TryAddDefault(_pNative); - var callbackList = Windows_Data_PropertyChangedEventArgs_Delegate_callbacks[_pNative]; - lock (callbackList) - { - if (callbackList.Count > 0) - { - callbackList.Clear(); - if (_pNative != RootSystem.IntPtr.Zero) - { - Windows_Kinect_InfraredFrameSource_add_PropertyChanged(_pNative, Windows_Data_PropertyChangedEventArgs_Delegate_Handler, true); - } - _Windows_Data_PropertyChangedEventArgs_Delegate_Handle.Free(); - } - } - } - } - } - -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/InfraredFrameSource.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/InfraredFrameSource.cs.meta deleted file mode 100644 index 04dfe5f..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/InfraredFrameSource.cs.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 8b41da8047304434eb12d404c2f99979 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/IsAvailableChangedEventArgs.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/IsAvailableChangedEventArgs.cs deleted file mode 100644 index 981c366..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/IsAvailableChangedEventArgs.cs +++ /dev/null @@ -1,68 +0,0 @@ -using RootSystem = System; -using System.Linq; -using System.Collections.Generic; -namespace Windows.Kinect -{ - // - // Windows.Kinect.IsAvailableChangedEventArgs - // - public sealed partial class IsAvailableChangedEventArgs : RootSystem.EventArgs, Helper.INativeWrapper - - { - internal RootSystem.IntPtr _pNative; - RootSystem.IntPtr Helper.INativeWrapper.nativePtr { get { return _pNative; } } - - // Constructors and Finalizers - internal IsAvailableChangedEventArgs(RootSystem.IntPtr pNative) - { - _pNative = pNative; - Windows_Kinect_IsAvailableChangedEventArgs_AddRefObject(ref _pNative); - } - - ~IsAvailableChangedEventArgs() - { - Dispose(false); - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_IsAvailableChangedEventArgs_ReleaseObject(ref RootSystem.IntPtr pNative); - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_IsAvailableChangedEventArgs_AddRefObject(ref RootSystem.IntPtr pNative); - private void Dispose(bool disposing) - { - if (_pNative == RootSystem.IntPtr.Zero) - { - return; - } - - __EventCleanup(); - - Helper.NativeObjectCache.RemoveObject(_pNative); - Windows_Kinect_IsAvailableChangedEventArgs_ReleaseObject(ref _pNative); - - _pNative = RootSystem.IntPtr.Zero; - } - - - // Public Properties - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern bool Windows_Kinect_IsAvailableChangedEventArgs_get_IsAvailable(RootSystem.IntPtr pNative); - public bool IsAvailable - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("IsAvailableChangedEventArgs"); - } - - return Windows_Kinect_IsAvailableChangedEventArgs_get_IsAvailable(_pNative); - } - } - - private void __EventCleanup() - { - } - } - -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/IsAvailableChangedEventArgs.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/IsAvailableChangedEventArgs.cs.meta deleted file mode 100644 index cea9771..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/IsAvailableChangedEventArgs.cs.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 65a7600b04976b84db9c9ec171a5d71f -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/Joint.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/Joint.cs deleted file mode 100644 index 419ea98..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/Joint.cs +++ /dev/null @@ -1,47 +0,0 @@ -using RootSystem = System; -using System.Linq; -using System.Collections.Generic; -namespace Windows.Kinect -{ - // - // Windows.Kinect.Joint - // - [RootSystem.Runtime.InteropServices.StructLayout(RootSystem.Runtime.InteropServices.LayoutKind.Sequential)] - public struct Joint - { - public Windows.Kinect.JointType JointType { get; set; } - public Windows.Kinect.CameraSpacePoint Position { get; set; } - public Windows.Kinect.TrackingState TrackingState { get; set; } - - public override int GetHashCode() - { - return JointType.GetHashCode() ^ Position.GetHashCode() ^ TrackingState.GetHashCode(); - } - - public override bool Equals(object obj) - { - if (!(obj is Joint)) - { - return false; - } - - return this.Equals((Joint)obj); - } - - public bool Equals(Joint obj) - { - return JointType.Equals(obj.JointType) && Position.Equals(obj.Position) && TrackingState.Equals(obj.TrackingState); - } - - public static bool operator ==(Joint a, Joint b) - { - return a.Equals(b); - } - - public static bool operator !=(Joint a, Joint b) - { - return !(a.Equals(b)); - } - } - -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/Joint.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/Joint.cs.meta deleted file mode 100644 index dd7d318..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/Joint.cs.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: c6ab2966f653a9b439da02f3ae85c867 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/JointOrientation.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/JointOrientation.cs deleted file mode 100644 index 03e2fd8..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/JointOrientation.cs +++ /dev/null @@ -1,46 +0,0 @@ -using RootSystem = System; -using System.Linq; -using System.Collections.Generic; -namespace Windows.Kinect -{ - // - // Windows.Kinect.JointOrientation - // - [RootSystem.Runtime.InteropServices.StructLayout(RootSystem.Runtime.InteropServices.LayoutKind.Sequential)] - public struct JointOrientation - { - public Windows.Kinect.JointType JointType { get; set; } - public Windows.Kinect.Vector4 Orientation { get; set; } - - public override int GetHashCode() - { - return JointType.GetHashCode() ^ Orientation.GetHashCode(); - } - - public override bool Equals(object obj) - { - if (!(obj is JointOrientation)) - { - return false; - } - - return this.Equals((JointOrientation)obj); - } - - public bool Equals(JointOrientation obj) - { - return JointType.Equals(obj.JointType) && Orientation.Equals(obj.Orientation); - } - - public static bool operator ==(JointOrientation a, JointOrientation b) - { - return a.Equals(b); - } - - public static bool operator !=(JointOrientation a, JointOrientation b) - { - return !(a.Equals(b)); - } - } - -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/JointOrientation.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/JointOrientation.cs.meta deleted file mode 100644 index 1edbe03..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/JointOrientation.cs.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: d616618770c2c84469f5aaa5f72ca2ca -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/JointType.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/JointType.cs deleted file mode 100644 index 4f3f3bf..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/JointType.cs +++ /dev/null @@ -1,38 +0,0 @@ -using RootSystem = System; -using System.Linq; -using System.Collections.Generic; -namespace Windows.Kinect -{ - // - // Windows.Kinect.JointType - // - public enum JointType : int - { - SpineBase =0, - SpineMid =1, - Neck =2, - Head =3, - ShoulderLeft =4, - ElbowLeft =5, - WristLeft =6, - HandLeft =7, - ShoulderRight =8, - ElbowRight =9, - WristRight =10, - HandRight =11, - HipLeft =12, - KneeLeft =13, - AnkleLeft =14, - FootLeft =15, - HipRight =16, - KneeRight =17, - AnkleRight =18, - FootRight =19, - SpineShoulder =20, - HandTipLeft =21, - ThumbLeft =22, - HandTipRight =23, - ThumbRight =24, - } - -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/JointType.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/JointType.cs.meta deleted file mode 100644 index 537cbbb..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/JointType.cs.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 1791e2ee3f5ea1343a2694b4e1b3f00f -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/KinectAudioCalibrationState.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/KinectAudioCalibrationState.cs deleted file mode 100644 index d259d22..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/KinectAudioCalibrationState.cs +++ /dev/null @@ -1,16 +0,0 @@ -using RootSystem = System; -using System.Linq; -using System.Collections.Generic; -namespace Windows.Kinect -{ - // - // Windows.Kinect.KinectAudioCalibrationState - // - public enum KinectAudioCalibrationState : int - { - Unknown =0, - CalibrationRequired =1, - Calibrated =2, - } - -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/KinectAudioCalibrationState.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/KinectAudioCalibrationState.cs.meta deleted file mode 100644 index a5f0137..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/KinectAudioCalibrationState.cs.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 87d856dfd833c524381664b12e58813a -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/KinectBuffer.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/KinectBuffer.cs deleted file mode 100644 index c62cb42..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/KinectBuffer.cs +++ /dev/null @@ -1,129 +0,0 @@ -using RootSystem = System; -using System; -using System.Collections.Generic; -using System.Runtime.InteropServices; - -namespace Windows.Kinect -{ - // NOTE: This uses an IBuffer under the covers, it is renamed here to give parity to our managed APIs. - public class KinectBuffer : Helper.INativeWrapper, IDisposable - { - internal RootSystem.IntPtr _pNative; - - RootSystem.IntPtr Helper.INativeWrapper.nativePtr { get { return _pNative; } } - - // Constructors and Finalizers - internal KinectBuffer(RootSystem.IntPtr pNative) - { - _pNative = pNative; - Windows_Storage_Streams_IBuffer_AddRefObject(ref _pNative); - } - - ~KinectBuffer() - { - Dispose(false); - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention = RootSystem.Runtime.InteropServices.CallingConvention.Cdecl)] - private static extern void Windows_Storage_Streams_IBuffer_ReleaseObject(ref RootSystem.IntPtr pNative); - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention = RootSystem.Runtime.InteropServices.CallingConvention.Cdecl)] - private static extern void Windows_Storage_Streams_IBuffer_AddRefObject(ref RootSystem.IntPtr pNative); - private void Dispose(bool disposing) - { - if (_pNative == RootSystem.IntPtr.Zero) - { - return; - } - - Helper.NativeObjectCache.RemoveObject(_pNative); - - if (disposing) - { - Windows_Storage_Streams_IBuffer_Dispose(_pNative); - } - - Windows_Storage_Streams_IBuffer_ReleaseObject(ref _pNative); - - _pNative = RootSystem.IntPtr.Zero; - } - - - // Public Properties - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention = RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError = true)] - private static extern uint Windows_Storage_Streams_IBuffer_get_Capacity(RootSystem.IntPtr pNative); - public uint Capacity - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("KinectBuffer"); - } - - uint capacity = Windows_Storage_Streams_IBuffer_get_Capacity(_pNative); - Helper.ExceptionHelper.CheckLastError(); - return capacity; - } - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention = RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError = true)] - private static extern uint Windows_Storage_Streams_IBuffer_get_Length(RootSystem.IntPtr pNative); - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention = RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError = true)] - private static extern void Windows_Storage_Streams_IBuffer_put_Length(RootSystem.IntPtr pNative, uint value); - public uint Length - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("KinectBuffer"); - } - - uint length = Windows_Storage_Streams_IBuffer_get_Length(_pNative); - Helper.ExceptionHelper.CheckLastError(); - return length; - } - set - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("KinectBuffer"); - } - - Windows_Storage_Streams_IBuffer_put_Length(_pNative, value); - Helper.ExceptionHelper.CheckLastError(); - } - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention = RootSystem.Runtime.InteropServices.CallingConvention.Cdecl)] - private static extern void Windows_Storage_Streams_IBuffer_Dispose(RootSystem.IntPtr pNative); - // Constructors and Finalizers - public void Dispose() - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("KinectBuffer"); - } - - Dispose(true); - RootSystem.GC.SuppressFinalize(this); - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention = RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError = true)] - private static extern RootSystem.IntPtr Windows_Storage_Streams_IBuffer_get_UnderlyingBuffer(RootSystem.IntPtr pNative); - public IntPtr UnderlyingBuffer - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("KinectBuffer"); - } - - RootSystem.IntPtr value = Windows_Storage_Streams_IBuffer_get_UnderlyingBuffer(_pNative); - Helper.ExceptionHelper.CheckLastError(); - return value; - } - } - } -} \ No newline at end of file diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/KinectBuffer.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/KinectBuffer.cs.meta deleted file mode 100644 index 0e2c2d0..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/KinectBuffer.cs.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: a27f97f1b27134f4bbee290cf18c791c -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/KinectCapabilities.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/KinectCapabilities.cs deleted file mode 100644 index ab516af..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/KinectCapabilities.cs +++ /dev/null @@ -1,20 +0,0 @@ -using RootSystem = System; -using System.Linq; -using System.Collections.Generic; -namespace Windows.Kinect -{ - // - // Windows.Kinect.KinectCapabilities - // - [RootSystem.Flags] - public enum KinectCapabilities : uint - { - None =0, - Vision =1, - Audio =2, - Face =4, - Expressions =8, - Gamechat =16, - } - -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/KinectCapabilities.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/KinectCapabilities.cs.meta deleted file mode 100644 index 05181f5..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/KinectCapabilities.cs.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 6dcba0f7ec870d94c849f4d8ed860377 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/KinectSensor.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/KinectSensor.cs deleted file mode 100644 index 9b41cf3..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/KinectSensor.cs +++ /dev/null @@ -1,498 +0,0 @@ -using RootSystem = System; -using System.Linq; -using System.Collections.Generic; -namespace Windows.Kinect -{ - // - // Windows.Kinect.KinectSensor - // - public sealed partial class KinectSensor : Helper.INativeWrapper - - { - internal RootSystem.IntPtr _pNative; - RootSystem.IntPtr Helper.INativeWrapper.nativePtr { get { return _pNative; } } - - // Constructors and Finalizers - internal KinectSensor(RootSystem.IntPtr pNative) - { - _pNative = pNative; - Windows_Kinect_KinectSensor_AddRefObject(ref _pNative); - } - - ~KinectSensor() - { - Dispose(false); - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_KinectSensor_ReleaseObject(ref RootSystem.IntPtr pNative); - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_KinectSensor_AddRefObject(ref RootSystem.IntPtr pNative); - - // Public Properties - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern RootSystem.IntPtr Windows_Kinect_KinectSensor_get_AudioSource(RootSystem.IntPtr pNative); - public Windows.Kinect.AudioSource AudioSource - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("KinectSensor"); - } - - RootSystem.IntPtr objectPointer = Windows_Kinect_KinectSensor_get_AudioSource(_pNative); - Helper.ExceptionHelper.CheckLastError(); - if (objectPointer == RootSystem.IntPtr.Zero) - { - return null; - } - - return Helper.NativeObjectCache.CreateOrGetObject(objectPointer, n => new Windows.Kinect.AudioSource(n)); - } - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern RootSystem.IntPtr Windows_Kinect_KinectSensor_get_BodyFrameSource(RootSystem.IntPtr pNative); - public Windows.Kinect.BodyFrameSource BodyFrameSource - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("KinectSensor"); - } - - RootSystem.IntPtr objectPointer = Windows_Kinect_KinectSensor_get_BodyFrameSource(_pNative); - Helper.ExceptionHelper.CheckLastError(); - if (objectPointer == RootSystem.IntPtr.Zero) - { - return null; - } - - return Helper.NativeObjectCache.CreateOrGetObject(objectPointer, n => new Windows.Kinect.BodyFrameSource(n)); - } - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern RootSystem.IntPtr Windows_Kinect_KinectSensor_get_BodyIndexFrameSource(RootSystem.IntPtr pNative); - public Windows.Kinect.BodyIndexFrameSource BodyIndexFrameSource - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("KinectSensor"); - } - - RootSystem.IntPtr objectPointer = Windows_Kinect_KinectSensor_get_BodyIndexFrameSource(_pNative); - Helper.ExceptionHelper.CheckLastError(); - if (objectPointer == RootSystem.IntPtr.Zero) - { - return null; - } - - return Helper.NativeObjectCache.CreateOrGetObject(objectPointer, n => new Windows.Kinect.BodyIndexFrameSource(n)); - } - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern RootSystem.IntPtr Windows_Kinect_KinectSensor_get_ColorFrameSource(RootSystem.IntPtr pNative); - public Windows.Kinect.ColorFrameSource ColorFrameSource - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("KinectSensor"); - } - - RootSystem.IntPtr objectPointer = Windows_Kinect_KinectSensor_get_ColorFrameSource(_pNative); - Helper.ExceptionHelper.CheckLastError(); - if (objectPointer == RootSystem.IntPtr.Zero) - { - return null; - } - - return Helper.NativeObjectCache.CreateOrGetObject(objectPointer, n => new Windows.Kinect.ColorFrameSource(n)); - } - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern RootSystem.IntPtr Windows_Kinect_KinectSensor_get_CoordinateMapper(RootSystem.IntPtr pNative); - public Windows.Kinect.CoordinateMapper CoordinateMapper - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("KinectSensor"); - } - - RootSystem.IntPtr objectPointer = Windows_Kinect_KinectSensor_get_CoordinateMapper(_pNative); - Helper.ExceptionHelper.CheckLastError(); - if (objectPointer == RootSystem.IntPtr.Zero) - { - return null; - } - - return Helper.NativeObjectCache.CreateOrGetObject(objectPointer, n => new Windows.Kinect.CoordinateMapper(n)); - } - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern RootSystem.IntPtr Windows_Kinect_KinectSensor_get_DepthFrameSource(RootSystem.IntPtr pNative); - public Windows.Kinect.DepthFrameSource DepthFrameSource - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("KinectSensor"); - } - - RootSystem.IntPtr objectPointer = Windows_Kinect_KinectSensor_get_DepthFrameSource(_pNative); - Helper.ExceptionHelper.CheckLastError(); - if (objectPointer == RootSystem.IntPtr.Zero) - { - return null; - } - - return Helper.NativeObjectCache.CreateOrGetObject(objectPointer, n => new Windows.Kinect.DepthFrameSource(n)); - } - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern RootSystem.IntPtr Windows_Kinect_KinectSensor_get_InfraredFrameSource(RootSystem.IntPtr pNative); - public Windows.Kinect.InfraredFrameSource InfraredFrameSource - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("KinectSensor"); - } - - RootSystem.IntPtr objectPointer = Windows_Kinect_KinectSensor_get_InfraredFrameSource(_pNative); - Helper.ExceptionHelper.CheckLastError(); - if (objectPointer == RootSystem.IntPtr.Zero) - { - return null; - } - - return Helper.NativeObjectCache.CreateOrGetObject(objectPointer, n => new Windows.Kinect.InfraredFrameSource(n)); - } - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern bool Windows_Kinect_KinectSensor_get_IsAvailable(RootSystem.IntPtr pNative); - public bool IsAvailable - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("KinectSensor"); - } - - return Windows_Kinect_KinectSensor_get_IsAvailable(_pNative); - } - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern bool Windows_Kinect_KinectSensor_get_IsOpen(RootSystem.IntPtr pNative); - public bool IsOpen - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("KinectSensor"); - } - - return Windows_Kinect_KinectSensor_get_IsOpen(_pNative); - } - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern Windows.Kinect.KinectCapabilities Windows_Kinect_KinectSensor_get_KinectCapabilities(RootSystem.IntPtr pNative); - public Windows.Kinect.KinectCapabilities KinectCapabilities - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("KinectSensor"); - } - - return Windows_Kinect_KinectSensor_get_KinectCapabilities(_pNative); - } - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern RootSystem.IntPtr Windows_Kinect_KinectSensor_get_LongExposureInfraredFrameSource(RootSystem.IntPtr pNative); - public Windows.Kinect.LongExposureInfraredFrameSource LongExposureInfraredFrameSource - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("KinectSensor"); - } - - RootSystem.IntPtr objectPointer = Windows_Kinect_KinectSensor_get_LongExposureInfraredFrameSource(_pNative); - Helper.ExceptionHelper.CheckLastError(); - if (objectPointer == RootSystem.IntPtr.Zero) - { - return null; - } - - return Helper.NativeObjectCache.CreateOrGetObject(objectPointer, n => new Windows.Kinect.LongExposureInfraredFrameSource(n)); - } - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern RootSystem.IntPtr Windows_Kinect_KinectSensor_get_UniqueKinectId(RootSystem.IntPtr pNative); - public string UniqueKinectId - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("KinectSensor"); - } - - RootSystem.IntPtr objectPointer = Windows_Kinect_KinectSensor_get_UniqueKinectId(_pNative); - Helper.ExceptionHelper.CheckLastError(); - - var managedString = RootSystem.Runtime.InteropServices.Marshal.PtrToStringUni(objectPointer); - RootSystem.Runtime.InteropServices.Marshal.FreeCoTaskMem(objectPointer); - return managedString; - } - } - - - // Events - private static RootSystem.Runtime.InteropServices.GCHandle _Windows_Kinect_IsAvailableChangedEventArgs_Delegate_Handle; - [RootSystem.Runtime.InteropServices.UnmanagedFunctionPointer(RootSystem.Runtime.InteropServices.CallingConvention.Cdecl)] - private delegate void _Windows_Kinect_IsAvailableChangedEventArgs_Delegate(RootSystem.IntPtr args, RootSystem.IntPtr pNative); - private static Helper.CollectionMap>> Windows_Kinect_IsAvailableChangedEventArgs_Delegate_callbacks = new Helper.CollectionMap>>(); - [AOT.MonoPInvokeCallbackAttribute(typeof(_Windows_Kinect_IsAvailableChangedEventArgs_Delegate))] - private static void Windows_Kinect_IsAvailableChangedEventArgs_Delegate_Handler(RootSystem.IntPtr result, RootSystem.IntPtr pNative) - { - List> callbackList = null; - Windows_Kinect_IsAvailableChangedEventArgs_Delegate_callbacks.TryGetValue(pNative, out callbackList); - lock(callbackList) - { - var objThis = Helper.NativeObjectCache.GetObject(pNative); - var args = new Windows.Kinect.IsAvailableChangedEventArgs(result); - foreach(var func in callbackList) - { - Helper.EventPump.Instance.Enqueue(() => { try { func(objThis, args); } catch { } }); - } - } - } - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_KinectSensor_add_IsAvailableChanged(RootSystem.IntPtr pNative, _Windows_Kinect_IsAvailableChangedEventArgs_Delegate eventCallback, bool unsubscribe); - public event RootSystem.EventHandler IsAvailableChanged - { - add - { - Helper.EventPump.EnsureInitialized(); - - Windows_Kinect_IsAvailableChangedEventArgs_Delegate_callbacks.TryAddDefault(_pNative); - var callbackList = Windows_Kinect_IsAvailableChangedEventArgs_Delegate_callbacks[_pNative]; - lock (callbackList) - { - callbackList.Add(value); - if(callbackList.Count == 1) - { - var del = new _Windows_Kinect_IsAvailableChangedEventArgs_Delegate(Windows_Kinect_IsAvailableChangedEventArgs_Delegate_Handler); - _Windows_Kinect_IsAvailableChangedEventArgs_Delegate_Handle = RootSystem.Runtime.InteropServices.GCHandle.Alloc(del); - Windows_Kinect_KinectSensor_add_IsAvailableChanged(_pNative, del, false); - } - } - } - remove - { - if (_pNative == RootSystem.IntPtr.Zero) - { - return; - } - - Windows_Kinect_IsAvailableChangedEventArgs_Delegate_callbacks.TryAddDefault(_pNative); - var callbackList = Windows_Kinect_IsAvailableChangedEventArgs_Delegate_callbacks[_pNative]; - lock (callbackList) - { - callbackList.Remove(value); - if(callbackList.Count == 0) - { - Windows_Kinect_KinectSensor_add_IsAvailableChanged(_pNative, Windows_Kinect_IsAvailableChangedEventArgs_Delegate_Handler, true); - _Windows_Kinect_IsAvailableChangedEventArgs_Delegate_Handle.Free(); - } - } - } - } - - private static RootSystem.Runtime.InteropServices.GCHandle _Windows_Data_PropertyChangedEventArgs_Delegate_Handle; - [RootSystem.Runtime.InteropServices.UnmanagedFunctionPointer(RootSystem.Runtime.InteropServices.CallingConvention.Cdecl)] - private delegate void _Windows_Data_PropertyChangedEventArgs_Delegate(RootSystem.IntPtr args, RootSystem.IntPtr pNative); - private static Helper.CollectionMap>> Windows_Data_PropertyChangedEventArgs_Delegate_callbacks = new Helper.CollectionMap>>(); - [AOT.MonoPInvokeCallbackAttribute(typeof(_Windows_Data_PropertyChangedEventArgs_Delegate))] - private static void Windows_Data_PropertyChangedEventArgs_Delegate_Handler(RootSystem.IntPtr result, RootSystem.IntPtr pNative) - { - List> callbackList = null; - Windows_Data_PropertyChangedEventArgs_Delegate_callbacks.TryGetValue(pNative, out callbackList); - lock(callbackList) - { - var objThis = Helper.NativeObjectCache.GetObject(pNative); - var args = new Windows.Data.PropertyChangedEventArgs(result); - foreach(var func in callbackList) - { - Helper.EventPump.Instance.Enqueue(() => { try { func(objThis, args); } catch { } }); - } - } - } - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_KinectSensor_add_PropertyChanged(RootSystem.IntPtr pNative, _Windows_Data_PropertyChangedEventArgs_Delegate eventCallback, bool unsubscribe); - public event RootSystem.EventHandler PropertyChanged - { - add - { - Helper.EventPump.EnsureInitialized(); - - Windows_Data_PropertyChangedEventArgs_Delegate_callbacks.TryAddDefault(_pNative); - var callbackList = Windows_Data_PropertyChangedEventArgs_Delegate_callbacks[_pNative]; - lock (callbackList) - { - callbackList.Add(value); - if(callbackList.Count == 1) - { - var del = new _Windows_Data_PropertyChangedEventArgs_Delegate(Windows_Data_PropertyChangedEventArgs_Delegate_Handler); - _Windows_Data_PropertyChangedEventArgs_Delegate_Handle = RootSystem.Runtime.InteropServices.GCHandle.Alloc(del); - Windows_Kinect_KinectSensor_add_PropertyChanged(_pNative, del, false); - } - } - } - remove - { - if (_pNative == RootSystem.IntPtr.Zero) - { - return; - } - - Windows_Data_PropertyChangedEventArgs_Delegate_callbacks.TryAddDefault(_pNative); - var callbackList = Windows_Data_PropertyChangedEventArgs_Delegate_callbacks[_pNative]; - lock (callbackList) - { - callbackList.Remove(value); - if(callbackList.Count == 0) - { - Windows_Kinect_KinectSensor_add_PropertyChanged(_pNative, Windows_Data_PropertyChangedEventArgs_Delegate_Handler, true); - _Windows_Data_PropertyChangedEventArgs_Delegate_Handle.Free(); - } - } - } - } - - - // Static Methods - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern RootSystem.IntPtr Windows_Kinect_KinectSensor_GetDefault(); - public static Windows.Kinect.KinectSensor GetDefault() - { - RootSystem.IntPtr objectPointer = Windows_Kinect_KinectSensor_GetDefault(); - Helper.ExceptionHelper.CheckLastError(); - if (objectPointer == RootSystem.IntPtr.Zero) - { - return null; - } - - return Helper.NativeObjectCache.CreateOrGetObject(objectPointer, n => new Windows.Kinect.KinectSensor(n)); - } - - - // Public Methods - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_KinectSensor_Open(RootSystem.IntPtr pNative); - public void Open() - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("KinectSensor"); - } - - Windows_Kinect_KinectSensor_Open(_pNative); - Helper.ExceptionHelper.CheckLastError(); - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_KinectSensor_Close(RootSystem.IntPtr pNative); - public void Close() - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("KinectSensor"); - } - - Windows_Kinect_KinectSensor_Close(_pNative); - Helper.ExceptionHelper.CheckLastError(); - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern RootSystem.IntPtr Windows_Kinect_KinectSensor_OpenMultiSourceFrameReader(RootSystem.IntPtr pNative, Windows.Kinect.FrameSourceTypes enabledFrameSourceTypes); - public Windows.Kinect.MultiSourceFrameReader OpenMultiSourceFrameReader(Windows.Kinect.FrameSourceTypes enabledFrameSourceTypes) - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("KinectSensor"); - } - - RootSystem.IntPtr objectPointer = Windows_Kinect_KinectSensor_OpenMultiSourceFrameReader(_pNative, enabledFrameSourceTypes); - Helper.ExceptionHelper.CheckLastError(); - if (objectPointer == RootSystem.IntPtr.Zero) - { - return null; - } - - return Helper.NativeObjectCache.CreateOrGetObject(objectPointer, n => new Windows.Kinect.MultiSourceFrameReader(n)); - } - - private void __EventCleanup() - { - { - Windows_Kinect_IsAvailableChangedEventArgs_Delegate_callbacks.TryAddDefault(_pNative); - var callbackList = Windows_Kinect_IsAvailableChangedEventArgs_Delegate_callbacks[_pNative]; - lock (callbackList) - { - if (callbackList.Count > 0) - { - callbackList.Clear(); - if (_pNative != RootSystem.IntPtr.Zero) - { - Windows_Kinect_KinectSensor_add_IsAvailableChanged(_pNative, Windows_Kinect_IsAvailableChangedEventArgs_Delegate_Handler, true); - } - _Windows_Kinect_IsAvailableChangedEventArgs_Delegate_Handle.Free(); - } - } - } - { - Windows_Data_PropertyChangedEventArgs_Delegate_callbacks.TryAddDefault(_pNative); - var callbackList = Windows_Data_PropertyChangedEventArgs_Delegate_callbacks[_pNative]; - lock (callbackList) - { - if (callbackList.Count > 0) - { - callbackList.Clear(); - if (_pNative != RootSystem.IntPtr.Zero) - { - Windows_Kinect_KinectSensor_add_PropertyChanged(_pNative, Windows_Data_PropertyChangedEventArgs_Delegate_Handler, true); - } - _Windows_Data_PropertyChangedEventArgs_Delegate_Handle.Free(); - } - } - } - } - } - -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/KinectSensor.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/KinectSensor.cs.meta deleted file mode 100644 index bc14513..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/KinectSensor.cs.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: a5a5ec3f3f1b0064fae54e1512e12887 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/KinectSpecialCases.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/KinectSpecialCases.cs deleted file mode 100644 index 09a668b..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/KinectSpecialCases.cs +++ /dev/null @@ -1,604 +0,0 @@ -using RootSystem = System; -using System; -using System.Collections.Generic; -using System.Runtime.InteropServices; - -namespace Windows.Kinect -{ - [RootSystem.Runtime.InteropServices.StructLayout(RootSystem.Runtime.InteropServices.LayoutKind.Sequential)] - public struct PointF - { - public float X { get; set; } - public float Y { get; set; } - - public override int GetHashCode() - { - return X.GetHashCode() ^ Y.GetHashCode(); - } - - public override bool Equals(object obj) - { - if (!(obj is PointF)) - { - return false; - } - - return this.Equals((ColorSpacePoint)obj); - } - - public bool Equals(ColorSpacePoint obj) - { - return (X == obj.X) && (Y == obj.Y); - } - - public static bool operator ==(PointF a, PointF b) - { - return a.Equals(b); - } - - public static bool operator !=(PointF a, PointF b) - { - return !(a.Equals(b)); - } - } - - public sealed partial class AudioBeamSubFrame - { - [RootSystem.Runtime.InteropServices.DllImport( - "KinectUnityAddin", - EntryPoint = "Windows_Kinect_AudioBeamSubFrame_CopyFrameDataToArray", - CallingConvention = RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, - SetLastError = true)] - private static extern void Windows_Kinect_AudioBeamSubFrame_CopyFrameDataToIntPtr(RootSystem.IntPtr pNative, RootSystem.IntPtr frameData, uint frameDataSize); - public void CopyFrameDataToIntPtr(RootSystem.IntPtr frameData, uint size) - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("AudioBeamSubFrame"); - } - - Windows_Kinect_AudioBeamSubFrame_CopyFrameDataToIntPtr(_pNative, frameData, size); - Helper.ExceptionHelper.CheckLastError(); - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention = RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError = true)] - private static extern RootSystem.IntPtr Windows_Kinect_AudioBeamSubFrame_LockAudioBuffer(RootSystem.IntPtr pNative); - public Windows.Kinect.KinectBuffer LockAudioBuffer() - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("AudioBeamSubFrame"); - } - - RootSystem.IntPtr objectPointer = Windows_Kinect_AudioBeamSubFrame_LockAudioBuffer(_pNative); - Helper.ExceptionHelper.CheckLastError(); - - if (objectPointer == RootSystem.IntPtr.Zero) - { - return null; - } - - return Helper.NativeObjectCache.CreateOrGetObject(objectPointer, n => new Windows.Kinect.KinectBuffer(n)); - } - } - - public sealed partial class AudioBeamFrame - { - private Windows.Kinect.AudioBeamSubFrame[] _subFrames = null; - - private void Dispose(bool disposing) - { - if (_pNative == RootSystem.IntPtr.Zero) - { - return; - } - - if (_subFrames != null) - { - foreach (var subFrame in _subFrames) - { - subFrame.Dispose(); - } - - _subFrames = null; - } - - __EventCleanup(); - - Helper.NativeObjectCache.RemoveObject(_pNative); - Windows_Kinect_AudioBeamFrame_ReleaseObject(ref _pNative); - - if (disposing) - { - Windows_Kinect_AudioBeamFrame_Dispose(_pNative); - } - - _pNative = RootSystem.IntPtr.Zero; - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention = RootSystem.Runtime.InteropServices.CallingConvention.Cdecl)] - private static extern void Windows_Kinect_AudioBeamFrame_Dispose(RootSystem.IntPtr pNative); - public void Dispose() - { - if (_pNative == RootSystem.IntPtr.Zero) - { - return; - } - - Dispose(true); - RootSystem.GC.SuppressFinalize(this); - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention = RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError = true)] - private static extern int Windows_Kinect_AudioBeamFrame_get_SubFrames(RootSystem.IntPtr pNative, [RootSystem.Runtime.InteropServices.Out] RootSystem.IntPtr[] outCollection, int outCollectionSize); - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention = RootSystem.Runtime.InteropServices.CallingConvention.Cdecl)] - private static extern int Windows_Kinect_AudioBeamFrame_get_SubFrames_Length(RootSystem.IntPtr pNative); - public RootSystem.Collections.Generic.IList SubFrames - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("AudioBeamFrame"); - } - - if (_subFrames == null) - { - int collectionSize = Windows_Kinect_AudioBeamFrame_get_SubFrames_Length(_pNative); - var outCollection = new RootSystem.IntPtr[collectionSize]; - _subFrames = new Windows.Kinect.AudioBeamSubFrame[collectionSize]; - - collectionSize = Windows_Kinect_AudioBeamFrame_get_SubFrames(_pNative, outCollection, collectionSize); - Helper.ExceptionHelper.CheckLastError(); - - for (int i = 0; i < collectionSize; i++) - { - if (outCollection[i] == RootSystem.IntPtr.Zero) - { - continue; - } - - var obj = Helper.NativeObjectCache.GetObject(outCollection[i]); - if (obj == null) - { - obj = new Windows.Kinect.AudioBeamSubFrame(outCollection[i]); - Helper.NativeObjectCache.AddObject(outCollection[i], obj); - } - - _subFrames[i] = obj; - } - } - - return _subFrames; - } - } - } - - public sealed partial class BodyFrame - { - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention = RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError = true)] - private static extern void Windows_Kinect_BodyFrame_GetAndRefreshBodyData(RootSystem.IntPtr pNative, [RootSystem.Runtime.InteropServices.Out] RootSystem.IntPtr[] bodies, int bodiesSize); - public void GetAndRefreshBodyData(RootSystem.Collections.Generic.IList bodies) - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("BodyFrame"); - } - - int _bodies_idx = 0; - var _bodies = new RootSystem.IntPtr[bodies.Count]; - for (int i = 0; i < bodies.Count; i++) - { - if (bodies[i] == null) - { - bodies[i] = new Body(); - } - - _bodies[_bodies_idx] = bodies[i].GetIntPtr(); - _bodies_idx++; - } - - Windows_Kinect_BodyFrame_GetAndRefreshBodyData(_pNative, _bodies, bodies.Count); - Helper.ExceptionHelper.CheckLastError(); - - for (int i = 0; i < bodies.Count; i++) - { - bodies[i].SetIntPtr(_bodies[i]); - } - } - } - - public sealed partial class Body - { - internal void SetIntPtr(RootSystem.IntPtr value) { _pNative = value; } - internal RootSystem.IntPtr GetIntPtr() { return _pNative; } - - internal Body() { } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention = RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError = true)] - private static extern RootSystem.IntPtr Windows_Kinect_Body_get_Lean(RootSystem.IntPtr pNative); - public Windows.Kinect.PointF Lean - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("Body"); - } - - var objectPointer = Windows_Kinect_Body_get_Lean(_pNative); - Helper.ExceptionHelper.CheckLastError(); - - var obj = (Windows.Kinect.PointF)RootSystem.Runtime.InteropServices.Marshal.PtrToStructure(objectPointer, typeof(Windows.Kinect.PointF)); - RootSystem.Runtime.InteropServices.Marshal.FreeHGlobal(objectPointer); - return obj; - } - } - } - - public sealed partial class ColorFrame - { - [RootSystem.Runtime.InteropServices.DllImport( - "KinectUnityAddin", - EntryPoint = "Windows_Kinect_ColorFrame_CopyRawFrameDataToArray", - CallingConvention = RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, - SetLastError = true)] - private static extern void Windows_Kinect_ColorFrame_CopyRawFrameDataToIntPtr(RootSystem.IntPtr pNative, IntPtr frameData, uint frameDataSize); - public void CopyRawFrameDataToIntPtr(RootSystem.IntPtr frameData, uint size) - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("ColorFrame"); - } - - Windows_Kinect_ColorFrame_CopyRawFrameDataToIntPtr(_pNative, frameData, size); - Helper.ExceptionHelper.CheckLastError(); - } - - [RootSystem.Runtime.InteropServices.DllImport( - "KinectUnityAddin", - EntryPoint = "Windows_Kinect_ColorFrame_CopyConvertedFrameDataToArray", - CallingConvention = RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, - SetLastError = true)] - private static extern void Windows_Kinect_ColorFrame_CopyConvertedFrameDataToIntPtr(RootSystem.IntPtr pNative, IntPtr frameData, uint frameDataSize, Windows.Kinect.ColorImageFormat colorFormat); - public void CopyConvertedFrameDataToIntPtr(RootSystem.IntPtr frameData, uint size, Windows.Kinect.ColorImageFormat colorFormat) - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("ColorFrame"); - } - - Windows_Kinect_ColorFrame_CopyConvertedFrameDataToIntPtr(_pNative, frameData, size, colorFormat); - Helper.ExceptionHelper.CheckLastError(); - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention = RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError = true)] - private static extern RootSystem.IntPtr Windows_Kinect_ColorFrame_LockRawImageBuffer(RootSystem.IntPtr pNative); - public Windows.Kinect.KinectBuffer LockRawImageBuffer() - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("ColorFrame"); - } - - RootSystem.IntPtr objectPointer = Windows_Kinect_ColorFrame_LockRawImageBuffer(_pNative); - Helper.ExceptionHelper.CheckLastError(); - - if (objectPointer == RootSystem.IntPtr.Zero) - { - return null; - } - - return Helper.NativeObjectCache.CreateOrGetObject(objectPointer, n => new Windows.Kinect.KinectBuffer(n)); - } - - } - - public sealed partial class DepthFrame - { - [RootSystem.Runtime.InteropServices.DllImport( - "KinectUnityAddin", - EntryPoint = "Windows_Kinect_DepthFrame_CopyFrameDataToArray", - CallingConvention = RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, - SetLastError = true)] - private static extern void Windows_Kinect_DepthFrame_CopyFrameDataToIntPtr(RootSystem.IntPtr pNative, IntPtr frameData, uint frameDataSize); - public void CopyFrameDataToIntPtr(RootSystem.IntPtr frameData, uint size) - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("DepthFrame"); - } - - Windows_Kinect_DepthFrame_CopyFrameDataToIntPtr(_pNative, frameData, size / sizeof(ushort)); - Helper.ExceptionHelper.CheckLastError(); - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention = RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError = true)] - private static extern RootSystem.IntPtr Windows_Kinect_DepthFrame_LockImageBuffer(RootSystem.IntPtr pNative); - public Windows.Kinect.KinectBuffer LockImageBuffer() - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("DepthFrame"); - } - - RootSystem.IntPtr objectPointer = Windows_Kinect_DepthFrame_LockImageBuffer(_pNative); - Helper.ExceptionHelper.CheckLastError(); - - if (objectPointer == RootSystem.IntPtr.Zero) - { - return null; - } - - return Helper.NativeObjectCache.CreateOrGetObject(objectPointer, n => new Windows.Kinect.KinectBuffer(n)); - } - } - - public sealed partial class BodyIndexFrame - { - [RootSystem.Runtime.InteropServices.DllImport( - "KinectUnityAddin", - EntryPoint = "Windows_Kinect_BodyIndexFrame_CopyFrameDataToArray", - CallingConvention = RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, - SetLastError = true)] - private static extern void Windows_Kinect_BodyIndexFrame_CopyFrameDataToIntPtr(RootSystem.IntPtr pNative, IntPtr frameData, uint frameDataSize); - public void CopyFrameDataToIntPtr(RootSystem.IntPtr frameData, uint size) - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("BodyIndexFrame"); - } - - Windows_Kinect_BodyIndexFrame_CopyFrameDataToIntPtr(_pNative, frameData, size); - Helper.ExceptionHelper.CheckLastError(); - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention = RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError = true)] - private static extern RootSystem.IntPtr Windows_Kinect_BodyIndexFrame_LockImageBuffer(RootSystem.IntPtr pNative); - public Windows.Kinect.KinectBuffer LockImageBuffer() - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("BodyIndexFrame"); - } - - RootSystem.IntPtr objectPointer = Windows_Kinect_BodyIndexFrame_LockImageBuffer(_pNative); - Helper.ExceptionHelper.CheckLastError(); - - if (objectPointer == RootSystem.IntPtr.Zero) - { - return null; - } - - return Helper.NativeObjectCache.CreateOrGetObject(objectPointer, n => new Windows.Kinect.KinectBuffer(n)); - } - - } - - public sealed partial class InfraredFrame - { - [RootSystem.Runtime.InteropServices.DllImport( - "KinectUnityAddin", - EntryPoint = "Windows_Kinect_InfraredFrame_CopyFrameDataToArray", - CallingConvention = RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, - SetLastError = true)] - private static extern void Windows_Kinect_InfraredFrame_CopyFrameDataToIntPtr(RootSystem.IntPtr pNative, IntPtr frameData, uint frameDataSize); - public void CopyFrameDataToIntPtr(RootSystem.IntPtr frameData, uint size) - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("InfraredFrame"); - } - - Windows_Kinect_InfraredFrame_CopyFrameDataToIntPtr(_pNative, frameData, size / sizeof(ushort)); - Helper.ExceptionHelper.CheckLastError(); - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention = RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError = true)] - private static extern RootSystem.IntPtr Windows_Kinect_InfraredFrame_LockImageBuffer(RootSystem.IntPtr pNative); - public Windows.Kinect.KinectBuffer LockImageBuffer() - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("InfraredFrame"); - } - - RootSystem.IntPtr objectPointer = Windows_Kinect_InfraredFrame_LockImageBuffer(_pNative); - Helper.ExceptionHelper.CheckLastError(); - - if (objectPointer == RootSystem.IntPtr.Zero) - { - return null; - } - - return Helper.NativeObjectCache.CreateOrGetObject(objectPointer, n => new Windows.Kinect.KinectBuffer(n)); - } - - } - - public sealed partial class KinectSensor - { - private void Dispose(bool disposing) - { - if (_pNative == RootSystem.IntPtr.Zero) - { - return; - } - - if (IsOpen) - { - Close(); - } - - __EventCleanup(); - - Helper.NativeObjectCache.RemoveObject(_pNative); - Windows_Kinect_KinectSensor_ReleaseObject(ref _pNative); - - _pNative = RootSystem.IntPtr.Zero; - } - } - - public sealed partial class LongExposureInfraredFrame - { - [RootSystem.Runtime.InteropServices.DllImport( - "KinectUnityAddin", - EntryPoint = "Windows_Kinect_LongExposureInfraredFrame_CopyFrameDataToArray", - CallingConvention = RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, - SetLastError = true)] - private static extern void Windows_Kinect_LongExposureInfraredFrame_CopyFrameDataToIntPtr(RootSystem.IntPtr pNative, IntPtr frameData, uint frameDataSize); - public void CopyFrameDataToIntPtr(RootSystem.IntPtr frameData, uint size) - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("LongExposureInfraredFrame"); - } - - Windows_Kinect_LongExposureInfraredFrame_CopyFrameDataToIntPtr(_pNative, frameData, size / sizeof(ushort)); - Helper.ExceptionHelper.CheckLastError(); - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention = RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError = true)] - private static extern RootSystem.IntPtr Windows_Kinect_LongExposureInfraredFrame_LockImageBuffer(RootSystem.IntPtr pNative); - public Windows.Kinect.KinectBuffer LockImageBuffer() - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("LongExposureInfraredFrame"); - } - - RootSystem.IntPtr objectPointer = Windows_Kinect_LongExposureInfraredFrame_LockImageBuffer(_pNative); - Helper.ExceptionHelper.CheckLastError(); - - if (objectPointer == RootSystem.IntPtr.Zero) - { - return null; - } - - return Helper.NativeObjectCache.CreateOrGetObject(objectPointer, n => new Windows.Kinect.KinectBuffer(n)); - } - - } - - public sealed partial class CoordinateMapper - { - private PointF[] _DepthFrameToCameraSpaceTable = null; - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention = RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError = true)] - private static extern RootSystem.IntPtr Windows_Kinect_CoordinateMapper_GetDepthCameraIntrinsics(RootSystem.IntPtr pNative); - public Windows.Kinect.CameraIntrinsics GetDepthCameraIntrinsics() - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("CoordinateMapper"); - } - - var objectPointer = Windows_Kinect_CoordinateMapper_GetDepthCameraIntrinsics(_pNative); - Helper.ExceptionHelper.CheckLastError(); - - var obj = (Windows.Kinect.CameraIntrinsics)RootSystem.Runtime.InteropServices.Marshal.PtrToStructure(objectPointer, typeof(Windows.Kinect.CameraIntrinsics)); - RootSystem.Runtime.InteropServices.Marshal.FreeHGlobal(objectPointer); - return obj; - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention = RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError = true)] - private static extern int Windows_Kinect_CoordinateMapper_GetDepthFrameToCameraSpaceTable(RootSystem.IntPtr pNative, RootSystem.IntPtr outCollection, uint outCollectionSize); - public Windows.Kinect.PointF[] GetDepthFrameToCameraSpaceTable() - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("CoordinateMapper"); - } - - if (_DepthFrameToCameraSpaceTable == null) - { - var desc = KinectSensor.GetDefault().DepthFrameSource.FrameDescription; - _DepthFrameToCameraSpaceTable = new PointF[desc.Width * desc.Height]; - - var pointsSmartGCHandle = new Helper.SmartGCHandle(RootSystem.Runtime.InteropServices.GCHandle.Alloc(_DepthFrameToCameraSpaceTable, RootSystem.Runtime.InteropServices.GCHandleType.Pinned)); - var _points = pointsSmartGCHandle.AddrOfPinnedObject(); - Windows_Kinect_CoordinateMapper_GetDepthFrameToCameraSpaceTable(_pNative, _points, (uint)_DepthFrameToCameraSpaceTable.Length); - Helper.ExceptionHelper.CheckLastError(); - } - - return _DepthFrameToCameraSpaceTable; - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention = RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError = true)] - private static extern void Windows_Kinect_CoordinateMapper_MapColorFrameToDepthSpace( - RootSystem.IntPtr pNative, - RootSystem.IntPtr depthFrameData, - uint depthFrameDataSize, - RootSystem.IntPtr depthSpacePoints, - uint depthSpacePointsSize); - public void MapColorFrameToDepthSpaceUsingIntPtr(RootSystem.IntPtr depthFrameData, uint depthFrameSize, RootSystem.IntPtr depthSpacePoints, uint depthSpacePointsSize) - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("CoordinateMapper"); - } - - uint length = depthFrameSize / sizeof(UInt16); - Windows_Kinect_CoordinateMapper_MapColorFrameToDepthSpace(_pNative, depthFrameData, length, depthSpacePoints, depthSpacePointsSize); - Helper.ExceptionHelper.CheckLastError(); - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention = RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError = true)] - private static extern void Windows_Kinect_CoordinateMapper_MapColorFrameToCameraSpace( - RootSystem.IntPtr pNative, - RootSystem.IntPtr depthFrameData, - uint depthFrameDataSize, - RootSystem.IntPtr cameraSpacePoints, - uint cameraSpacePointsSize); - public void MapColorFrameToCameraSpaceUsingIntPtr(RootSystem.IntPtr depthFrameData, int depthFrameSize, RootSystem.IntPtr cameraSpacePoints, uint cameraSpacePointsSize) - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("CoordinateMapper"); - } - - uint length = (uint)depthFrameSize / sizeof(UInt16); - Windows_Kinect_CoordinateMapper_MapColorFrameToCameraSpace(_pNative, depthFrameData, length, cameraSpacePoints, cameraSpacePointsSize); - Helper.ExceptionHelper.CheckLastError(); - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention = RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError = true)] - private static extern void Windows_Kinect_CoordinateMapper_MapDepthFrameToColorSpace( - RootSystem.IntPtr pNative, - RootSystem.IntPtr depthFrameData, - uint depthFrameDataSize, - RootSystem.IntPtr colorSpacePoints, - uint colorSpacePointsSize); - public void MapDepthFrameToColorSpaceUsingIntPtr(RootSystem.IntPtr depthFrameData, int depthFrameSize, RootSystem.IntPtr colorSpacePoints, uint colorSpacePointsSize) - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("CoordinateMapper"); - } - - uint length = (uint)depthFrameSize / sizeof(UInt16); - Windows_Kinect_CoordinateMapper_MapDepthFrameToColorSpace(_pNative, depthFrameData, length, colorSpacePoints, colorSpacePointsSize); - Helper.ExceptionHelper.CheckLastError(); - } - - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention = RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError = true)] - private static extern void Windows_Kinect_CoordinateMapper_MapDepthFrameToCameraSpace( - RootSystem.IntPtr pNative, - IntPtr depthFrameData, - uint depthFrameDataSize, - RootSystem.IntPtr cameraSpacePoints, - uint cameraSpacePointsSize); - public void MapDepthFrameToCameraSpaceUsingIntPtr(RootSystem.IntPtr depthFrameData, int depthFrameSize, RootSystem.IntPtr cameraSpacePoints, uint cameraSpacePointsSize) - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("CoordinateMapper"); - } - - uint length = (uint)depthFrameSize / sizeof(UInt16); - Windows_Kinect_CoordinateMapper_MapDepthFrameToCameraSpace(_pNative, depthFrameData, length, cameraSpacePoints, cameraSpacePointsSize); - Helper.ExceptionHelper.CheckLastError(); - } - } -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/KinectSpecialCases.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/KinectSpecialCases.cs.meta deleted file mode 100644 index dfad668..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/KinectSpecialCases.cs.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: c59b79770236fae42a76e291570f2447 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/KinectUnityAddinUtils.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/KinectUnityAddinUtils.cs deleted file mode 100644 index 7423048..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/KinectUnityAddinUtils.cs +++ /dev/null @@ -1,19 +0,0 @@ -using RootSystem = System; -using System.Linq; -using System.Collections.Generic; -namespace Windows.Kinect -{ - // - // Windows.Kinect.KinectUnityAddinUtils - // - public sealed partial class KinectUnityAddinUtils - { - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void KinectUnityAddin_FreeMemory(RootSystem.IntPtr pToDealloc); - public static void FreeMemory(RootSystem.IntPtr pToDealloc) - { - KinectUnityAddin_FreeMemory(pToDealloc); - } - } - -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/KinectUnityAddinUtils.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/KinectUnityAddinUtils.cs.meta deleted file mode 100644 index 2703ba2..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/KinectUnityAddinUtils.cs.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 985cae59f29daa947acc082d310c3492 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/LongExposureInfraredFrame.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/LongExposureInfraredFrame.cs deleted file mode 100644 index b5bf431..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/LongExposureInfraredFrame.cs +++ /dev/null @@ -1,147 +0,0 @@ -using RootSystem = System; -using System.Linq; -using System.Collections.Generic; -namespace Windows.Kinect -{ - // - // Windows.Kinect.LongExposureInfraredFrame - // - public sealed partial class LongExposureInfraredFrame : RootSystem.IDisposable, Helper.INativeWrapper - - { - internal RootSystem.IntPtr _pNative; - RootSystem.IntPtr Helper.INativeWrapper.nativePtr { get { return _pNative; } } - - // Constructors and Finalizers - internal LongExposureInfraredFrame(RootSystem.IntPtr pNative) - { - _pNative = pNative; - Windows_Kinect_LongExposureInfraredFrame_AddRefObject(ref _pNative); - } - - ~LongExposureInfraredFrame() - { - Dispose(false); - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_LongExposureInfraredFrame_ReleaseObject(ref RootSystem.IntPtr pNative); - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_LongExposureInfraredFrame_AddRefObject(ref RootSystem.IntPtr pNative); - private void Dispose(bool disposing) - { - if (_pNative == RootSystem.IntPtr.Zero) - { - return; - } - - __EventCleanup(); - - Helper.NativeObjectCache.RemoveObject(_pNative); - - if (disposing) - { - Windows_Kinect_LongExposureInfraredFrame_Dispose(_pNative); - } - Windows_Kinect_LongExposureInfraredFrame_ReleaseObject(ref _pNative); - - _pNative = RootSystem.IntPtr.Zero; - } - - - // Public Properties - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern RootSystem.IntPtr Windows_Kinect_LongExposureInfraredFrame_get_FrameDescription(RootSystem.IntPtr pNative); - public Windows.Kinect.FrameDescription FrameDescription - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("LongExposureInfraredFrame"); - } - - RootSystem.IntPtr objectPointer = Windows_Kinect_LongExposureInfraredFrame_get_FrameDescription(_pNative); - Helper.ExceptionHelper.CheckLastError(); - if (objectPointer == RootSystem.IntPtr.Zero) - { - return null; - } - - return Helper.NativeObjectCache.CreateOrGetObject(objectPointer, n => new Windows.Kinect.FrameDescription(n)); - } - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern RootSystem.IntPtr Windows_Kinect_LongExposureInfraredFrame_get_LongExposureInfraredFrameSource(RootSystem.IntPtr pNative); - public Windows.Kinect.LongExposureInfraredFrameSource LongExposureInfraredFrameSource - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("LongExposureInfraredFrame"); - } - - RootSystem.IntPtr objectPointer = Windows_Kinect_LongExposureInfraredFrame_get_LongExposureInfraredFrameSource(_pNative); - Helper.ExceptionHelper.CheckLastError(); - if (objectPointer == RootSystem.IntPtr.Zero) - { - return null; - } - - return Helper.NativeObjectCache.CreateOrGetObject(objectPointer, n => new Windows.Kinect.LongExposureInfraredFrameSource(n)); - } - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern long Windows_Kinect_LongExposureInfraredFrame_get_RelativeTime(RootSystem.IntPtr pNative); - public RootSystem.TimeSpan RelativeTime - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("LongExposureInfraredFrame"); - } - - return RootSystem.TimeSpan.FromMilliseconds(Windows_Kinect_LongExposureInfraredFrame_get_RelativeTime(_pNative)); - } - } - - - // Public Methods - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_LongExposureInfraredFrame_CopyFrameDataToArray(RootSystem.IntPtr pNative, RootSystem.IntPtr frameData, int frameDataSize); - public void CopyFrameDataToArray(ushort[] frameData) - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("LongExposureInfraredFrame"); - } - - var frameDataSmartGCHandle = new Helper.SmartGCHandle(RootSystem.Runtime.InteropServices.GCHandle.Alloc(frameData, RootSystem.Runtime.InteropServices.GCHandleType.Pinned)); - var _frameData = frameDataSmartGCHandle.AddrOfPinnedObject(); - Windows_Kinect_LongExposureInfraredFrame_CopyFrameDataToArray(_pNative, _frameData, frameData.Length); - Helper.ExceptionHelper.CheckLastError(); - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_LongExposureInfraredFrame_Dispose(RootSystem.IntPtr pNative); - public void Dispose() - { - if (_pNative == RootSystem.IntPtr.Zero) - { - return; - } - - Dispose(true); - RootSystem.GC.SuppressFinalize(this); - } - - private void __EventCleanup() - { - } - } - -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/LongExposureInfraredFrame.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/LongExposureInfraredFrame.cs.meta deleted file mode 100644 index 477fb21..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/LongExposureInfraredFrame.cs.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 62e292d05e1f99d4695e2306db22e75f -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/LongExposureInfraredFrameArrivedEventArgs.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/LongExposureInfraredFrameArrivedEventArgs.cs deleted file mode 100644 index b22dd21..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/LongExposureInfraredFrameArrivedEventArgs.cs +++ /dev/null @@ -1,75 +0,0 @@ -using RootSystem = System; -using System.Linq; -using System.Collections.Generic; -namespace Windows.Kinect -{ - // - // Windows.Kinect.LongExposureInfraredFrameArrivedEventArgs - // - public sealed partial class LongExposureInfraredFrameArrivedEventArgs : RootSystem.EventArgs, Helper.INativeWrapper - - { - internal RootSystem.IntPtr _pNative; - RootSystem.IntPtr Helper.INativeWrapper.nativePtr { get { return _pNative; } } - - // Constructors and Finalizers - internal LongExposureInfraredFrameArrivedEventArgs(RootSystem.IntPtr pNative) - { - _pNative = pNative; - Windows_Kinect_LongExposureInfraredFrameArrivedEventArgs_AddRefObject(ref _pNative); - } - - ~LongExposureInfraredFrameArrivedEventArgs() - { - Dispose(false); - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_LongExposureInfraredFrameArrivedEventArgs_ReleaseObject(ref RootSystem.IntPtr pNative); - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_LongExposureInfraredFrameArrivedEventArgs_AddRefObject(ref RootSystem.IntPtr pNative); - private void Dispose(bool disposing) - { - if (_pNative == RootSystem.IntPtr.Zero) - { - return; - } - - __EventCleanup(); - - Helper.NativeObjectCache.RemoveObject(_pNative); - Windows_Kinect_LongExposureInfraredFrameArrivedEventArgs_ReleaseObject(ref _pNative); - - _pNative = RootSystem.IntPtr.Zero; - } - - - // Public Properties - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern RootSystem.IntPtr Windows_Kinect_LongExposureInfraredFrameArrivedEventArgs_get_FrameReference(RootSystem.IntPtr pNative); - public Windows.Kinect.LongExposureInfraredFrameReference FrameReference - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("LongExposureInfraredFrameArrivedEventArgs"); - } - - RootSystem.IntPtr objectPointer = Windows_Kinect_LongExposureInfraredFrameArrivedEventArgs_get_FrameReference(_pNative); - Helper.ExceptionHelper.CheckLastError(); - if (objectPointer == RootSystem.IntPtr.Zero) - { - return null; - } - - return Helper.NativeObjectCache.CreateOrGetObject(objectPointer, n => new Windows.Kinect.LongExposureInfraredFrameReference(n)); - } - } - - private void __EventCleanup() - { - } - } - -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/LongExposureInfraredFrameArrivedEventArgs.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/LongExposureInfraredFrameArrivedEventArgs.cs.meta deleted file mode 100644 index e3d2c5b..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/LongExposureInfraredFrameArrivedEventArgs.cs.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: dbaaf8e0d23f24848ab81331f4379722 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/LongExposureInfraredFrameReader.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/LongExposureInfraredFrameReader.cs deleted file mode 100644 index 9ebfb47..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/LongExposureInfraredFrameReader.cs +++ /dev/null @@ -1,297 +0,0 @@ -using RootSystem = System; -using System.Linq; -using System.Collections.Generic; -namespace Windows.Kinect -{ - // - // Windows.Kinect.LongExposureInfraredFrameReader - // - public sealed partial class LongExposureInfraredFrameReader : RootSystem.IDisposable, Helper.INativeWrapper - - { - internal RootSystem.IntPtr _pNative; - RootSystem.IntPtr Helper.INativeWrapper.nativePtr { get { return _pNative; } } - - // Constructors and Finalizers - internal LongExposureInfraredFrameReader(RootSystem.IntPtr pNative) - { - _pNative = pNative; - Windows_Kinect_LongExposureInfraredFrameReader_AddRefObject(ref _pNative); - } - - ~LongExposureInfraredFrameReader() - { - Dispose(false); - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_LongExposureInfraredFrameReader_ReleaseObject(ref RootSystem.IntPtr pNative); - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_LongExposureInfraredFrameReader_AddRefObject(ref RootSystem.IntPtr pNative); - private void Dispose(bool disposing) - { - if (_pNative == RootSystem.IntPtr.Zero) - { - return; - } - - __EventCleanup(); - - Helper.NativeObjectCache.RemoveObject(_pNative); - - if (disposing) - { - Windows_Kinect_LongExposureInfraredFrameReader_Dispose(_pNative); - } - Windows_Kinect_LongExposureInfraredFrameReader_ReleaseObject(ref _pNative); - - _pNative = RootSystem.IntPtr.Zero; - } - - - // Public Properties - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern bool Windows_Kinect_LongExposureInfraredFrameReader_get_IsPaused(RootSystem.IntPtr pNative); - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_LongExposureInfraredFrameReader_put_IsPaused(RootSystem.IntPtr pNative, bool isPaused); - public bool IsPaused - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("LongExposureInfraredFrameReader"); - } - - return Windows_Kinect_LongExposureInfraredFrameReader_get_IsPaused(_pNative); - } - set - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("LongExposureInfraredFrameReader"); - } - - Windows_Kinect_LongExposureInfraredFrameReader_put_IsPaused(_pNative, value); - Helper.ExceptionHelper.CheckLastError(); - } - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern RootSystem.IntPtr Windows_Kinect_LongExposureInfraredFrameReader_get_LongExposureInfraredFrameSource(RootSystem.IntPtr pNative); - public Windows.Kinect.LongExposureInfraredFrameSource LongExposureInfraredFrameSource - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("LongExposureInfraredFrameReader"); - } - - RootSystem.IntPtr objectPointer = Windows_Kinect_LongExposureInfraredFrameReader_get_LongExposureInfraredFrameSource(_pNative); - Helper.ExceptionHelper.CheckLastError(); - if (objectPointer == RootSystem.IntPtr.Zero) - { - return null; - } - - return Helper.NativeObjectCache.CreateOrGetObject(objectPointer, n => new Windows.Kinect.LongExposureInfraredFrameSource(n)); - } - } - - - // Events - private static RootSystem.Runtime.InteropServices.GCHandle _Windows_Kinect_LongExposureInfraredFrameArrivedEventArgs_Delegate_Handle; - [RootSystem.Runtime.InteropServices.UnmanagedFunctionPointer(RootSystem.Runtime.InteropServices.CallingConvention.Cdecl)] - private delegate void _Windows_Kinect_LongExposureInfraredFrameArrivedEventArgs_Delegate(RootSystem.IntPtr args, RootSystem.IntPtr pNative); - private static Helper.CollectionMap>> Windows_Kinect_LongExposureInfraredFrameArrivedEventArgs_Delegate_callbacks = new Helper.CollectionMap>>(); - [AOT.MonoPInvokeCallbackAttribute(typeof(_Windows_Kinect_LongExposureInfraredFrameArrivedEventArgs_Delegate))] - private static void Windows_Kinect_LongExposureInfraredFrameArrivedEventArgs_Delegate_Handler(RootSystem.IntPtr result, RootSystem.IntPtr pNative) - { - List> callbackList = null; - Windows_Kinect_LongExposureInfraredFrameArrivedEventArgs_Delegate_callbacks.TryGetValue(pNative, out callbackList); - lock(callbackList) - { - var objThis = Helper.NativeObjectCache.GetObject(pNative); - var args = new Windows.Kinect.LongExposureInfraredFrameArrivedEventArgs(result); - foreach(var func in callbackList) - { - Helper.EventPump.Instance.Enqueue(() => { try { func(objThis, args); } catch { } }); - } - } - } - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_LongExposureInfraredFrameReader_add_FrameArrived(RootSystem.IntPtr pNative, _Windows_Kinect_LongExposureInfraredFrameArrivedEventArgs_Delegate eventCallback, bool unsubscribe); - public event RootSystem.EventHandler FrameArrived - { - add - { - Helper.EventPump.EnsureInitialized(); - - Windows_Kinect_LongExposureInfraredFrameArrivedEventArgs_Delegate_callbacks.TryAddDefault(_pNative); - var callbackList = Windows_Kinect_LongExposureInfraredFrameArrivedEventArgs_Delegate_callbacks[_pNative]; - lock (callbackList) - { - callbackList.Add(value); - if(callbackList.Count == 1) - { - var del = new _Windows_Kinect_LongExposureInfraredFrameArrivedEventArgs_Delegate(Windows_Kinect_LongExposureInfraredFrameArrivedEventArgs_Delegate_Handler); - _Windows_Kinect_LongExposureInfraredFrameArrivedEventArgs_Delegate_Handle = RootSystem.Runtime.InteropServices.GCHandle.Alloc(del); - Windows_Kinect_LongExposureInfraredFrameReader_add_FrameArrived(_pNative, del, false); - } - } - } - remove - { - if (_pNative == RootSystem.IntPtr.Zero) - { - return; - } - - Windows_Kinect_LongExposureInfraredFrameArrivedEventArgs_Delegate_callbacks.TryAddDefault(_pNative); - var callbackList = Windows_Kinect_LongExposureInfraredFrameArrivedEventArgs_Delegate_callbacks[_pNative]; - lock (callbackList) - { - callbackList.Remove(value); - if(callbackList.Count == 0) - { - Windows_Kinect_LongExposureInfraredFrameReader_add_FrameArrived(_pNative, Windows_Kinect_LongExposureInfraredFrameArrivedEventArgs_Delegate_Handler, true); - _Windows_Kinect_LongExposureInfraredFrameArrivedEventArgs_Delegate_Handle.Free(); - } - } - } - } - - private static RootSystem.Runtime.InteropServices.GCHandle _Windows_Data_PropertyChangedEventArgs_Delegate_Handle; - [RootSystem.Runtime.InteropServices.UnmanagedFunctionPointer(RootSystem.Runtime.InteropServices.CallingConvention.Cdecl)] - private delegate void _Windows_Data_PropertyChangedEventArgs_Delegate(RootSystem.IntPtr args, RootSystem.IntPtr pNative); - private static Helper.CollectionMap>> Windows_Data_PropertyChangedEventArgs_Delegate_callbacks = new Helper.CollectionMap>>(); - [AOT.MonoPInvokeCallbackAttribute(typeof(_Windows_Data_PropertyChangedEventArgs_Delegate))] - private static void Windows_Data_PropertyChangedEventArgs_Delegate_Handler(RootSystem.IntPtr result, RootSystem.IntPtr pNative) - { - List> callbackList = null; - Windows_Data_PropertyChangedEventArgs_Delegate_callbacks.TryGetValue(pNative, out callbackList); - lock(callbackList) - { - var objThis = Helper.NativeObjectCache.GetObject(pNative); - var args = new Windows.Data.PropertyChangedEventArgs(result); - foreach(var func in callbackList) - { - Helper.EventPump.Instance.Enqueue(() => { try { func(objThis, args); } catch { } }); - } - } - } - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_LongExposureInfraredFrameReader_add_PropertyChanged(RootSystem.IntPtr pNative, _Windows_Data_PropertyChangedEventArgs_Delegate eventCallback, bool unsubscribe); - public event RootSystem.EventHandler PropertyChanged - { - add - { - Helper.EventPump.EnsureInitialized(); - - Windows_Data_PropertyChangedEventArgs_Delegate_callbacks.TryAddDefault(_pNative); - var callbackList = Windows_Data_PropertyChangedEventArgs_Delegate_callbacks[_pNative]; - lock (callbackList) - { - callbackList.Add(value); - if(callbackList.Count == 1) - { - var del = new _Windows_Data_PropertyChangedEventArgs_Delegate(Windows_Data_PropertyChangedEventArgs_Delegate_Handler); - _Windows_Data_PropertyChangedEventArgs_Delegate_Handle = RootSystem.Runtime.InteropServices.GCHandle.Alloc(del); - Windows_Kinect_LongExposureInfraredFrameReader_add_PropertyChanged(_pNative, del, false); - } - } - } - remove - { - if (_pNative == RootSystem.IntPtr.Zero) - { - return; - } - - Windows_Data_PropertyChangedEventArgs_Delegate_callbacks.TryAddDefault(_pNative); - var callbackList = Windows_Data_PropertyChangedEventArgs_Delegate_callbacks[_pNative]; - lock (callbackList) - { - callbackList.Remove(value); - if(callbackList.Count == 0) - { - Windows_Kinect_LongExposureInfraredFrameReader_add_PropertyChanged(_pNative, Windows_Data_PropertyChangedEventArgs_Delegate_Handler, true); - _Windows_Data_PropertyChangedEventArgs_Delegate_Handle.Free(); - } - } - } - } - - - // Public Methods - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern RootSystem.IntPtr Windows_Kinect_LongExposureInfraredFrameReader_AcquireLatestFrame(RootSystem.IntPtr pNative); - public Windows.Kinect.LongExposureInfraredFrame AcquireLatestFrame() - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("LongExposureInfraredFrameReader"); - } - - RootSystem.IntPtr objectPointer = Windows_Kinect_LongExposureInfraredFrameReader_AcquireLatestFrame(_pNative); - Helper.ExceptionHelper.CheckLastError(); - if (objectPointer == RootSystem.IntPtr.Zero) - { - return null; - } - - return Helper.NativeObjectCache.CreateOrGetObject(objectPointer, n => new Windows.Kinect.LongExposureInfraredFrame(n)); - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_LongExposureInfraredFrameReader_Dispose(RootSystem.IntPtr pNative); - public void Dispose() - { - if (_pNative == RootSystem.IntPtr.Zero) - { - return; - } - - Dispose(true); - RootSystem.GC.SuppressFinalize(this); - } - - private void __EventCleanup() - { - { - Windows_Kinect_LongExposureInfraredFrameArrivedEventArgs_Delegate_callbacks.TryAddDefault(_pNative); - var callbackList = Windows_Kinect_LongExposureInfraredFrameArrivedEventArgs_Delegate_callbacks[_pNative]; - lock (callbackList) - { - if (callbackList.Count > 0) - { - callbackList.Clear(); - if (_pNative != RootSystem.IntPtr.Zero) - { - Windows_Kinect_LongExposureInfraredFrameReader_add_FrameArrived(_pNative, Windows_Kinect_LongExposureInfraredFrameArrivedEventArgs_Delegate_Handler, true); - } - _Windows_Kinect_LongExposureInfraredFrameArrivedEventArgs_Delegate_Handle.Free(); - } - } - } - { - Windows_Data_PropertyChangedEventArgs_Delegate_callbacks.TryAddDefault(_pNative); - var callbackList = Windows_Data_PropertyChangedEventArgs_Delegate_callbacks[_pNative]; - lock (callbackList) - { - if (callbackList.Count > 0) - { - callbackList.Clear(); - if (_pNative != RootSystem.IntPtr.Zero) - { - Windows_Kinect_LongExposureInfraredFrameReader_add_PropertyChanged(_pNative, Windows_Data_PropertyChangedEventArgs_Delegate_Handler, true); - } - _Windows_Data_PropertyChangedEventArgs_Delegate_Handle.Free(); - } - } - } - } - } - -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/LongExposureInfraredFrameReader.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/LongExposureInfraredFrameReader.cs.meta deleted file mode 100644 index 98e65b1..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/LongExposureInfraredFrameReader.cs.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 78a6e9053bd545d4f948fa1d8ced5879 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/LongExposureInfraredFrameReference.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/LongExposureInfraredFrameReference.cs deleted file mode 100644 index 84ce8e8..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/LongExposureInfraredFrameReference.cs +++ /dev/null @@ -1,89 +0,0 @@ -using RootSystem = System; -using System.Linq; -using System.Collections.Generic; -namespace Windows.Kinect -{ - // - // Windows.Kinect.LongExposureInfraredFrameReference - // - public sealed partial class LongExposureInfraredFrameReference : Helper.INativeWrapper - - { - internal RootSystem.IntPtr _pNative; - RootSystem.IntPtr Helper.INativeWrapper.nativePtr { get { return _pNative; } } - - // Constructors and Finalizers - internal LongExposureInfraredFrameReference(RootSystem.IntPtr pNative) - { - _pNative = pNative; - Windows_Kinect_LongExposureInfraredFrameReference_AddRefObject(ref _pNative); - } - - ~LongExposureInfraredFrameReference() - { - Dispose(false); - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_LongExposureInfraredFrameReference_ReleaseObject(ref RootSystem.IntPtr pNative); - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_LongExposureInfraredFrameReference_AddRefObject(ref RootSystem.IntPtr pNative); - private void Dispose(bool disposing) - { - if (_pNative == RootSystem.IntPtr.Zero) - { - return; - } - - __EventCleanup(); - - Helper.NativeObjectCache.RemoveObject(_pNative); - Windows_Kinect_LongExposureInfraredFrameReference_ReleaseObject(ref _pNative); - - _pNative = RootSystem.IntPtr.Zero; - } - - - // Public Properties - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern long Windows_Kinect_LongExposureInfraredFrameReference_get_RelativeTime(RootSystem.IntPtr pNative); - public RootSystem.TimeSpan RelativeTime - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("LongExposureInfraredFrameReference"); - } - - return RootSystem.TimeSpan.FromMilliseconds(Windows_Kinect_LongExposureInfraredFrameReference_get_RelativeTime(_pNative)); - } - } - - - // Public Methods - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern RootSystem.IntPtr Windows_Kinect_LongExposureInfraredFrameReference_AcquireFrame(RootSystem.IntPtr pNative); - public Windows.Kinect.LongExposureInfraredFrame AcquireFrame() - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("LongExposureInfraredFrameReference"); - } - - RootSystem.IntPtr objectPointer = Windows_Kinect_LongExposureInfraredFrameReference_AcquireFrame(_pNative); - Helper.ExceptionHelper.CheckLastError(); - if (objectPointer == RootSystem.IntPtr.Zero) - { - return null; - } - - return Helper.NativeObjectCache.CreateOrGetObject(objectPointer, n => new Windows.Kinect.LongExposureInfraredFrame(n)); - } - - private void __EventCleanup() - { - } - } - -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/LongExposureInfraredFrameReference.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/LongExposureInfraredFrameReference.cs.meta deleted file mode 100644 index a66847f..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/LongExposureInfraredFrameReference.cs.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 91cd9161c056061438655504e2f2f7f4 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/LongExposureInfraredFrameSource.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/LongExposureInfraredFrameSource.cs deleted file mode 100644 index c0c2f44..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/LongExposureInfraredFrameSource.cs +++ /dev/null @@ -1,289 +0,0 @@ -using RootSystem = System; -using System.Linq; -using System.Collections.Generic; -namespace Windows.Kinect -{ - // - // Windows.Kinect.LongExposureInfraredFrameSource - // - public sealed partial class LongExposureInfraredFrameSource : Helper.INativeWrapper - - { - internal RootSystem.IntPtr _pNative; - RootSystem.IntPtr Helper.INativeWrapper.nativePtr { get { return _pNative; } } - - // Constructors and Finalizers - internal LongExposureInfraredFrameSource(RootSystem.IntPtr pNative) - { - _pNative = pNative; - Windows_Kinect_LongExposureInfraredFrameSource_AddRefObject(ref _pNative); - } - - ~LongExposureInfraredFrameSource() - { - Dispose(false); - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_LongExposureInfraredFrameSource_ReleaseObject(ref RootSystem.IntPtr pNative); - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_LongExposureInfraredFrameSource_AddRefObject(ref RootSystem.IntPtr pNative); - private void Dispose(bool disposing) - { - if (_pNative == RootSystem.IntPtr.Zero) - { - return; - } - - __EventCleanup(); - - Helper.NativeObjectCache.RemoveObject(_pNative); - Windows_Kinect_LongExposureInfraredFrameSource_ReleaseObject(ref _pNative); - - _pNative = RootSystem.IntPtr.Zero; - } - - - // Public Properties - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern RootSystem.IntPtr Windows_Kinect_LongExposureInfraredFrameSource_get_FrameDescription(RootSystem.IntPtr pNative); - public Windows.Kinect.FrameDescription FrameDescription - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("LongExposureInfraredFrameSource"); - } - - RootSystem.IntPtr objectPointer = Windows_Kinect_LongExposureInfraredFrameSource_get_FrameDescription(_pNative); - Helper.ExceptionHelper.CheckLastError(); - if (objectPointer == RootSystem.IntPtr.Zero) - { - return null; - } - - return Helper.NativeObjectCache.CreateOrGetObject(objectPointer, n => new Windows.Kinect.FrameDescription(n)); - } - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern bool Windows_Kinect_LongExposureInfraredFrameSource_get_IsActive(RootSystem.IntPtr pNative); - public bool IsActive - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("LongExposureInfraredFrameSource"); - } - - return Windows_Kinect_LongExposureInfraredFrameSource_get_IsActive(_pNative); - } - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern RootSystem.IntPtr Windows_Kinect_LongExposureInfraredFrameSource_get_KinectSensor(RootSystem.IntPtr pNative); - public Windows.Kinect.KinectSensor KinectSensor - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("LongExposureInfraredFrameSource"); - } - - RootSystem.IntPtr objectPointer = Windows_Kinect_LongExposureInfraredFrameSource_get_KinectSensor(_pNative); - Helper.ExceptionHelper.CheckLastError(); - if (objectPointer == RootSystem.IntPtr.Zero) - { - return null; - } - - return Helper.NativeObjectCache.CreateOrGetObject(objectPointer, n => new Windows.Kinect.KinectSensor(n)); - } - } - - - // Events - private static RootSystem.Runtime.InteropServices.GCHandle _Windows_Kinect_FrameCapturedEventArgs_Delegate_Handle; - [RootSystem.Runtime.InteropServices.UnmanagedFunctionPointer(RootSystem.Runtime.InteropServices.CallingConvention.Cdecl)] - private delegate void _Windows_Kinect_FrameCapturedEventArgs_Delegate(RootSystem.IntPtr args, RootSystem.IntPtr pNative); - private static Helper.CollectionMap>> Windows_Kinect_FrameCapturedEventArgs_Delegate_callbacks = new Helper.CollectionMap>>(); - [AOT.MonoPInvokeCallbackAttribute(typeof(_Windows_Kinect_FrameCapturedEventArgs_Delegate))] - private static void Windows_Kinect_FrameCapturedEventArgs_Delegate_Handler(RootSystem.IntPtr result, RootSystem.IntPtr pNative) - { - List> callbackList = null; - Windows_Kinect_FrameCapturedEventArgs_Delegate_callbacks.TryGetValue(pNative, out callbackList); - lock(callbackList) - { - var objThis = Helper.NativeObjectCache.GetObject(pNative); - var args = new Windows.Kinect.FrameCapturedEventArgs(result); - foreach(var func in callbackList) - { - Helper.EventPump.Instance.Enqueue(() => { try { func(objThis, args); } catch { } }); - } - } - } - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_LongExposureInfraredFrameSource_add_FrameCaptured(RootSystem.IntPtr pNative, _Windows_Kinect_FrameCapturedEventArgs_Delegate eventCallback, bool unsubscribe); - public event RootSystem.EventHandler FrameCaptured - { - add - { - Helper.EventPump.EnsureInitialized(); - - Windows_Kinect_FrameCapturedEventArgs_Delegate_callbacks.TryAddDefault(_pNative); - var callbackList = Windows_Kinect_FrameCapturedEventArgs_Delegate_callbacks[_pNative]; - lock (callbackList) - { - callbackList.Add(value); - if(callbackList.Count == 1) - { - var del = new _Windows_Kinect_FrameCapturedEventArgs_Delegate(Windows_Kinect_FrameCapturedEventArgs_Delegate_Handler); - _Windows_Kinect_FrameCapturedEventArgs_Delegate_Handle = RootSystem.Runtime.InteropServices.GCHandle.Alloc(del); - Windows_Kinect_LongExposureInfraredFrameSource_add_FrameCaptured(_pNative, del, false); - } - } - } - remove - { - if (_pNative == RootSystem.IntPtr.Zero) - { - return; - } - - Windows_Kinect_FrameCapturedEventArgs_Delegate_callbacks.TryAddDefault(_pNative); - var callbackList = Windows_Kinect_FrameCapturedEventArgs_Delegate_callbacks[_pNative]; - lock (callbackList) - { - callbackList.Remove(value); - if(callbackList.Count == 0) - { - Windows_Kinect_LongExposureInfraredFrameSource_add_FrameCaptured(_pNative, Windows_Kinect_FrameCapturedEventArgs_Delegate_Handler, true); - _Windows_Kinect_FrameCapturedEventArgs_Delegate_Handle.Free(); - } - } - } - } - - private static RootSystem.Runtime.InteropServices.GCHandle _Windows_Data_PropertyChangedEventArgs_Delegate_Handle; - [RootSystem.Runtime.InteropServices.UnmanagedFunctionPointer(RootSystem.Runtime.InteropServices.CallingConvention.Cdecl)] - private delegate void _Windows_Data_PropertyChangedEventArgs_Delegate(RootSystem.IntPtr args, RootSystem.IntPtr pNative); - private static Helper.CollectionMap>> Windows_Data_PropertyChangedEventArgs_Delegate_callbacks = new Helper.CollectionMap>>(); - [AOT.MonoPInvokeCallbackAttribute(typeof(_Windows_Data_PropertyChangedEventArgs_Delegate))] - private static void Windows_Data_PropertyChangedEventArgs_Delegate_Handler(RootSystem.IntPtr result, RootSystem.IntPtr pNative) - { - List> callbackList = null; - Windows_Data_PropertyChangedEventArgs_Delegate_callbacks.TryGetValue(pNative, out callbackList); - lock(callbackList) - { - var objThis = Helper.NativeObjectCache.GetObject(pNative); - var args = new Windows.Data.PropertyChangedEventArgs(result); - foreach(var func in callbackList) - { - Helper.EventPump.Instance.Enqueue(() => { try { func(objThis, args); } catch { } }); - } - } - } - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_LongExposureInfraredFrameSource_add_PropertyChanged(RootSystem.IntPtr pNative, _Windows_Data_PropertyChangedEventArgs_Delegate eventCallback, bool unsubscribe); - public event RootSystem.EventHandler PropertyChanged - { - add - { - Helper.EventPump.EnsureInitialized(); - - Windows_Data_PropertyChangedEventArgs_Delegate_callbacks.TryAddDefault(_pNative); - var callbackList = Windows_Data_PropertyChangedEventArgs_Delegate_callbacks[_pNative]; - lock (callbackList) - { - callbackList.Add(value); - if(callbackList.Count == 1) - { - var del = new _Windows_Data_PropertyChangedEventArgs_Delegate(Windows_Data_PropertyChangedEventArgs_Delegate_Handler); - _Windows_Data_PropertyChangedEventArgs_Delegate_Handle = RootSystem.Runtime.InteropServices.GCHandle.Alloc(del); - Windows_Kinect_LongExposureInfraredFrameSource_add_PropertyChanged(_pNative, del, false); - } - } - } - remove - { - if (_pNative == RootSystem.IntPtr.Zero) - { - return; - } - - Windows_Data_PropertyChangedEventArgs_Delegate_callbacks.TryAddDefault(_pNative); - var callbackList = Windows_Data_PropertyChangedEventArgs_Delegate_callbacks[_pNative]; - lock (callbackList) - { - callbackList.Remove(value); - if(callbackList.Count == 0) - { - Windows_Kinect_LongExposureInfraredFrameSource_add_PropertyChanged(_pNative, Windows_Data_PropertyChangedEventArgs_Delegate_Handler, true); - _Windows_Data_PropertyChangedEventArgs_Delegate_Handle.Free(); - } - } - } - } - - - // Public Methods - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern RootSystem.IntPtr Windows_Kinect_LongExposureInfraredFrameSource_OpenReader(RootSystem.IntPtr pNative); - public Windows.Kinect.LongExposureInfraredFrameReader OpenReader() - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("LongExposureInfraredFrameSource"); - } - - RootSystem.IntPtr objectPointer = Windows_Kinect_LongExposureInfraredFrameSource_OpenReader(_pNative); - Helper.ExceptionHelper.CheckLastError(); - if (objectPointer == RootSystem.IntPtr.Zero) - { - return null; - } - - return Helper.NativeObjectCache.CreateOrGetObject(objectPointer, n => new Windows.Kinect.LongExposureInfraredFrameReader(n)); - } - - private void __EventCleanup() - { - { - Windows_Kinect_FrameCapturedEventArgs_Delegate_callbacks.TryAddDefault(_pNative); - var callbackList = Windows_Kinect_FrameCapturedEventArgs_Delegate_callbacks[_pNative]; - lock (callbackList) - { - if (callbackList.Count > 0) - { - callbackList.Clear(); - if (_pNative != RootSystem.IntPtr.Zero) - { - Windows_Kinect_LongExposureInfraredFrameSource_add_FrameCaptured(_pNative, Windows_Kinect_FrameCapturedEventArgs_Delegate_Handler, true); - } - _Windows_Kinect_FrameCapturedEventArgs_Delegate_Handle.Free(); - } - } - } - { - Windows_Data_PropertyChangedEventArgs_Delegate_callbacks.TryAddDefault(_pNative); - var callbackList = Windows_Data_PropertyChangedEventArgs_Delegate_callbacks[_pNative]; - lock (callbackList) - { - if (callbackList.Count > 0) - { - callbackList.Clear(); - if (_pNative != RootSystem.IntPtr.Zero) - { - Windows_Kinect_LongExposureInfraredFrameSource_add_PropertyChanged(_pNative, Windows_Data_PropertyChangedEventArgs_Delegate_Handler, true); - } - _Windows_Data_PropertyChangedEventArgs_Delegate_Handle.Free(); - } - } - } - } - } - -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/LongExposureInfraredFrameSource.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/LongExposureInfraredFrameSource.cs.meta deleted file mode 100644 index 6380a8e..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/LongExposureInfraredFrameSource.cs.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: cdcf249c89943864ca06ab517b1d74f5 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/MultiSourceFrame.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/MultiSourceFrame.cs deleted file mode 100644 index c5e3b4d..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/MultiSourceFrame.cs +++ /dev/null @@ -1,187 +0,0 @@ -using RootSystem = System; -using System.Linq; -using System.Collections.Generic; -namespace Windows.Kinect -{ - // - // Windows.Kinect.MultiSourceFrame - // - public sealed partial class MultiSourceFrame : Helper.INativeWrapper - - { - internal RootSystem.IntPtr _pNative; - RootSystem.IntPtr Helper.INativeWrapper.nativePtr { get { return _pNative; } } - - // Constructors and Finalizers - internal MultiSourceFrame(RootSystem.IntPtr pNative) - { - _pNative = pNative; - Windows_Kinect_MultiSourceFrame_AddRefObject(ref _pNative); - } - - ~MultiSourceFrame() - { - Dispose(false); - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_MultiSourceFrame_ReleaseObject(ref RootSystem.IntPtr pNative); - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_MultiSourceFrame_AddRefObject(ref RootSystem.IntPtr pNative); - private void Dispose(bool disposing) - { - if (_pNative == RootSystem.IntPtr.Zero) - { - return; - } - - __EventCleanup(); - - Helper.NativeObjectCache.RemoveObject(_pNative); - Windows_Kinect_MultiSourceFrame_ReleaseObject(ref _pNative); - - _pNative = RootSystem.IntPtr.Zero; - } - - - // Public Properties - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern RootSystem.IntPtr Windows_Kinect_MultiSourceFrame_get_BodyFrameReference(RootSystem.IntPtr pNative); - public Windows.Kinect.BodyFrameReference BodyFrameReference - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("MultiSourceFrame"); - } - - RootSystem.IntPtr objectPointer = Windows_Kinect_MultiSourceFrame_get_BodyFrameReference(_pNative); - Helper.ExceptionHelper.CheckLastError(); - if (objectPointer == RootSystem.IntPtr.Zero) - { - return null; - } - - return Helper.NativeObjectCache.CreateOrGetObject(objectPointer, n => new Windows.Kinect.BodyFrameReference(n)); - } - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern RootSystem.IntPtr Windows_Kinect_MultiSourceFrame_get_BodyIndexFrameReference(RootSystem.IntPtr pNative); - public Windows.Kinect.BodyIndexFrameReference BodyIndexFrameReference - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("MultiSourceFrame"); - } - - RootSystem.IntPtr objectPointer = Windows_Kinect_MultiSourceFrame_get_BodyIndexFrameReference(_pNative); - Helper.ExceptionHelper.CheckLastError(); - if (objectPointer == RootSystem.IntPtr.Zero) - { - return null; - } - - return Helper.NativeObjectCache.CreateOrGetObject(objectPointer, n => new Windows.Kinect.BodyIndexFrameReference(n)); - } - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern RootSystem.IntPtr Windows_Kinect_MultiSourceFrame_get_ColorFrameReference(RootSystem.IntPtr pNative); - public Windows.Kinect.ColorFrameReference ColorFrameReference - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("MultiSourceFrame"); - } - - RootSystem.IntPtr objectPointer = Windows_Kinect_MultiSourceFrame_get_ColorFrameReference(_pNative); - Helper.ExceptionHelper.CheckLastError(); - if (objectPointer == RootSystem.IntPtr.Zero) - { - return null; - } - - return Helper.NativeObjectCache.CreateOrGetObject(objectPointer, n => new Windows.Kinect.ColorFrameReference(n)); - } - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern RootSystem.IntPtr Windows_Kinect_MultiSourceFrame_get_DepthFrameReference(RootSystem.IntPtr pNative); - public Windows.Kinect.DepthFrameReference DepthFrameReference - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("MultiSourceFrame"); - } - - RootSystem.IntPtr objectPointer = Windows_Kinect_MultiSourceFrame_get_DepthFrameReference(_pNative); - Helper.ExceptionHelper.CheckLastError(); - if (objectPointer == RootSystem.IntPtr.Zero) - { - return null; - } - - return Helper.NativeObjectCache.CreateOrGetObject(objectPointer, n => new Windows.Kinect.DepthFrameReference(n)); - } - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern RootSystem.IntPtr Windows_Kinect_MultiSourceFrame_get_InfraredFrameReference(RootSystem.IntPtr pNative); - public Windows.Kinect.InfraredFrameReference InfraredFrameReference - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("MultiSourceFrame"); - } - - RootSystem.IntPtr objectPointer = Windows_Kinect_MultiSourceFrame_get_InfraredFrameReference(_pNative); - Helper.ExceptionHelper.CheckLastError(); - if (objectPointer == RootSystem.IntPtr.Zero) - { - return null; - } - - return Helper.NativeObjectCache.CreateOrGetObject(objectPointer, n => new Windows.Kinect.InfraredFrameReference(n)); - } - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern RootSystem.IntPtr Windows_Kinect_MultiSourceFrame_get_LongExposureInfraredFrameReference(RootSystem.IntPtr pNative); - public Windows.Kinect.LongExposureInfraredFrameReference LongExposureInfraredFrameReference - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("MultiSourceFrame"); - } - - RootSystem.IntPtr objectPointer = Windows_Kinect_MultiSourceFrame_get_LongExposureInfraredFrameReference(_pNative); - Helper.ExceptionHelper.CheckLastError(); - if (objectPointer == RootSystem.IntPtr.Zero) - { - return null; - } - - return Helper.NativeObjectCache.CreateOrGetObject(objectPointer, n => new Windows.Kinect.LongExposureInfraredFrameReference(n)); - } - } - - - // Public Methods - private void __EventCleanup() - { - } - } - -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/MultiSourceFrame.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/MultiSourceFrame.cs.meta deleted file mode 100644 index 3177fce..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/MultiSourceFrame.cs.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: eb5e1a9a4aa7a3f4b8190ab4fab84118 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/MultiSourceFrameArrivedEventArgs.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/MultiSourceFrameArrivedEventArgs.cs deleted file mode 100644 index b4f8e94..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/MultiSourceFrameArrivedEventArgs.cs +++ /dev/null @@ -1,75 +0,0 @@ -using RootSystem = System; -using System.Linq; -using System.Collections.Generic; -namespace Windows.Kinect -{ - // - // Windows.Kinect.MultiSourceFrameArrivedEventArgs - // - public sealed partial class MultiSourceFrameArrivedEventArgs : RootSystem.EventArgs, Helper.INativeWrapper - - { - internal RootSystem.IntPtr _pNative; - RootSystem.IntPtr Helper.INativeWrapper.nativePtr { get { return _pNative; } } - - // Constructors and Finalizers - internal MultiSourceFrameArrivedEventArgs(RootSystem.IntPtr pNative) - { - _pNative = pNative; - Windows_Kinect_MultiSourceFrameArrivedEventArgs_AddRefObject(ref _pNative); - } - - ~MultiSourceFrameArrivedEventArgs() - { - Dispose(false); - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_MultiSourceFrameArrivedEventArgs_ReleaseObject(ref RootSystem.IntPtr pNative); - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_MultiSourceFrameArrivedEventArgs_AddRefObject(ref RootSystem.IntPtr pNative); - private void Dispose(bool disposing) - { - if (_pNative == RootSystem.IntPtr.Zero) - { - return; - } - - __EventCleanup(); - - Helper.NativeObjectCache.RemoveObject(_pNative); - Windows_Kinect_MultiSourceFrameArrivedEventArgs_ReleaseObject(ref _pNative); - - _pNative = RootSystem.IntPtr.Zero; - } - - - // Public Properties - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern RootSystem.IntPtr Windows_Kinect_MultiSourceFrameArrivedEventArgs_get_FrameReference(RootSystem.IntPtr pNative); - public Windows.Kinect.MultiSourceFrameReference FrameReference - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("MultiSourceFrameArrivedEventArgs"); - } - - RootSystem.IntPtr objectPointer = Windows_Kinect_MultiSourceFrameArrivedEventArgs_get_FrameReference(_pNative); - Helper.ExceptionHelper.CheckLastError(); - if (objectPointer == RootSystem.IntPtr.Zero) - { - return null; - } - - return Helper.NativeObjectCache.CreateOrGetObject(objectPointer, n => new Windows.Kinect.MultiSourceFrameReference(n)); - } - } - - private void __EventCleanup() - { - } - } - -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/MultiSourceFrameArrivedEventArgs.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/MultiSourceFrameArrivedEventArgs.cs.meta deleted file mode 100644 index aed9673..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/MultiSourceFrameArrivedEventArgs.cs.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 1188dd030cd382340966a429c46ed4fe -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/MultiSourceFrameReader.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/MultiSourceFrameReader.cs deleted file mode 100644 index 6e946f4..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/MultiSourceFrameReader.cs +++ /dev/null @@ -1,312 +0,0 @@ -using RootSystem = System; -using System.Linq; -using System.Collections.Generic; -namespace Windows.Kinect -{ - // - // Windows.Kinect.MultiSourceFrameReader - // - public sealed partial class MultiSourceFrameReader : RootSystem.IDisposable, Helper.INativeWrapper - - { - internal RootSystem.IntPtr _pNative; - RootSystem.IntPtr Helper.INativeWrapper.nativePtr { get { return _pNative; } } - - // Constructors and Finalizers - internal MultiSourceFrameReader(RootSystem.IntPtr pNative) - { - _pNative = pNative; - Windows_Kinect_MultiSourceFrameReader_AddRefObject(ref _pNative); - } - - ~MultiSourceFrameReader() - { - Dispose(false); - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_MultiSourceFrameReader_ReleaseObject(ref RootSystem.IntPtr pNative); - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_MultiSourceFrameReader_AddRefObject(ref RootSystem.IntPtr pNative); - private void Dispose(bool disposing) - { - if (_pNative == RootSystem.IntPtr.Zero) - { - return; - } - - __EventCleanup(); - - Helper.NativeObjectCache.RemoveObject(_pNative); - - if (disposing) - { - Windows_Kinect_MultiSourceFrameReader_Dispose(_pNative); - } - Windows_Kinect_MultiSourceFrameReader_ReleaseObject(ref _pNative); - - _pNative = RootSystem.IntPtr.Zero; - } - - - // Public Properties - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern Windows.Kinect.FrameSourceTypes Windows_Kinect_MultiSourceFrameReader_get_FrameSourceTypes(RootSystem.IntPtr pNative); - public Windows.Kinect.FrameSourceTypes FrameSourceTypes - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("MultiSourceFrameReader"); - } - - return Windows_Kinect_MultiSourceFrameReader_get_FrameSourceTypes(_pNative); - } - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern bool Windows_Kinect_MultiSourceFrameReader_get_IsPaused(RootSystem.IntPtr pNative); - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_MultiSourceFrameReader_put_IsPaused(RootSystem.IntPtr pNative, bool isPaused); - public bool IsPaused - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("MultiSourceFrameReader"); - } - - return Windows_Kinect_MultiSourceFrameReader_get_IsPaused(_pNative); - } - set - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("MultiSourceFrameReader"); - } - - Windows_Kinect_MultiSourceFrameReader_put_IsPaused(_pNative, value); - Helper.ExceptionHelper.CheckLastError(); - } - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern RootSystem.IntPtr Windows_Kinect_MultiSourceFrameReader_get_KinectSensor(RootSystem.IntPtr pNative); - public Windows.Kinect.KinectSensor KinectSensor - { - get - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("MultiSourceFrameReader"); - } - - RootSystem.IntPtr objectPointer = Windows_Kinect_MultiSourceFrameReader_get_KinectSensor(_pNative); - Helper.ExceptionHelper.CheckLastError(); - if (objectPointer == RootSystem.IntPtr.Zero) - { - return null; - } - - return Helper.NativeObjectCache.CreateOrGetObject(objectPointer, n => new Windows.Kinect.KinectSensor(n)); - } - } - - - // Events - private static RootSystem.Runtime.InteropServices.GCHandle _Windows_Kinect_MultiSourceFrameArrivedEventArgs_Delegate_Handle; - [RootSystem.Runtime.InteropServices.UnmanagedFunctionPointer(RootSystem.Runtime.InteropServices.CallingConvention.Cdecl)] - private delegate void _Windows_Kinect_MultiSourceFrameArrivedEventArgs_Delegate(RootSystem.IntPtr args, RootSystem.IntPtr pNative); - private static Helper.CollectionMap>> Windows_Kinect_MultiSourceFrameArrivedEventArgs_Delegate_callbacks = new Helper.CollectionMap>>(); - [AOT.MonoPInvokeCallbackAttribute(typeof(_Windows_Kinect_MultiSourceFrameArrivedEventArgs_Delegate))] - private static void Windows_Kinect_MultiSourceFrameArrivedEventArgs_Delegate_Handler(RootSystem.IntPtr result, RootSystem.IntPtr pNative) - { - List> callbackList = null; - Windows_Kinect_MultiSourceFrameArrivedEventArgs_Delegate_callbacks.TryGetValue(pNative, out callbackList); - lock(callbackList) - { - var objThis = Helper.NativeObjectCache.GetObject(pNative); - var args = new Windows.Kinect.MultiSourceFrameArrivedEventArgs(result); - foreach(var func in callbackList) - { - Helper.EventPump.Instance.Enqueue(() => { try { func(objThis, args); } catch { } }); - } - } - } - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_MultiSourceFrameReader_add_MultiSourceFrameArrived(RootSystem.IntPtr pNative, _Windows_Kinect_MultiSourceFrameArrivedEventArgs_Delegate eventCallback, bool unsubscribe); - public event RootSystem.EventHandler MultiSourceFrameArrived - { - add - { - Helper.EventPump.EnsureInitialized(); - - Windows_Kinect_MultiSourceFrameArrivedEventArgs_Delegate_callbacks.TryAddDefault(_pNative); - var callbackList = Windows_Kinect_MultiSourceFrameArrivedEventArgs_Delegate_callbacks[_pNative]; - lock (callbackList) - { - callbackList.Add(value); - if(callbackList.Count == 1) - { - var del = new _Windows_Kinect_MultiSourceFrameArrivedEventArgs_Delegate(Windows_Kinect_MultiSourceFrameArrivedEventArgs_Delegate_Handler); - _Windows_Kinect_MultiSourceFrameArrivedEventArgs_Delegate_Handle = RootSystem.Runtime.InteropServices.GCHandle.Alloc(del); - Windows_Kinect_MultiSourceFrameReader_add_MultiSourceFrameArrived(_pNative, del, false); - } - } - } - remove - { - if (_pNative == RootSystem.IntPtr.Zero) - { - return; - } - - Windows_Kinect_MultiSourceFrameArrivedEventArgs_Delegate_callbacks.TryAddDefault(_pNative); - var callbackList = Windows_Kinect_MultiSourceFrameArrivedEventArgs_Delegate_callbacks[_pNative]; - lock (callbackList) - { - callbackList.Remove(value); - if(callbackList.Count == 0) - { - Windows_Kinect_MultiSourceFrameReader_add_MultiSourceFrameArrived(_pNative, Windows_Kinect_MultiSourceFrameArrivedEventArgs_Delegate_Handler, true); - _Windows_Kinect_MultiSourceFrameArrivedEventArgs_Delegate_Handle.Free(); - } - } - } - } - - private static RootSystem.Runtime.InteropServices.GCHandle _Windows_Data_PropertyChangedEventArgs_Delegate_Handle; - [RootSystem.Runtime.InteropServices.UnmanagedFunctionPointer(RootSystem.Runtime.InteropServices.CallingConvention.Cdecl)] - private delegate void _Windows_Data_PropertyChangedEventArgs_Delegate(RootSystem.IntPtr args, RootSystem.IntPtr pNative); - private static Helper.CollectionMap>> Windows_Data_PropertyChangedEventArgs_Delegate_callbacks = new Helper.CollectionMap>>(); - [AOT.MonoPInvokeCallbackAttribute(typeof(_Windows_Data_PropertyChangedEventArgs_Delegate))] - private static void Windows_Data_PropertyChangedEventArgs_Delegate_Handler(RootSystem.IntPtr result, RootSystem.IntPtr pNative) - { - List> callbackList = null; - Windows_Data_PropertyChangedEventArgs_Delegate_callbacks.TryGetValue(pNative, out callbackList); - lock(callbackList) - { - var objThis = Helper.NativeObjectCache.GetObject(pNative); - var args = new Windows.Data.PropertyChangedEventArgs(result); - foreach(var func in callbackList) - { - Helper.EventPump.Instance.Enqueue(() => { try { func(objThis, args); } catch { } }); - } - } - } - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_MultiSourceFrameReader_add_PropertyChanged(RootSystem.IntPtr pNative, _Windows_Data_PropertyChangedEventArgs_Delegate eventCallback, bool unsubscribe); - public event RootSystem.EventHandler PropertyChanged - { - add - { - Helper.EventPump.EnsureInitialized(); - - Windows_Data_PropertyChangedEventArgs_Delegate_callbacks.TryAddDefault(_pNative); - var callbackList = Windows_Data_PropertyChangedEventArgs_Delegate_callbacks[_pNative]; - lock (callbackList) - { - callbackList.Add(value); - if(callbackList.Count == 1) - { - var del = new _Windows_Data_PropertyChangedEventArgs_Delegate(Windows_Data_PropertyChangedEventArgs_Delegate_Handler); - _Windows_Data_PropertyChangedEventArgs_Delegate_Handle = RootSystem.Runtime.InteropServices.GCHandle.Alloc(del); - Windows_Kinect_MultiSourceFrameReader_add_PropertyChanged(_pNative, del, false); - } - } - } - remove - { - if (_pNative == RootSystem.IntPtr.Zero) - { - return; - } - - Windows_Data_PropertyChangedEventArgs_Delegate_callbacks.TryAddDefault(_pNative); - var callbackList = Windows_Data_PropertyChangedEventArgs_Delegate_callbacks[_pNative]; - lock (callbackList) - { - callbackList.Remove(value); - if(callbackList.Count == 0) - { - Windows_Kinect_MultiSourceFrameReader_add_PropertyChanged(_pNative, Windows_Data_PropertyChangedEventArgs_Delegate_Handler, true); - _Windows_Data_PropertyChangedEventArgs_Delegate_Handle.Free(); - } - } - } - } - - - // Public Methods - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern RootSystem.IntPtr Windows_Kinect_MultiSourceFrameReader_AcquireLatestFrame(RootSystem.IntPtr pNative); - public Windows.Kinect.MultiSourceFrame AcquireLatestFrame() - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("MultiSourceFrameReader"); - } - - RootSystem.IntPtr objectPointer = Windows_Kinect_MultiSourceFrameReader_AcquireLatestFrame(_pNative); - Helper.ExceptionHelper.CheckLastError(); - if (objectPointer == RootSystem.IntPtr.Zero) - { - return null; - } - - return Helper.NativeObjectCache.CreateOrGetObject(objectPointer, n => new Windows.Kinect.MultiSourceFrame(n)); - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_MultiSourceFrameReader_Dispose(RootSystem.IntPtr pNative); - public void Dispose() - { - if (_pNative == RootSystem.IntPtr.Zero) - { - return; - } - - Dispose(true); - RootSystem.GC.SuppressFinalize(this); - } - - private void __EventCleanup() - { - { - Windows_Kinect_MultiSourceFrameArrivedEventArgs_Delegate_callbacks.TryAddDefault(_pNative); - var callbackList = Windows_Kinect_MultiSourceFrameArrivedEventArgs_Delegate_callbacks[_pNative]; - lock (callbackList) - { - if (callbackList.Count > 0) - { - callbackList.Clear(); - if (_pNative != RootSystem.IntPtr.Zero) - { - Windows_Kinect_MultiSourceFrameReader_add_MultiSourceFrameArrived(_pNative, Windows_Kinect_MultiSourceFrameArrivedEventArgs_Delegate_Handler, true); - } - _Windows_Kinect_MultiSourceFrameArrivedEventArgs_Delegate_Handle.Free(); - } - } - } - { - Windows_Data_PropertyChangedEventArgs_Delegate_callbacks.TryAddDefault(_pNative); - var callbackList = Windows_Data_PropertyChangedEventArgs_Delegate_callbacks[_pNative]; - lock (callbackList) - { - if (callbackList.Count > 0) - { - callbackList.Clear(); - if (_pNative != RootSystem.IntPtr.Zero) - { - Windows_Kinect_MultiSourceFrameReader_add_PropertyChanged(_pNative, Windows_Data_PropertyChangedEventArgs_Delegate_Handler, true); - } - _Windows_Data_PropertyChangedEventArgs_Delegate_Handle.Free(); - } - } - } - } - } - -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/MultiSourceFrameReader.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/MultiSourceFrameReader.cs.meta deleted file mode 100644 index 6ce3a26..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/MultiSourceFrameReader.cs.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: a52acb4cdb90b3a4fa3937ab27ced4ff -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/MultiSourceFrameReference.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/MultiSourceFrameReference.cs deleted file mode 100644 index 01ffec4..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/MultiSourceFrameReference.cs +++ /dev/null @@ -1,72 +0,0 @@ -using RootSystem = System; -using System.Linq; -using System.Collections.Generic; -namespace Windows.Kinect -{ - // - // Windows.Kinect.MultiSourceFrameReference - // - public sealed partial class MultiSourceFrameReference : Helper.INativeWrapper - - { - internal RootSystem.IntPtr _pNative; - RootSystem.IntPtr Helper.INativeWrapper.nativePtr { get { return _pNative; } } - - // Constructors and Finalizers - internal MultiSourceFrameReference(RootSystem.IntPtr pNative) - { - _pNative = pNative; - Windows_Kinect_MultiSourceFrameReference_AddRefObject(ref _pNative); - } - - ~MultiSourceFrameReference() - { - Dispose(false); - } - - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_MultiSourceFrameReference_ReleaseObject(ref RootSystem.IntPtr pNative); - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern void Windows_Kinect_MultiSourceFrameReference_AddRefObject(ref RootSystem.IntPtr pNative); - private void Dispose(bool disposing) - { - if (_pNative == RootSystem.IntPtr.Zero) - { - return; - } - - __EventCleanup(); - - Helper.NativeObjectCache.RemoveObject(_pNative); - Windows_Kinect_MultiSourceFrameReference_ReleaseObject(ref _pNative); - - _pNative = RootSystem.IntPtr.Zero; - } - - - // Public Methods - [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] - private static extern RootSystem.IntPtr Windows_Kinect_MultiSourceFrameReference_AcquireFrame(RootSystem.IntPtr pNative); - public Windows.Kinect.MultiSourceFrame AcquireFrame() - { - if (_pNative == RootSystem.IntPtr.Zero) - { - throw new RootSystem.ObjectDisposedException("MultiSourceFrameReference"); - } - - RootSystem.IntPtr objectPointer = Windows_Kinect_MultiSourceFrameReference_AcquireFrame(_pNative); - Helper.ExceptionHelper.CheckLastError(); - if (objectPointer == RootSystem.IntPtr.Zero) - { - return null; - } - - return Helper.NativeObjectCache.CreateOrGetObject(objectPointer, n => new Windows.Kinect.MultiSourceFrame(n)); - } - - private void __EventCleanup() - { - } - } - -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/MultiSourceFrameReference.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/MultiSourceFrameReference.cs.meta deleted file mode 100644 index 911a5e7..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/MultiSourceFrameReference.cs.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 8e2ed2961bcca974085bf9ddcaaac6a9 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/NativeObjectCache.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/NativeObjectCache.cs deleted file mode 100644 index 0155367..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/NativeObjectCache.cs +++ /dev/null @@ -1,136 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Runtime.InteropServices; -using System.Linq; - -namespace Helper -{ - public static class NativeObjectCache - { - private static object _lock = new object(); - private static Dictionary> _objectCache = new Dictionary>(); - public static void AddObject(IntPtr nativePtr, T obj) where T : class - { - lock (_lock) - { - Dictionary objCache = null; - - if (!_objectCache.TryGetValue(typeof(T), out objCache) || objCache == null) - { - objCache = new Dictionary(); - _objectCache[typeof(T)] = objCache; - } - - objCache[nativePtr] = new WeakReference(obj); - } - } - - public static void Flush() - { - lock(_lock) - { - foreach (var byType in _objectCache.ToArray()) - { - foreach(var kvp in byType.Value.ToArray()) - { - IDisposable disp = kvp.Value.Target as IDisposable; - if(disp != null) - { - disp.Dispose(); - } - - } - } - } - } - - public static void RemoveObject(IntPtr nativePtr) - { - lock (_lock) - { - Dictionary objCache = null; - - if (!_objectCache.TryGetValue(typeof(T), out objCache) || objCache == null) - { - objCache = new Dictionary(); - _objectCache[typeof(T)] = objCache; - } - - if (objCache.ContainsKey(nativePtr)) - { - objCache.Remove(nativePtr); - } - } - } - - public static T GetObject(IntPtr nativePtr) where T : class - { - lock (_lock) - { - Dictionary objCache = null; - - if (!_objectCache.TryGetValue(typeof(T), out objCache) || objCache == null) - { - objCache = new Dictionary(); - _objectCache[typeof(T)] = objCache; - } - - WeakReference reference = null; - if (objCache.TryGetValue(nativePtr, out reference)) - { - if (reference != null) - { - T obj = reference.Target as T; - if (obj != null) - { - return (T)obj; - } - } - } - - return null; - } - } - - public static T CreateOrGetObject(IntPtr nativePtr, Func create) where T : class - { - T outputValue = null; - - lock (_lock) - { - Dictionary objCache = null; - - if (!_objectCache.TryGetValue(typeof(T), out objCache) || objCache == null) - { - objCache = new Dictionary(); - _objectCache[typeof(T)] = objCache; - } - - WeakReference reference = null; - if (objCache.TryGetValue(nativePtr, out reference)) - { - if ((reference != null) && reference.IsAlive) - { - outputValue = reference.Target as T; - } - } - - if (outputValue == null) - { - if (create != null) - { - outputValue = create(nativePtr); - objCache[nativePtr] = new WeakReference(outputValue); - } - else if(typeof(T) == typeof(System.Object)) - { - //T is an object, so lets just pass back our IntPtr, which is an object. - outputValue = (T)(System.Object)nativePtr; - } - } - } - - return outputValue; - } - } -} \ No newline at end of file diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/NativeObjectCache.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/NativeObjectCache.cs.meta deleted file mode 100644 index 9058bc5..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/NativeObjectCache.cs.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 96cf7d466b0b0bb4d92fb09d817ad613 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/NativeWrapper.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/NativeWrapper.cs deleted file mode 100644 index 1bde8c9..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/NativeWrapper.cs +++ /dev/null @@ -1,28 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Runtime.InteropServices; -using System.Linq; - -namespace Helper -{ - public static class NativeWrapper - { - public static System.IntPtr GetNativePtr(Object obj) - { - if(obj == null) - { - return System.IntPtr.Zero; - } - - var nativeWrapperIface = obj as INativeWrapper; - if(nativeWrapperIface != null) - { - return nativeWrapperIface.nativePtr; - } - else - { - throw new ArgumentException("Object must wrap native type"); - } - } - } -} \ No newline at end of file diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/NativeWrapper.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/NativeWrapper.cs.meta deleted file mode 100644 index 4953afd..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/NativeWrapper.cs.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 0eb32acf7ae62044194131ae0f7e4516 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/SmartGCHandle.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/SmartGCHandle.cs deleted file mode 100644 index aac853b..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/SmartGCHandle.cs +++ /dev/null @@ -1,42 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Runtime.InteropServices; -using System.Linq; - -namespace Helper -{ - public class SmartGCHandle : IDisposable - { - private GCHandle handle; - public SmartGCHandle(GCHandle handle) - { - this.handle = handle; - } - - ~SmartGCHandle() - { - Dispose(false); - } - - public System.IntPtr AddrOfPinnedObject() - { - return handle.AddrOfPinnedObject(); - } - - public virtual void Dispose() - { - Dispose(true); - } - - protected virtual void Dispose(bool disposing) - { - this.handle.Free(); - } - - public static implicit operator GCHandle(SmartGCHandle other) - { - - return other.handle; - } - } -} \ No newline at end of file diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/SmartGCHandle.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/SmartGCHandle.cs.meta deleted file mode 100644 index d39d738..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/SmartGCHandle.cs.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: adc912eeb5de2014f9ca670eca6ac808 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/ThreadSafeDictionary.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/ThreadSafeDictionary.cs deleted file mode 100644 index 6759a4c..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/ThreadSafeDictionary.cs +++ /dev/null @@ -1,61 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Runtime.InteropServices; -using System.Linq; - -namespace Helper -{ - public class ThreadSafeDictionary - { - protected readonly Dictionary _impl = new Dictionary(); - public TValue this[TKey key] - { - get - { - lock (_impl) - { - return _impl[key]; - } - } - set - { - lock (_impl) - { - _impl[key] = value; - } - } - } - - public void Add(TKey key, TValue value) - { - lock (_impl) - { - _impl.Add(key, value); - } - } - - public bool TryGetValue(TKey key, out TValue value) - { - lock (_impl) - { - return _impl.TryGetValue(key, out value); - } - } - - public bool Remove(TKey key) - { - lock (_impl) - { - return _impl.Remove(key); - } - } - - public void Clear() - { - lock (_impl) - { - _impl.Clear(); - } - } - } -} \ No newline at end of file diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/ThreadSafeDictionary.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/ThreadSafeDictionary.cs.meta deleted file mode 100644 index 141ff42..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/ThreadSafeDictionary.cs.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: b31ad795626855f41842734c10d2a41f -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/TrackingConfidence.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/TrackingConfidence.cs deleted file mode 100644 index cdedb9e..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/TrackingConfidence.cs +++ /dev/null @@ -1,15 +0,0 @@ -using RootSystem = System; -using System.Linq; -using System.Collections.Generic; -namespace Windows.Kinect -{ - // - // Windows.Kinect.TrackingConfidence - // - public enum TrackingConfidence : int - { - Low =0, - High =1, - } - -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/TrackingConfidence.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/TrackingConfidence.cs.meta deleted file mode 100644 index c2d594f..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/TrackingConfidence.cs.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 7fc638ac4166d2945b7efa3e6699e510 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/TrackingState.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/TrackingState.cs deleted file mode 100644 index f18ef9b..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/TrackingState.cs +++ /dev/null @@ -1,16 +0,0 @@ -using RootSystem = System; -using System.Linq; -using System.Collections.Generic; -namespace Windows.Kinect -{ - // - // Windows.Kinect.TrackingState - // - public enum TrackingState : int - { - NotTracked =0, - Inferred =1, - Tracked =2, - } - -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/TrackingState.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/TrackingState.cs.meta deleted file mode 100644 index 0082fb6..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/TrackingState.cs.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 7448c7529f8b6564bb3357abc07b1ccf -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/Vector4.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/Vector4.cs deleted file mode 100644 index ea9679a..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/Vector4.cs +++ /dev/null @@ -1,48 +0,0 @@ -using RootSystem = System; -using System.Linq; -using System.Collections.Generic; -namespace Windows.Kinect -{ - // - // Windows.Kinect.Vector4 - // - [RootSystem.Runtime.InteropServices.StructLayout(RootSystem.Runtime.InteropServices.LayoutKind.Sequential)] - public struct Vector4 - { - public float X { get; set; } - public float Y { get; set; } - public float Z { get; set; } - public float W { get; set; } - - public override int GetHashCode() - { - return X.GetHashCode() ^ Y.GetHashCode() ^ Z.GetHashCode() ^ W.GetHashCode(); - } - - public override bool Equals(object obj) - { - if (!(obj is Vector4)) - { - return false; - } - - return this.Equals((Vector4)obj); - } - - public bool Equals(Vector4 obj) - { - return X.Equals(obj.X) && Y.Equals(obj.Y) && Z.Equals(obj.Z) && W.Equals(obj.W); - } - - public static bool operator ==(Vector4 a, Vector4 b) - { - return a.Equals(b); - } - - public static bool operator !=(Vector4 a, Vector4 b) - { - return !(a.Equals(b)); - } - } - -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/Vector4.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/Vector4.cs.meta deleted file mode 100644 index 09244aa..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/3rdParty/Standard Assets/Windows/Kinect/Vector4.cs.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 6722a9a2a7c5eaa4f98f57c7aca7cfab -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/Camera.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/Camera.meta deleted file mode 100644 index 62e0248..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/Camera.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: d10ac49b2e099e94d9bb4ac5bf20de1a -folderAsset: yes -timeCreated: 1488333528 -licenseType: Free -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/Camera/ComposerSettings.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/Camera/ComposerSettings.cs deleted file mode 100644 index e743b8a..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/Camera/ComposerSettings.cs +++ /dev/null @@ -1,71 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -namespace uc -{ - [CreateAssetMenu(menuName = "UC/FMCR/ComposerSettings")] - public sealed class ComposerSettings : ScriptableObject - { - [Tooltip("Target offset from the object's center in LOCAL space which the Composer tracks. Use this to fine-tune the tracking target position when the desired area is not in the tracked object's center.")] - public Vector3 TrackedObjectOffset; - - [SerializeField] - public float horizontalSoftDamping = 0.5f; - [SerializeField] - public float verticalSoftDamping = 0.5f; - [SerializeField] - public float dutchDamping = 0f; - - [SerializeField] - [Range(0, 1)] - float softLeft = 0.47f; - [SerializeField] - [Range(0, 1)] - float softRight = 0.53f; - [SerializeField] - [Range(0, 1)] - float softTop = 0.55f; - [SerializeField] - [Range(0, 1)] - float softBottom = 0.45f; - - [SerializeField] - [Range(0, 1)] - float hardLeft = 0.06f; - [SerializeField] - [Range(0, 1)] - float hardRight = 0.94f; - [SerializeField] - [Range(0, 1)] - float hardTop = 0.9f; - [SerializeField] - [Range(0, 1)] - float hardBottom = 0.1f; - - [SerializeField] - [Range(-180,180)] - float dutch = 0; - - public ComposerSettings() { } - - public float Dutch { get { return dutch; } } - - public float HardGuideBottom { get { return hardBottom; } } - public float HardGuideLeft { get { return hardLeft; } } - public Rect HardGuideRect { get { return new Rect(HardGuideLeft, HardGuideBottom, HardGuideRight - HardGuideLeft, HardGuideTop - HardGuideBottom); } } - public float HardGuideRight { get { return hardRight; } } - //public Vector4 HardGuideScreenPercents { get { return 0; } } - public float HardGuideTop { get { return hardTop; } } - public float HorizontalSoftTrackingSpeed { get { return horizontalSoftDamping / 10; } } - public float SoftGuideBottom { get { return softBottom; } } - public float SoftGuideLeft { get { return softLeft; } } - public Rect SoftGuideRect { get { return new Rect(SoftGuideLeft, SoftGuideBottom, SoftGuideRight - SoftGuideLeft, SoftGuideTop - SoftGuideBottom); } } - public float SoftGuideRight { get { return softRight; } } - //public Vector4 SoftGuideScreenPercents { get { return 0; } } - public float SoftGuideTop { get { return softTop; } } - public float VerticalSoftTrackingSpeed { get { return verticalSoftDamping / 10; } } - public float DutchTrackingSpeed { get { return dutchDamping / 10; } } - //public static void BlendSettings(ComposerSettings settingA, ComposerSettings settingB, float blendAmount, ref ComposerSettings blendedOutSettings) { } - } -} \ No newline at end of file diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/Camera/ComposerSettings.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/Camera/ComposerSettings.cs.meta deleted file mode 100644 index 95e9139..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/Camera/ComposerSettings.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 4716f57de0444e1418e4e959c5e6e8aa -timeCreated: 1493192675 -licenseType: Free -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/Camera/FreeMotionCameraRig.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/Camera/FreeMotionCameraRig.meta deleted file mode 100644 index 94004bb..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/Camera/FreeMotionCameraRig.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: ae0f72afc42df784791032f5ff4e2fd8 -folderAsset: yes -timeCreated: 1488031767 -licenseType: Free -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/Camera/FreeMotionCameraRig/Editor.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/Camera/FreeMotionCameraRig/Editor.meta deleted file mode 100644 index fd21bff..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/Camera/FreeMotionCameraRig/Editor.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: d407a8777980b0d4698ebb87e1e9b61d -folderAsset: yes -timeCreated: 1493277677 -licenseType: Free -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/Camera/FreeMotionCameraRig/Editor/ComposerSettingsEditor.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/Camera/FreeMotionCameraRig/Editor/ComposerSettingsEditor.cs deleted file mode 100644 index b8ad066..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/Camera/FreeMotionCameraRig/Editor/ComposerSettingsEditor.cs +++ /dev/null @@ -1,150 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using uc; -using UnityEditor; -using UnityEngine; - -[CustomEditor(typeof(ComposerSettings))] -[CanEditMultipleObjects] -public class ComposerSettingsEditor : Editor { - SerializedProperty TrackedObjectOffset; - SerializedProperty horizontalSoftDamping; - SerializedProperty verticalSoftDamping; - SerializedProperty dutchDamping; - SerializedProperty softLeft; - SerializedProperty softRight; - SerializedProperty softTop; - SerializedProperty softBottom; - SerializedProperty hardLeft; - SerializedProperty hardRight; - SerializedProperty hardTop; - SerializedProperty hardBottom; - SerializedProperty dutch; - - private void OnEnable() - { - TrackedObjectOffset = serializedObject.FindProperty("TrackedObjectOffset"); - horizontalSoftDamping = serializedObject.FindProperty("horizontalSoftDamping"); - verticalSoftDamping = serializedObject.FindProperty("verticalSoftDamping"); - dutchDamping = serializedObject.FindProperty("dutchDamping"); - softLeft = serializedObject.FindProperty("softLeft"); - softRight = serializedObject.FindProperty("softRight"); - softTop = serializedObject.FindProperty("softTop"); - softBottom = serializedObject.FindProperty("softBottom"); - hardLeft = serializedObject.FindProperty("hardLeft"); - hardRight = serializedObject.FindProperty("hardRight"); - hardTop = serializedObject.FindProperty("hardTop"); - hardBottom = serializedObject.FindProperty("hardBottom"); - dutch = serializedObject.FindProperty("dutch"); - } - - //private Editor _editor; - - delegate void DrawMinMax(string label, SerializedProperty minV, SerializedProperty maxV, float min, float max); - - public override void OnInspectorGUI() - { - //ComposerSettings cs = target as ComposerSettings; - serializedObject.Update(); - EditorGUILayout.PropertyField(TrackedObjectOffset); - EditorGUILayout.PropertyField(horizontalSoftDamping); - EditorGUILayout.PropertyField(verticalSoftDamping); - EditorGUILayout.PropertyField(dutchDamping); - - - DrawMinMax drawMinMax = (string label, SerializedProperty minV, SerializedProperty maxV, float min, float max) => - { - float sl = minV.floatValue; - float sr = maxV.floatValue; - EditorGUILayout.MinMaxSlider(label, ref sl, ref sr, 0, 1); - minV.floatValue = sl; - maxV.floatValue = sr; - }; - - EditorGUILayout.Separator(); - EditorGUILayout.LabelField("Left Right"); - - float[] prevMin = { hardLeft.floatValue, softLeft.floatValue }; - float[] prevMax = { softRight.floatValue, hardRight.floatValue }; - - drawMinMax("Soft", softLeft, softRight, 0, 1); - drawMinMax("Hard", hardLeft, hardRight, 0, 1); - - if(hardLeft.floatValue > softLeft.floatValue) - { - if (prevMin[0] != hardLeft.floatValue) - { - softLeft.floatValue = hardLeft.floatValue; - } - else if (prevMin[1] != softLeft.floatValue) - { - hardLeft.floatValue = softLeft.floatValue; - } - } - - if (hardRight.floatValue < softRight.floatValue) - { - if (prevMax[0] != softRight.floatValue) - { - hardRight.floatValue = softRight.floatValue; - } - else if (prevMax[1] != hardRight.floatValue) - { - softRight.floatValue = hardRight.floatValue; - } - } - - EditorGUILayout.BeginHorizontal(); - hardLeft.floatValue = EditorGUILayout.FloatField(hardLeft.floatValue); - softLeft.floatValue = EditorGUILayout.FloatField(softLeft.floatValue); - softRight.floatValue = EditorGUILayout.FloatField(softRight.floatValue); - hardRight.floatValue = EditorGUILayout.FloatField(hardRight.floatValue); - EditorGUILayout.EndHorizontal(); - - EditorGUILayout.Separator(); - EditorGUILayout.LabelField("Botton Top"); - - prevMin = new float[]{ hardBottom.floatValue, softBottom.floatValue }; - prevMax = new float[] { softTop.floatValue, hardTop.floatValue }; - - drawMinMax("Soft", softBottom, softTop, 0, 1); - drawMinMax("Hard", hardBottom, hardTop, 0, 1); - - if (hardBottom.floatValue > softBottom.floatValue) - { - if (prevMin[0] != hardBottom.floatValue) - { - softBottom.floatValue = hardBottom.floatValue; - } - else if (prevMin[1] != softBottom.floatValue) - { - hardBottom.floatValue = softBottom.floatValue; - } - } - - if (hardTop.floatValue < softTop.floatValue) - { - if (prevMax[0] != softTop.floatValue) - { - hardTop.floatValue = softTop.floatValue; - } - else if (prevMax[1] != hardTop.floatValue) - { - softTop.floatValue = hardTop.floatValue; - } - } - - EditorGUILayout.BeginHorizontal(); - hardBottom.floatValue = EditorGUILayout.FloatField(hardBottom.floatValue); - softBottom.floatValue = EditorGUILayout.FloatField(softBottom.floatValue); - softTop.floatValue = EditorGUILayout.FloatField(softTop.floatValue); - hardTop.floatValue = EditorGUILayout.FloatField(hardTop.floatValue); - EditorGUILayout.EndHorizontal(); - - EditorGUILayout.Separator(); - EditorGUILayout.PropertyField(dutch); - - serializedObject.ApplyModifiedProperties(); - } -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/Camera/FreeMotionCameraRig/Editor/ComposerSettingsEditor.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/Camera/FreeMotionCameraRig/Editor/ComposerSettingsEditor.cs.meta deleted file mode 100644 index fc747a6..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/Camera/FreeMotionCameraRig/Editor/ComposerSettingsEditor.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 9772279284123cb44b7ad9b9d3f8b51a -timeCreated: 1493790897 -licenseType: Free -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/Camera/FreeMotionCameraRig/Editor/FMCRViewer.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/Camera/FreeMotionCameraRig/Editor/FMCRViewer.cs deleted file mode 100644 index deacf3b..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/Camera/FreeMotionCameraRig/Editor/FMCRViewer.cs +++ /dev/null @@ -1,132 +0,0 @@ -using System; -using uc; -using UnityEditor; -using UnityEngine; - -[CustomEditor(typeof(FMCRControl))] -[CanEditMultipleObjects] -public class MeshFilterPreview : Editor -{ - private PreviewRenderUtility _previewRenderUtility; - - SerializedProperty composerSettings; - SerializedProperty transposerSettings; - - private void OnEnable() - { - composerSettings = serializedObject.FindProperty("composerSettings"); - transposerSettings = serializedObject.FindProperty("transposerSettings"); - } - - private Editor _editor; - - public override void OnInspectorGUI() - { - serializedObject.Update(); - DrawDefaultInspector(); - serializedObject.ApplyModifiedProperties(); - - FMCRControl fmcr = target as FMCRControl; - if (fmcr == null) - return; - CreateCachedEditor(composerSettings.objectReferenceValue, null, ref _editor); - if (_editor != null) - { - EditorGUILayout.Separator(); - EditorGUILayout.BeginVertical("Box"); - EditorGUILayout.LabelField(composerSettings.displayName, EditorStyles.boldLabel); - _editor.OnInspectorGUI(); - EditorGUILayout.EndVertical(); - } - CreateCachedEditor(transposerSettings.objectReferenceValue, null, ref _editor); - if (_editor != null) - { - EditorGUILayout.Separator(); - EditorGUILayout.BeginVertical("Box"); - EditorGUILayout.LabelField(transposerSettings.displayName, EditorStyles.boldLabel); - _editor.OnInspectorGUI(); - EditorGUILayout.EndVertical(); - } - } - - private void ValidateData() - { - if (_previewRenderUtility == null) - _previewRenderUtility = new PreviewRenderUtility(true); - } - - public override bool HasPreviewGUI() - { - FMCRControl fmcrControl = target as FMCRControl; - ValidateData(); - return fmcrControl.FMCR != null; - } - - public override bool RequiresConstantRepaint() - { - if (Application.isPlaying == true) - return false; - else - return true; - } - - public override void OnPreviewGUI(Rect r, GUIStyle background) - { - FMCRControl fmcrControl = target as FMCRControl; - if (fmcrControl == null || fmcrControl.FMCR == null || fmcrControl.FMCR.FMCRCamera == null) - return; - - if (Event.current.type == EventType.Repaint) - { - _previewRenderUtility.BeginPreview(fmcrControl.FMCR.FMCRCamera.pixelRect, background); - _previewRenderUtility.camera.transform.position = fmcrControl.vCamPosition; - _previewRenderUtility.camera.transform.rotation = fmcrControl.vCamRotation; - _previewRenderUtility.camera.fieldOfView = fmcrControl.fieldOfView; - _previewRenderUtility.camera.nearClipPlane = fmcrControl.nearClipPlane; - _previewRenderUtility.camera.farClipPlane = fmcrControl.farClipPlane; - _previewRenderUtility.camera.aspect = fmcrControl.FMCR.FMCRCamera.aspect; - _previewRenderUtility.camera.Render(); - - Texture resultRender = _previewRenderUtility.EndPreview(); - - Camera cam = _previewRenderUtility.camera; - - Rect rr = cam.pixelRect.FitIntoRect(r); - - GUI.DrawTexture(rr, resultRender); - fmcrControl.DrawComposerGUI(cam, rr); - } - if (Event.current.type == EventType.Layout) - { - //Debug.Log("Layout"); - } - } - - void OnDestroy() - { - if (_previewRenderUtility != null) - _previewRenderUtility.Cleanup(); - } - - [DrawGizmo(GizmoType.Selected | GizmoType.NonSelected)] - static void DrawGizmo_FMCRControl(FMCRControl scr, GizmoType gizmoType) - { - Vector3 position = scr.transform.position; - - Matrix4x4 m = Gizmos.matrix; - Gizmos.matrix = Matrix4x4.TRS(scr.vCamPosition, scr.vCamRotation, Vector3.one); - Color hex_color; - if (ColorUtility.TryParseHtmlString("#633F5B", out hex_color)) - { - Gizmos.color = hex_color; - Gizmos.DrawFrustum(new Vector3(0, 0, scr.nearClipPlane), scr.fieldOfView, scr.farClipPlane, scr.nearClipPlane, scr.CurrentAspect); - } - Gizmos.matrix = m; - } - - [DrawGizmo(GizmoType.Pickable)] - static void DrawGizmo_FreeMotionCameraRig(FreeMotionCameraRig scr, GizmoType gizmoType) - { - - } -} \ No newline at end of file diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/Camera/FreeMotionCameraRig/Editor/FMCRViewer.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/Camera/FreeMotionCameraRig/Editor/FMCRViewer.cs.meta deleted file mode 100644 index eba4655..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/Camera/FreeMotionCameraRig/Editor/FMCRViewer.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 90858f6da5f0f494f9c500ee95c7baa4 -timeCreated: 1493277204 -licenseType: Free -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/Camera/FreeMotionCameraRig/FMCRControl.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/Camera/FreeMotionCameraRig/FMCRControl.cs deleted file mode 100644 index c408120..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/Camera/FreeMotionCameraRig/FMCRControl.cs +++ /dev/null @@ -1,428 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using uc; -#if UNITY_EDITOR -using UnityEditor; -#endif -using UnityEngine; - -[ExecuteInEditMode] -public class FMCRControl : MonoBehaviour -{ - public enum BlendStrategy - { - CutCubic, - Cubic, - Akima - } - - [Header("Control")] - public bool autoAddToPriority = true; - public int priority = 0; - - [Header("Lens")] - [Range(1, 179)] - public int fieldOfView = 60; - public float nearClipPlane = 0.3f; - public float farClipPlane = 1000; - - [Header("FMCR")] - public BlendStrategy blendStrategy = BlendStrategy.CutCubic; - - public FreeMotionCameraRig FMCR; - - public ComposerSettings composerSettings; - public Transform composerTarget; - - public TransposerSettings transposerSettings; - public Transform transposerTarget; - - [SerializeField] - public static bool showCameraGuide = false; - - public Vector3 vCamPosition { get { return transposerTargetPosition; } } - public Quaternion vCamRotation - { - get - { - float fov = fieldOfView * Mathf.Deg2Rad; - - float z = 0.5f / Mathf.Tan(fov / 2); - float v_point = 0.5f; - float h_point = 0.5f; - float dutch = 0; - if (composerSettings != null) - { - v_point = composerSettings.SoftGuideBottom * 0.5f + composerSettings.SoftGuideTop * 0.5f; - h_point = composerSettings.SoftGuideLeft * 0.5f + composerSettings.SoftGuideRight * 0.5f; - dutch = composerSettings.Dutch; - } - float angle_v = Mathf.Atan2(v_point - 0.5f, z) * Mathf.Rad2Deg; - float aspect = 1; - if (FMCR != null && FMCR.FMCRCamera != null) - aspect = FMCR.FMCRCamera.aspect; - float angle_h = -Mathf.Atan2(h_point - 0.5f, z / aspect) * Mathf.Rad2Deg; - Quaternion rotation = Quaternion.identity; - Vector3 lookat = composerTargetPosition - transposerTargetPosition; - if (lookat == Vector3.zero) - rotation *= transposerTarget.rotation; - else - rotation *= Quaternion.LookRotation(lookat); - rotation *= Quaternion.Euler(angle_v, angle_h, dutch); - - return rotation; - } - } - - public class myReverserClass : IComparer - { - int IComparer.Compare(int x, int y) { return y - x; } - } - static SortedList priorityList = new SortedList(new myReverserClass()); - static FMCRControl activeControl = null; - static public FMCRControl ActiveControl { get { return activeControl; } } - - public Vector3 composerTargetPosition - { - get - { - Vector3 p = Vector3.zero; - Transform target = transform; - - if (composerTarget != null) - target = composerTarget; - else if (transposerTarget != null) - target = transposerTarget; - - p += target.position; - - //screen space?? - if (composerSettings != null) - p += target.TransformVector(composerSettings.TrackedObjectOffset); - - return p; - } - } - - Vector3 transposerTargetPosition - { - get - { - Vector3 position = Vector3.zero; - Transform target = transform; - - if (transposerTarget != null) - target = transposerTarget; - - position += target.position; - - if (transposerSettings != null) - { - switch (transposerSettings.TransposerOffsetMode) - { - case TransposerSettings.TransposerOffsetType.LocalSpaceOnTargetAssignment: - Debug.LogError("transposerTargetPosition for LocalSpaceOnTargetAssignment is not implemeted."); - break; - case TransposerSettings.TransposerOffsetType.LocalSpaceLockedUpVector: - Debug.LogError("transposerTargetPosition for LocalSpaceLockedUpVector is not implemeted."); - break; - case TransposerSettings.TransposerOffsetType.LocalSpaceLockedToTarget: - position += target.TransformVector(transposerSettings.OffsetFromTarget); - break; - case TransposerSettings.TransposerOffsetType.WorldSpace: - position += transposerSettings.OffsetFromTarget; - break; - } - } - return position; - } - } - - private void OnEnable() - { - if (priorityList.ContainsKey(priority)) - { - priorityList.Remove(priority); - } - if (autoAddToPriority) - priorityList.Add(priority, this); - UpdateActiveControl(); - } - - private void OnDisable() - { - if (priorityList.ContainsKey(priority) && priorityList[priority] == this) - { - priorityList.Remove(priority); - } - UpdateActiveControl(); - } - - void UpdateActiveControl() - { - if (priorityList.Count > 0) - { - IEnumerator> it = priorityList.GetEnumerator(); - it.MoveNext(); - activeControl = it.Current.Value; - } - } - - // Update is called once per frame - void Update() - { - if (activeControl != this || Application.isPlaying == false) - return; - - if (FMCR != null && FMCR.FMCRCamera != null) - { - FMCR.FMCRCamera.fieldOfView = fieldOfView; - FMCR.FMCRCamera.nearClipPlane = nearClipPlane; - FMCR.FMCRCamera.farClipPlane = farClipPlane; - } - UpdateTransposer(); - UpdateComposer(); - } - - Rect softRect = new Rect(0.5f, 0.5f, 0, 0); - Rect hardRect = new Rect(0,0,1,1); - float fov = 0; - float aspect = 1; - - public float CurrentAspect { get { return aspect; } } - - float hSpeed = 1; - float vSpeed = 1; - float dSpeed = 1; - float softLeftAngle = 0; - float softRightAngle = 0; - float softTopAngle = 0; - float softBottomAngle = 0; - //float hardLeftAngle = 0; - //float hardRightAngle = 0; - //float hardTopAngle = 0; - //float hardBottomAngle = 0; - float dutch = 0; - - void UpdateAngle() - { - bool needUpdate = false; - if (composerSettings != null) - { - if (softRect != composerSettings.SoftGuideRect || hardRect != composerSettings.HardGuideRect) - { - softRect = composerSettings.SoftGuideRect; - hardRect = composerSettings.HardGuideRect; - hSpeed = composerSettings.HorizontalSoftTrackingSpeed; - vSpeed = composerSettings.VerticalSoftTrackingSpeed; - dSpeed = composerSettings.DutchTrackingSpeed; - dutch = composerSettings.Dutch; - needUpdate = true; - } - } - if (FMCR != null && FMCR.FMCRCamera != null) - { - if (fov != FMCR.FMCRCamera.fieldOfView || aspect != FMCR.FMCRCamera.aspect) - { - fov = FMCR.FMCRCamera.fieldOfView; - aspect = FMCR.FMCRCamera.aspect; - needUpdate = true; - } - } - - if (needUpdate) - { - float z = 0.5f / Mathf.Tan(fov * Mathf.Deg2Rad / 2); - //hardLeftAngle = -Mathf.Atan2(hardRect.xMin - 0.5f, z / aspect) * Mathf.Rad2Deg; - //hardRightAngle = -Mathf.Atan2(hardRect.xMax - 0.5f, z / aspect) * Mathf.Rad2Deg; - softLeftAngle = -Mathf.Atan2(softRect.xMin - 0.5f, z / aspect) * Mathf.Rad2Deg; - softRightAngle = -Mathf.Atan2(softRect.xMax - 0.5f, z / aspect) * Mathf.Rad2Deg; - softTopAngle = -Mathf.Atan2(softRect.yMin - 0.5f, z) * Mathf.Rad2Deg; - softBottomAngle = -Mathf.Atan2(softRect.yMax - 0.5f, z) * Mathf.Rad2Deg; - //hardTopAngle = -Mathf.Atan2(hardRect.yMin - 0.5f, z) * Mathf.Rad2Deg; - //hardBottomAngle = -Mathf.Atan2(hardRect.yMax - 0.5f, z) * Mathf.Rad2Deg; - } - } - - void UpdateComposer() - { - if (FMCR == null || FMCR.FMCRCamera == null) - return; - - UpdateAngle(); - - Vector3 screenPoint = FMCR.FMCRCamera.WorldToViewportPoint(composerTargetPosition); - - //is this necessary? - if (screenPoint.z == 0) - return; - - float hStep = Mathf.Clamp01(Time.deltaTime / hSpeed); - float vStep = Mathf.Clamp01(Time.deltaTime / vSpeed); - float dStep = Mathf.Clamp01(Time.deltaTime / dSpeed); - - { - float sideways = FMCR.sideways; - //float angle_hl = UC.Math.Nearest360(hardLeftAngle, sideways); - //float angle_hr = UC.Math.Nearest360(hardRightAngle, sideways); - float angle_sl = UC.Math.Nearest360(softLeftAngle, sideways); - float angle_sr = UC.Math.Nearest360(softRightAngle, sideways); - //if (horizontal > angle_hl) - // FMCR.sideways = angle_sl; - //else if (horizontal < angle_hr) - // FMCR.sideways = angle_sr; - //else - if (FMCR.sideways > angle_sl) - FMCR.sideways = Mathf.Lerp(sideways, angle_sl, hStep); - else if (FMCR.sideways < angle_sr) - FMCR.sideways = Mathf.Lerp(sideways, angle_sr, hStep); - } - { - float tilt = FMCR.tilt; - //float angle_hb = UC.Math.Nearest360(hardBottomAngle, tilt); - //float angle_ht = UC.Math.Nearest360(hardTopAngle, tilt); - float angle_sb = UC.Math.Nearest360(softBottomAngle, tilt); - float angle_st = UC.Math.Nearest360(softTopAngle, tilt); - //if (vertical > angle_hb) - // FMCR.sideways = angle_sb; - //else if (vertical < angle_ht) - // FMCR.sideways = angle_st; - //else - if (FMCR.tilt > angle_sb) - FMCR.tilt = Mathf.Lerp(tilt, angle_sb, vStep); - else if (FMCR.tilt < angle_st) - FMCR.tilt = Mathf.Lerp(tilt, angle_st, vStep); - } - - FMCR.roll = Mathf.Lerp(FMCR.roll, dutch, dStep); - } - - void UpdateTransposer() - { - if (FMCR == null) - return; - - Vector3 step = Vector3.one; - - if (transposerSettings != null) - { - step.x = Mathf.Clamp01(Time.deltaTime / transposerSettings.TrackingSpeeds.x); - step.y = Mathf.Clamp01(Time.deltaTime / transposerSettings.TrackingSpeeds.y); - step.z = Mathf.Clamp01(Time.deltaTime / transposerSettings.TrackingSpeeds.z); - } - - Vector3 originTransformPosition = FMCR.NodePosition; - - bool isCutCubic = (blendStrategy == BlendStrategy.CutCubic); - FMCR.transform.position = Lerp(FMCR.transform.position, composerTargetPosition, isCutCubic ? Vector3.one : step); - - - Vector3 a = FMCR.transform.InverseTransformPoint(transposerTargetPosition); - Vector3 b = FMCR.transform.InverseTransformPoint(originTransformPosition); - - bool isAkima = (blendStrategy == BlendStrategy.Akima); - Vector3 hvdTarget = FMCR.XYZToHVDNearest(Lerp(b, a, isAkima ? Vector3.one : step)); - - //TODO - if (transposerTargetPosition == composerTargetPosition && transposerSettings != null && transposerSettings.OffsetFromTarget == Vector3.zero) - { - hvdTarget = FMCR.RotationToHVD(transposerTarget.rotation, 0.1f); - hvdTarget.z = 0; - } - - FMCR.horizon = Mathf.Lerp(FMCR.horizon, hvdTarget.x, isAkima ? step.x : 1); - FMCR.vertical = Mathf.Lerp(FMCR.vertical, hvdTarget.y, isAkima ? step.y : 1); - FMCR.distance = Mathf.Lerp(FMCR.distance, hvdTarget.z, isAkima ? step.z : 1); - } - -#if UNITY_EDITOR - private void OnGUI() - { - if (activeControl != this || showCameraGuide == false) - return; - if (FMCR == null || FMCR.FMCRCamera == null) - return; - DrawComposerGUI(FMCR.FMCRCamera, FMCR.FMCRCamera.pixelRect); - } -#endif - - delegate void DrawRect(float x, float y, float w, float h); - delegate void DrawZone(Rect rect); - - public void DrawComposerGUI(Camera cam, Rect screenRect) - { - if (cam == null) - return; - - Color hex_color; - Color originalColor = GUI.color; - - string hardColorString = "#C9615C"; - string softColorString = "#62B9CF"; - string targetColorString = "#FFF82A"; - float alpha = 0.3f; - - DrawRect drawRect = (float x, float y, float w, float h) => - { - float xx = screenRect.width * x + screenRect.x; - float yy = screenRect.height * (1 - y) + screenRect.y; - Rect r = new Rect(xx, yy, screenRect.width * w, -screenRect.height * h); - GUI.DrawTexture(r, Texture2D.whiteTexture); - }; - - DrawZone drawZone = (Rect rect) => - { - drawRect(0, 0, rect.xMin, 1); - drawRect(rect.xMax, 0, 1 - rect.xMax, 1); - drawRect(rect.xMin, 0, rect.xMax - rect.xMin, rect.yMin); - drawRect(rect.xMin, rect.yMax, rect.xMax - rect.xMin, 1 - rect.yMax); - }; - - if (ColorUtility.TryParseHtmlString(hardColorString, out hex_color)) - { - hex_color.a = alpha; - GUI.color = hex_color; - if (composerSettings != null) - drawZone(composerSettings.HardGuideRect); - } - - if (ColorUtility.TryParseHtmlString(softColorString, out hex_color)) - { - hex_color.a = alpha; - GUI.color = hex_color; - if(composerSettings != null) - drawZone(composerSettings.SoftGuideRect); - } - - if (ColorUtility.TryParseHtmlString(targetColorString, out hex_color)) - { - Vector3 pt = cam.WorldToViewportPoint(composerTargetPosition); - float hSize = screenRect.height * 0.01f; - float x = pt.x * screenRect.width + screenRect.x - hSize; - float y = (1 - pt.y) * screenRect.height - hSize + screenRect.y; - - GUI.color = hex_color; - GUI.DrawTexture(new Rect(x, y, hSize * 2, hSize * 2), Texture2D.whiteTexture); - } - - GUI.color = originalColor; - } - - static Vector3 Lerp(Vector3 a, Vector3 b, Vector3 t) - { - return new Vector3(Mathf.Lerp(a.x, b.x, t.x), Mathf.Lerp(a.y, b.y, t.y), Mathf.Lerp(a.z, b.z, t.z)); - } - - [ContextMenu("DrawCameraGuide")] - void DrawCameraGuide() - { - showCameraGuide = true; - } - - [ContextMenu("HideCameraGuide")] - void HideCameraGuide() - { - showCameraGuide = false; - } -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/Camera/FreeMotionCameraRig/FMCRControl.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/Camera/FreeMotionCameraRig/FMCRControl.cs.meta deleted file mode 100644 index 55a60b9..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/Camera/FreeMotionCameraRig/FMCRControl.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 03f96e3f85dbf7d46af6c5f4ecaba86e -timeCreated: 1492580746 -licenseType: Free -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/Camera/FreeMotionCameraRig/FreeMotionCameraRig.FBX b/Unity-19050-05-BallPool/Assets/UnityUtils/Camera/FreeMotionCameraRig/FreeMotionCameraRig.FBX deleted file mode 100644 index ab20800..0000000 Binary files a/Unity-19050-05-BallPool/Assets/UnityUtils/Camera/FreeMotionCameraRig/FreeMotionCameraRig.FBX and /dev/null differ diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/Camera/FreeMotionCameraRig/FreeMotionCameraRig.FBX.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/Camera/FreeMotionCameraRig/FreeMotionCameraRig.FBX.meta deleted file mode 100644 index d6d2f09..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/Camera/FreeMotionCameraRig/FreeMotionCameraRig.FBX.meta +++ /dev/null @@ -1,80 +0,0 @@ -fileFormatVersion: 2 -guid: 9395885296470c440b106a3203a569ef -timeCreated: 1488197493 -licenseType: Free -ModelImporter: - serializedVersion: 19 - fileIDToRecycleName: - 100000: //RootNode - 400000: //RootNode - 2300000: //RootNode - 3300000: //RootNode - 4300000: FMCR - materials: - importMaterials: 0 - materialName: 0 - materialSearch: 1 - animations: - legacyGenerateAnimations: 4 - bakeSimulation: 0 - resampleCurves: 1 - optimizeGameObjects: 0 - motionNodeName: - animationImportErrors: - animationImportWarnings: - animationRetargetingWarnings: - animationDoRetargetingWarnings: 0 - animationCompression: 1 - animationRotationError: 0.5 - animationPositionError: 0.5 - animationScaleError: 0.5 - animationWrapMode: 0 - extraExposedTransformPaths: [] - clipAnimations: [] - isReadable: 1 - meshes: - lODScreenPercentages: [] - globalScale: 1 - meshCompression: 0 - addColliders: 0 - importBlendShapes: 1 - swapUVChannels: 0 - generateSecondaryUV: 0 - useFileUnits: 1 - optimizeMeshForGPU: 1 - keepQuads: 0 - weldVertices: 1 - secondaryUVAngleDistortion: 8 - secondaryUVAreaDistortion: 15.000001 - secondaryUVHardAngle: 88 - secondaryUVPackMargin: 4 - useFileScale: 1 - tangentSpace: - normalSmoothAngle: 60 - normalImportMode: 0 - tangentImportMode: 3 - importAnimation: 0 - copyAvatar: 0 - humanDescription: - serializedVersion: 2 - human: [] - skeleton: [] - armTwist: 0.5 - foreArmTwist: 0.5 - upperLegTwist: 0.5 - legTwist: 0.5 - armStretch: 0.05 - legStretch: 0.05 - feetSpacing: 0 - rootMotionBoneName: - rootMotionBoneRotation: {x: 0, y: 0, z: 0, w: 1} - hasTranslationDoF: 0 - hasExtraRoot: 0 - skeletonHasParents: 1 - lastHumanDescriptionAvatarSource: {instanceID: 0} - animationType: 0 - humanoidOversampling: 1 - additionalBone: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/Camera/FreeMotionCameraRig/FreeMotionCameraRig.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/Camera/FreeMotionCameraRig/FreeMotionCameraRig.cs deleted file mode 100644 index c7369a0..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/Camera/FreeMotionCameraRig/FreeMotionCameraRig.cs +++ /dev/null @@ -1,236 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -// Free Motion Camera Rig -// https://github.com/Viktor286/FMCR -// https://www.behance.net/gallery/44375157/Free-Motion-Camera-Rig - -[ExecuteInEditMode] -public class FreeMotionCameraRig : MonoBehaviour -{ - public Mesh helper; - public Camera FMCRCamera; - - [Header("Base")] - [NonSerialized] - public float positionX; - [NonSerialized] - public float positionY; - [NonSerialized] - public float positionZ; - - [Header("Node")] - public float distance; - public float horizon; - public float vertical; - Transform node_trans; - - [Header("Camera")] - public float roll; - public float tilt; - public float sideways; - public float slide; - Transform camera_trans; - - [Header("Trail")] - public float framerate = 30.0f; - public float duration = 30.0f; - List trail_positions; - float stamp; - - void Start() - { - trail_positions = new List(); - stamp = Time.time; - } - - void LateUpdate() - { - if (FMCRCamera == null) - return; - - if (node_trans == null) - { - node_trans = transform.GetChild(0); - } - - if (camera_trans == null) - { - camera_trans = node_trans.GetChild(0); - } - - positionX = transform.localPosition.x; - positionY = transform.localPosition.y; - positionZ = transform.localPosition.z; - transform.localRotation = new Quaternion(); - float scale = Mathf.Max(new float[] { transform.localScale.x, transform.localScale.y, transform.localScale.z }); - transform.localScale = Vector3.one * scale; - - if (distance < 0) - distance = 0; - - node_trans.localPosition = HVDToXYZ(horizon, vertical, distance); - node_trans.localRotation = HVDToRotation(horizon, vertical, distance); - - camera_trans.localPosition = new Vector3(0, 0, slide); - camera_trans.localRotation = Quaternion.Euler(-tilt, sideways, roll); - - FMCRCamera.transform.position = camera_trans.position; - FMCRCamera.transform.rotation = camera_trans.rotation; - - float dt = Time.time - stamp; - if (dt > 1.0f / framerate) - { - stamp = Time.time; - trail_positions.Add(camera_trans.position); - int max_count = (int)(duration * framerate); - while (trail_positions.Count > max_count) - trail_positions.RemoveAt(0); - } - } - - public void Setp() - { - LateUpdate(); - } - - public Vector3 NodePosition { get { return transform.GetChild(0).position; } } - - void OnDrawGizmosSelected() - { - if (FMCRCamera == null) - return; - - Camera camera = FMCRCamera; - Gizmos.matrix = Matrix4x4.TRS(camera.transform.position, camera.transform.rotation, Vector3.one); - - if (camera.orthographic) - { - float spread = camera.farClipPlane - camera.nearClipPlane; - float center = (camera.farClipPlane + camera.nearClipPlane) * 0.5f; - Gizmos.DrawWireCube(new Vector3(0, 0, center), new Vector3(camera.orthographicSize * 2 * camera.aspect, camera.orthographicSize * 2, spread)); - } - else - { - Gizmos.DrawFrustum(new Vector3(0, 0, camera.nearClipPlane), camera.fieldOfView, camera.farClipPlane, camera.nearClipPlane, camera.aspect); - } - } - - void OnDrawGizmos() - { - if (FMCRCamera == null) - return; - - Color hex_color; - float scale = transform.localScale.x; - - Vector3 up = new Vector3(0, 0, 1); - - // main helper - if (ColorUtility.TryParseHtmlString("#0E3D59", out hex_color) && node_trans != null) - { - Gizmos.color = hex_color; - Quaternion quat = node_trans.localRotation * Quaternion.Euler(90, 0, 0); - Gizmos.DrawWireMesh(helper, transform.position, quat, transform.localScale); - - up = quat * up; - } - - // line to cc - if (ColorUtility.TryParseHtmlString("#88A61B", out hex_color) && camera_trans != null) - { - Gizmos.color = hex_color; - Gizmos.DrawLine(transform.position, camera_trans.position); - } - - // camera helper - if (ColorUtility.TryParseHtmlString("#F25C05", out hex_color) && node_trans != null) - { - Gizmos.color = hex_color; - Vector3 dir = (transform.position - node_trans.position).normalized; - Vector3 n_dir = Vector3.Cross(dir, up).normalized; - Vector3 p1 = node_trans.position + dir * 0.18f * scale; - Vector3 p2 = node_trans.position + n_dir * 0.07f * scale; - Vector3 p3 = node_trans.position - dir * 0.1f * scale; - Vector3 p4 = node_trans.position - n_dir * 0.07f * scale; - Gizmos.DrawLine(p1, p2); - Gizmos.DrawLine(p2, p3); - Gizmos.DrawLine(p3, p4); - Gizmos.DrawLine(p4, p1); - } - - // camera - if (ColorUtility.TryParseHtmlString("#D92525", out hex_color) && camera_trans != null) - { - Gizmos.color = hex_color; - Vector3 dir = camera_trans.rotation * Vector3.forward; - Vector3 n_dir = camera_trans.rotation * Vector3.right; - Vector3 dir_offset = dir * 0.04f * scale; - Vector3 p1 = camera_trans.position + dir_offset; - Vector3 p2 = camera_trans.position - dir_offset + n_dir * 0.09f * scale; - Vector3 p3 = camera_trans.position - dir_offset - n_dir * 0.09f * scale; - Gizmos.DrawLine(p1, p2); - Gizmos.DrawLine(p2, p3); - Gizmos.DrawLine(p3, p1); - } - } - - static Quaternion HVDToRotation(float horizon, float vertical, float distance) - { - Vector3 xyz = HVDToXYZ(horizon, vertical, distance + 0.01f); - return Quaternion.LookRotation(-xyz); - } - - public Vector3 RotationToHVD(Quaternion roataion, float distance) - { - Vector3 xyz = roataion * (Vector3.forward * -distance); - return XYZToHVDNearest(xyz); - } - - public static Vector3 HVDToXYZ(float horizon, float vertical, float distance) - { - float a = horizon * Mathf.Deg2Rad; - float b = vertical * Mathf.Deg2Rad; - float r = distance; - - //z up, right handed - float x = Mathf.Cos(b) * Mathf.Sin(a) * r; - float y = -Mathf.Cos(b) * Mathf.Cos(a) * r; - float z = -Mathf.Sin(b) * r; - - return new Vector3(x, z, y); - } - - Vector3 XYZToHVD(Vector3 xyz) - { - //to z up, right handed - float x = xyz.x; - float y = xyz.z; - float z = xyz.y; - - float horizon = Mathf.Atan2(x, -y) * Mathf.Rad2Deg; - float vertical = Mathf.Atan2(-z, Mathf.Sqrt(x * x + y * y)) * Mathf.Rad2Deg; - float distance = xyz.magnitude; - - return new Vector3(horizon, vertical, distance); - } - - public Vector3 XYZToHVDNearest(Vector3 xyz) - { - Vector3 hvd = XYZToHVD(xyz); - bool vertOver90 = Mathf.Repeat(vertical + 90, 360) > 180; - - float hDiff = horizon - hvd.x; - float vDiff = vertical - hvd.y; - - float hAdj = vertOver90 ? Mathf.Round(hDiff / 180) * 180 : Mathf.Round(hDiff / 360) * 360; - float vAdj = vertOver90 ? Mathf.Round((vertical + hvd.y) / 180) * 180 : Mathf.Round(vDiff / 360) * 360; - - hvd.x += hAdj; - hvd.y = vertOver90 ? -hvd.y + vAdj : hvd.y + vAdj; - - return hvd; - } -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/Camera/FreeMotionCameraRig/FreeMotionCameraRig.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/Camera/FreeMotionCameraRig/FreeMotionCameraRig.cs.meta deleted file mode 100644 index acbd1ba..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/Camera/FreeMotionCameraRig/FreeMotionCameraRig.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: e1a5041da684df9428158c554e1d0961 -timeCreated: 1488031767 -licenseType: Free -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/Camera/FreeMotionCameraRig/FreeMotionCameraRig.prefab b/Unity-19050-05-BallPool/Assets/UnityUtils/Camera/FreeMotionCameraRig/FreeMotionCameraRig.prefab deleted file mode 100644 index 4b410f8..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/Camera/FreeMotionCameraRig/FreeMotionCameraRig.prefab +++ /dev/null @@ -1,123 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!1001 &100100000 -Prefab: - m_ObjectHideFlags: 1 - serializedVersion: 2 - m_Modification: - m_TransformParent: {fileID: 0} - m_Modifications: [] - m_RemovedComponents: [] - m_ParentPrefab: {fileID: 0} - m_RootGameObject: {fileID: 1396435515457646} - m_IsPrefabParent: 1 ---- !u!1 &1075857605349078 -GameObject: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 - m_Component: - - component: {fileID: 4114305454470350} - m_Layer: 0 - m_Name: Dummy - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!1 &1396435515457646 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 - m_Component: - - component: {fileID: 4921649763249666} - - component: {fileID: 114464489650813304} - m_Layer: 0 - m_Name: FreeMotionCameraRig - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!1 &1652840592525928 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 - m_Component: - - component: {fileID: 4496974893481850} - m_Layer: 0 - m_Name: Node - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &4114305454470350 -Transform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1075857605349078} - m_LocalRotation: {x: -0.043619387, y: 0, z: 0, w: 0.99904823} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 4496974893481850} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!4 &4496974893481850 -Transform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1652840592525928} - m_LocalRotation: {x: 0.17364815, y: -0, z: -0, w: 0.9848078} - m_LocalPosition: {x: 0, y: 1.0260603, z: -2.819078} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: - - {fileID: 4114305454470350} - m_Father: {fileID: 4921649763249666} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!4 &4921649763249666 -Transform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1396435515457646} - 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: 4496974893481850} - m_Father: {fileID: 0} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0.03, z: 0} ---- !u!114 &114464489650813304 -MonoBehaviour: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1396435515457646} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: e1a5041da684df9428158c554e1d0961, type: 3} - m_Name: - m_EditorClassIdentifier: - helper: {fileID: 4300000, guid: 9395885296470c440b106a3203a569ef, type: 3} - FMCRCamera: {fileID: 0} - positionX: 0 - positionY: 0 - positionZ: 0 - distance: 3 - horizon: 0 - vertical: -20 - roll: 0 - tilt: 5 - sideways: 0 - slide: 0 diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/Camera/FreeMotionCameraRig/FreeMotionCameraRig.prefab.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/Camera/FreeMotionCameraRig/FreeMotionCameraRig.prefab.meta deleted file mode 100644 index 16dc4f2..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/Camera/FreeMotionCameraRig/FreeMotionCameraRig.prefab.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 0abe703e13642da418cfbe905e4d116e -timeCreated: 1488200013 -licenseType: Free -NativeFormatImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/Camera/TransposerSettings.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/Camera/TransposerSettings.cs deleted file mode 100644 index dc08435..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/Camera/TransposerSettings.cs +++ /dev/null @@ -1,43 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -namespace uc -{ - [CreateAssetMenu(menuName = "UC/FMCR/TransposerSettings")] - public sealed class TransposerSettings : ScriptableObject - { - [SerializeField] - Vector3 offsetFromTarget = new Vector3(0,0,-10); - - [SerializeField] - [Range(0, 20)] - float xDamping = 1f; - [SerializeField] - [Range(0, 20)] - float yDamping = 1f; - [SerializeField] - [Range(0, 20)] - float zDamping = 1f; - - [SerializeField] - TransposerOffsetType transposerOffsetMode = TransposerOffsetType.LocalSpaceLockedToTarget; - - - public TransposerSettings() { } - - public Vector3 OffsetFromTarget { get { return offsetFromTarget; } } - public Vector3 TrackingSpeeds { get { return new Vector3(xDamping / 10, yDamping / 10, zDamping / 10); } } - public TransposerOffsetType TransposerOffsetMode { get { return transposerOffsetMode; } } - - //public static bool BlendSettings(TransposerSettings transpA, TransposerSettings transpB, float blendValue, ref TransposerSettings outputSettings); - - public enum TransposerOffsetType - { - LocalSpaceOnTargetAssignment = 0, - LocalSpaceLockedUpVector = 1, - LocalSpaceLockedToTarget = 2, - WorldSpace = 3 - } - } -} \ No newline at end of file diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/Camera/TransposerSettings.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/Camera/TransposerSettings.cs.meta deleted file mode 100644 index 3077774..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/Camera/TransposerSettings.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: d5dcde4503dceb14ab2af61f7eebb867 -timeCreated: 1493194694 -licenseType: Free -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/Communication.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/Communication.meta deleted file mode 100644 index 4935954..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/Communication.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 654c82c39c253bd41bc55c6152f52ff7 -folderAsset: yes -timeCreated: 1504061477 -licenseType: Free -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/Communication/OSC2Firmata.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/Communication/OSC2Firmata.meta deleted file mode 100644 index fe3e2a5..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/Communication/OSC2Firmata.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 66c0666bcb00cff4aa3917a527ae8ade -folderAsset: yes -timeCreated: 1483428829 -licenseType: Free -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/Communication/OSC2Firmata/FirmataControl.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/Communication/OSC2Firmata/FirmataControl.cs deleted file mode 100644 index 73d25ec..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/Communication/OSC2Firmata/FirmataControl.cs +++ /dev/null @@ -1,192 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; -using OSC.NET; -using System; -using UnityEngine.Events; -using System.Threading; - -namespace OSCFirmata -{ - public class FirmataControl : MonoBehaviour - { - public string sendAddress = "localhost"; - public int sendPort = 3434; - public int receievePort = 3435; - - public enum ControlType - { - set_digital, - set_analog, - } - - public PinCommand[] pins; - - - public PinCommand[] inPins; - - private Dictionary inPinMap = new Dictionary(); - private bool is_receiving_thread_running = false; - private Thread receivingThread; - - // Use this for initialization - void Start() - { - _oscSender = new OSCTransmitter(sendAddress, sendPort); - _oscReceiever = new OSCReceiver(receievePort); - - receivingThread = new Thread(receivingService); - receivingThread.Start(); - // inPins = new PinCommand[1]; - } - - // Update is called once per frame - protected void Update() - { - foreach (var pin in pins) - { - if (_oscSender != null) - _oscSender.Send(pin.toOSC()); - } - - - lock (inPinMap) - { - foreach (PinCommand pin in inPins) - { - if (inPinMap.ContainsKey(pin.pin)) - { - //if (pin.value != inPinMap[pin.pin].value) - { - pin.value = inPinMap[pin.pin].value; - pin.valueChangeEvent.Invoke(pin.value); - } - } - } - } - } - private void OnDestroy() - { - is_receiving_thread_running = false; - _oscReceiever.Close(); - receivingThread.Join(); - } - - protected OSCTransmitter _oscSender; - protected OSCReceiver _oscReceiever; - - public enum CommandType - { - report_pin, - set_pin, - } - - public enum PinMode - { - DIGITAL_INPUT = 0x00, - DIGITAL_OUTPUT = 0x01, - ANALOG_INPUT = 0x02, - PWM = 0x03, - SERVO = 0x04, - SHIFT = 0x05, - I2C = 0x06, - ONEWIRE = 0x07, - STEPPER = 0x08, - ENCODER = 0x09, - SERIAL = 0x0A, - INPUT_PULLUP = 0x0B, - } - - private void processMessage(OSCMessage msg) - { - //Debug.Log(msg.ToString()); -#if true - PinCommand pin = PinCommand.fromOSC(msg); - //if(pin.pin == 8) - //Debug.Log(msg.ToString()); - - lock (inPinMap) - { - if (inPinMap.ContainsKey(pin.pin)) - { - inPinMap[pin.pin] = pin; - } - else - { - inPinMap.Add(pin.pin, pin); - } - } -#endif - } - [System.Serializable] - public class PinCommand - { - public ControlType controlType = ControlType.set_digital; - public int pin = 0; - [Range(0f, 1f)] - public float value; - [Serializable] - public class ValueChangeedEvent : UnityEvent { } - public ValueChangeedEvent valueChangeEvent; - CommandType commandType = CommandType.set_pin; - PinMode mode; - public OSCMessage toOSC() - { - string address = "/rqst/" + commandType; - OSCMessage msg = new OSCMessage(address); - switch (controlType) - { - case ControlType.set_analog: - mode = PinMode.PWM; - break; - case ControlType.set_digital: - mode = PinMode.DIGITAL_OUTPUT; - break; - } - msg.Append(pin); - msg.Append(mode.ToString()); - msg.Append(value); - return msg; - } - - public static PinCommand fromOSC(OSCMessage msg) - { - PinCommand pin = new PinCommand(); - - if (msg.Address != "/rspn/report_pin") - return null; - - pin.pin = (int)msg.Values[0]; - pin.mode = (PinMode)Enum.Parse(typeof(PinMode), (string)msg.Values[1]); - pin.value = (float)msg.Values[2]; - - return pin; - } - } - - private void receivingService() - { - is_receiving_thread_running = true; - while (is_receiving_thread_running) - { - OSCPacket packet = _oscReceiever.Receive(); - while (is_receiving_thread_running && packet != null) - { - if (packet.IsBundle()) - { - //Debug.Log("IsBundle"); - ArrayList messages = packet.Values; - for (int i = 0; i < messages.Count; i++) - { - processMessage((OSCMessage)messages[i]); - } - } - else - processMessage((OSCMessage)packet); - packet = _oscReceiever.Receive(); - } - } - Debug.Log("packet = null"); - } - } -} \ No newline at end of file diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/Communication/OSC2Firmata/FirmataControl.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/Communication/OSC2Firmata/FirmataControl.cs.meta deleted file mode 100644 index 56247f5..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/Communication/OSC2Firmata/FirmataControl.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 8f2ed39fabc155e42a9a912ad7c2fd33 -timeCreated: 1483432037 -licenseType: Free -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/Communication/Plugins.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/Communication/Plugins.meta deleted file mode 100644 index 3a0f311..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/Communication/Plugins.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 7abeaf0f0248a6a41bc5e65614e77bc8 -folderAsset: yes -timeCreated: 1504062107 -licenseType: Free -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/Communication/Plugins/x86.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/Communication/Plugins/x86.meta deleted file mode 100644 index 017bb06..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/Communication/Plugins/x86.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: ba1da97f60a25fa44a4040421a53f7b5 -folderAsset: yes -timeCreated: 1504062412 -licenseType: Free -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/Communication/Plugins/x86/ofSerial.dll b/Unity-19050-05-BallPool/Assets/UnityUtils/Communication/Plugins/x86/ofSerial.dll deleted file mode 100644 index 6663888..0000000 Binary files a/Unity-19050-05-BallPool/Assets/UnityUtils/Communication/Plugins/x86/ofSerial.dll and /dev/null differ diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/Communication/Plugins/x86/ofSerial.dll.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/Communication/Plugins/x86/ofSerial.dll.meta deleted file mode 100644 index e2ef1f0..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/Communication/Plugins/x86/ofSerial.dll.meta +++ /dev/null @@ -1,122 +0,0 @@ -fileFormatVersion: 2 -guid: 5562b33452bb1d44a9b9b76b439970d2 -timeCreated: 1504062542 -licenseType: Free -PluginImporter: - serializedVersion: 2 - iconMap: {} - executionOrder: {} - isPreloaded: 0 - isOverridable: 0 - platformData: - data: - first: - '': Any - second: - enabled: 0 - settings: - Exclude Android: 1 - Exclude Editor: 0 - Exclude Linux: 0 - Exclude Linux64: 0 - Exclude LinuxUniversal: 0 - Exclude OSXIntel: 0 - Exclude OSXIntel64: 0 - Exclude OSXUniversal: 0 - Exclude Win: 0 - Exclude Win64: 1 - data: - first: - Android: Android - second: - enabled: 0 - settings: - CPU: ARMv7 - data: - first: - Any: - second: - enabled: 1 - settings: {} - data: - first: - Editor: Editor - second: - enabled: 1 - settings: - CPU: x86 - DefaultValueInitialized: true - OS: Windows - data: - first: - Facebook: Win - second: - enabled: 1 - settings: - CPU: AnyCPU - data: - first: - Facebook: Win64 - second: - enabled: 0 - settings: - CPU: None - data: - first: - Standalone: Linux - second: - enabled: 1 - settings: - CPU: x86 - data: - first: - Standalone: Linux64 - second: - enabled: 1 - settings: - CPU: None - data: - first: - Standalone: LinuxUniversal - second: - enabled: 1 - settings: - CPU: AnyCPU - data: - first: - Standalone: OSXIntel - second: - enabled: 1 - settings: - CPU: AnyCPU - data: - first: - Standalone: OSXIntel64 - second: - enabled: 1 - settings: - CPU: None - data: - first: - Standalone: OSXUniversal - second: - enabled: 1 - settings: - CPU: AnyCPU - data: - first: - Standalone: Win - second: - enabled: 1 - settings: - CPU: AnyCPU - data: - first: - Standalone: Win64 - second: - enabled: 0 - settings: - CPU: None - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/Communication/Plugins/x86_64.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/Communication/Plugins/x86_64.meta deleted file mode 100644 index 8bacc06..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/Communication/Plugins/x86_64.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: db1c873979839dd43adef95b39d40ecd -folderAsset: yes -timeCreated: 1504062426 -licenseType: Free -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/Communication/Plugins/x86_64/ofSerial.dll b/Unity-19050-05-BallPool/Assets/UnityUtils/Communication/Plugins/x86_64/ofSerial.dll deleted file mode 100644 index 5286c14..0000000 Binary files a/Unity-19050-05-BallPool/Assets/UnityUtils/Communication/Plugins/x86_64/ofSerial.dll and /dev/null differ diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/Communication/Plugins/x86_64/ofSerial.dll.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/Communication/Plugins/x86_64/ofSerial.dll.meta deleted file mode 100644 index 8d23a7b..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/Communication/Plugins/x86_64/ofSerial.dll.meta +++ /dev/null @@ -1,122 +0,0 @@ -fileFormatVersion: 2 -guid: 99056ed67b5dea34394cd44ab623586e -timeCreated: 1504062611 -licenseType: Free -PluginImporter: - serializedVersion: 2 - iconMap: {} - executionOrder: {} - isPreloaded: 0 - isOverridable: 0 - platformData: - data: - first: - '': Any - second: - enabled: 0 - settings: - Exclude Android: 1 - Exclude Editor: 0 - Exclude Linux: 0 - Exclude Linux64: 0 - Exclude LinuxUniversal: 0 - Exclude OSXIntel: 0 - Exclude OSXIntel64: 0 - Exclude OSXUniversal: 0 - Exclude Win: 1 - Exclude Win64: 0 - data: - first: - Android: Android - second: - enabled: 0 - settings: - CPU: ARMv7 - data: - first: - Any: - second: - enabled: 1 - settings: {} - data: - first: - Editor: Editor - second: - enabled: 1 - settings: - CPU: x86_64 - DefaultValueInitialized: true - OS: Windows - data: - first: - Facebook: Win - second: - enabled: 0 - settings: - CPU: None - data: - first: - Facebook: Win64 - second: - enabled: 1 - settings: - CPU: AnyCPU - data: - first: - Standalone: Linux - second: - enabled: 1 - settings: - CPU: None - data: - first: - Standalone: Linux64 - second: - enabled: 1 - settings: - CPU: x86_64 - data: - first: - Standalone: LinuxUniversal - second: - enabled: 1 - settings: - CPU: AnyCPU - data: - first: - Standalone: OSXIntel - second: - enabled: 1 - settings: - CPU: None - data: - first: - Standalone: OSXIntel64 - second: - enabled: 1 - settings: - CPU: AnyCPU - data: - first: - Standalone: OSXUniversal - second: - enabled: 1 - settings: - CPU: AnyCPU - data: - first: - Standalone: Win - second: - enabled: 0 - settings: - CPU: None - data: - first: - Standalone: Win64 - second: - enabled: 1 - settings: - CPU: AnyCPU - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/Communication/ofSerial.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/Communication/ofSerial.cs deleted file mode 100644 index 9cb3e75..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/Communication/ofSerial.cs +++ /dev/null @@ -1,136 +0,0 @@ -using System; -using System.Runtime.InteropServices; -public class ofSerial -{ - public ofSerial() - { - id = createNative(); - } - ~ofSerial() - { - releaseNative(id); - } - public bool setup() - { - return setupNative(id); - } - public bool setup(string portName, int baudrate) - { - return setupWithPortNameNative(id, portName, baudrate); - } - public bool setup(int deviceNumber, int baudrate) - { - return setupWithDeviceNumberNative(id, deviceNumber, baudrate); - } - public bool isInitialized() - { - return isInitializedNative(id); - } - public void close() - { - closeNative(id); - } - public int available() - { - return availableNative(id); - } - public int readBytes(byte[] buffer) - { - return readBytes(buffer, 0, buffer.Length); - } - public unsafe int readBytes(byte[] buffer, int offset, int length) - { - fixed (byte* p = buffer) - { - IntPtr ptr = (IntPtr)(p+ offset); - // do you stuff here - return readBytesNative(id, ptr, length); - } - } - public int readByte() - { - return readByteNative(id); - } - public int writeBytes(byte[] buffer) - { - return writeBytes(buffer, 0, buffer.Length); - } - public unsafe int writeBytes(byte[] buffer,int offset, int length) - { - fixed (byte* p = buffer) - { - IntPtr ptr = (IntPtr)(p+ offset); - // do you stuff here - return writeBytesNative(id, ptr, length); - } - } - public bool writeByte(byte singleByte) - { - return writeByteNative(id, singleByte); - } - public void flush(bool flushIn = true, bool flushOut = true) - { - flushNative(id, flushIn, flushOut); - } - public void drain() - { - drainNative(id); - } - //////////////////////////////////////////////////////////////////////////////////////////////////// - - #region ofSerial.dll - [DllImport("ofSerial")] - public static extern uint createNative(); - - [DllImport("ofSerial")] - public static extern void releaseNative(uint id); - //void listDevicesNative(uint id); - //vector getDeviceList(); - - [DllImport("ofSerial")] - public static extern bool setupNative(uint id); - [DllImport("ofSerial")] - public static extern bool setupWithPortNameNative(uint id, [MarshalAs(UnmanagedType.LPStr)]string portName, int baudrate); - [DllImport("ofSerial")] - public static extern bool setupWithDeviceNumberNative(uint id, int deviceNumber, int baudrate); - [DllImport("ofSerial")] - public static extern bool isInitializedNative(uint id); - [DllImport("ofSerial")] - public static extern void closeNative(uint id); - [DllImport("ofSerial")] - public static extern int availableNative(uint id); - [DllImport("ofSerial")] - public static extern int readBytesNative(uint id, IntPtr buffer, int length); - [DllImport("ofSerial")] - public static extern int readByteNative(uint id); - [DllImport("ofSerial")] - public static extern int writeBytesNative(uint id, IntPtr buffer, int length); - [DllImport("ofSerial")] - public static extern bool writeByteNative(uint id, byte singleByte); - [DllImport("ofSerial")] - public static extern void flushNative(uint id, bool flushIn = true, bool flushOut = true); - [DllImport("ofSerial")] - public static extern void drainNative(uint id); - #endregion - - private uint id = 0; - -#if false - ofSerial(); - virtual ~ofSerial(); - void listDevices(); - vector getDeviceList(); - bool setup(); - bool setup(string portName, int baudrate); - bool setup(int deviceNumber, int baudrate); - bool isInitialized() const; - void close(); - int available(); - int readBytes(unsigned char* buffer, int length); - int readByte(); - int writeBytes(unsigned char* buffer, int length); - bool writeByte(unsigned char singleByte); - void flush(bool flushIn = true, bool flushOut = true); - void drain(); -#endif -} \ No newline at end of file diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/Communication/ofSerial.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/Communication/ofSerial.cs.meta deleted file mode 100644 index 9a764c0..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/Communication/ofSerial.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 581774665dd56cb41a3177a93c377cb5 -timeCreated: 1504062186 -licenseType: Free -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/ImageFileWatcher.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/ImageFileWatcher.meta deleted file mode 100644 index 14b0615..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/ImageFileWatcher.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 65ae90d41d994cc42b3440c889f037c2 -folderAsset: yes -timeCreated: 1482216914 -licenseType: Pro -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/ImageFileWatcher/Editor.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/ImageFileWatcher/Editor.meta deleted file mode 100644 index 359f267..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/ImageFileWatcher/Editor.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: de33e8e76b63c004780e448fd9b8c4e1 -folderAsset: yes -timeCreated: 1482229031 -licenseType: Free -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/ImageFileWatcher/Editor/ImageFileWatcherEditor.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/ImageFileWatcher/Editor/ImageFileWatcherEditor.cs deleted file mode 100644 index ea44302..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/ImageFileWatcher/Editor/ImageFileWatcherEditor.cs +++ /dev/null @@ -1,68 +0,0 @@ -#if false -using System.Collections; -using System.Collections.Generic; -using System.IO; -using UnityEditor; -using UnityEngine; -//[CustomEditor(typeof(ImageFileWatcher))] -public class ImageFileWatcherEditor : Editor -{ - public override void OnInspectorGUI() - { - - DrawDefaultInspector(); - /* - int selected = 0; - string[] options = new string[] - { - "Option1", "Option2", "Option3", - }; - - - selected = EditorGUILayout.Popup("Label", selected, options); - */ - ImageFileWatcher image_watcher = target as ImageFileWatcher; - //List result = new List(); - string[] file_list = Directory.GetFiles(image_watcher.originFolder); - - foreach (string f in file_list) - { - FileInfo file = new FileInfo(f); - if (file.Extension == ".meta") - continue; - GUILayout.BeginHorizontal(); - { - string typename = file.Name.Substring(0, file.Name.Length - file.Extension.Length); - GUILayout.Label(typename, GUILayout.Width(100)); - GUILayout.TextField("", GUILayout.ExpandWidth(true)); - - - - - string name = ""; - switch (Event.current.type) - { - case EventType.DragUpdated: - case EventType.DragPerform: - DragAndDrop.visualMode = DragAndDropVisualMode.Copy; - - if (Event.current.type == EventType.DragPerform) - { - name = DragAndDrop.objectReferences[0].ToString(); - - } - break; - } - - - - - } - GUILayout.EndHorizontal(); - - } - - - } -} -#endif \ No newline at end of file diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/ImageFileWatcher/Editor/ImageFileWatcherEditor.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/ImageFileWatcher/Editor/ImageFileWatcherEditor.cs.meta deleted file mode 100644 index 842feb4..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/ImageFileWatcher/Editor/ImageFileWatcherEditor.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: c9efed14c4f5ee94b90e3a182e9ae11e -timeCreated: 1482229050 -licenseType: Free -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/ImageFileWatcher/ImageFileWatcher.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/ImageFileWatcher/ImageFileWatcher.cs deleted file mode 100644 index 92c5cbb..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/ImageFileWatcher/ImageFileWatcher.cs +++ /dev/null @@ -1,225 +0,0 @@ -using UnityEngine; -using System.IO; -using System.Collections.Generic; -using System; -using System.Threading; -using System.Collections; -using UnityEngine.Events; - -public class ImageFileWatcher : MonoBehaviour -{ - //public string originFolder; - public static ImageFileWatcher instance; - - [Serializable] - public class TextureDataHandler : UnityEvent { }; - public TextureDataHandler TextureAddedEvent = new TextureDataHandler(); - public TextureDataHandler TextureRemovedEvent = new TextureDataHandler(); - - public int photoSize = 0; - public float photoCheckingPeriod = 0.2f; - public int maxNum = 20; - [Tooltip("the root path is unity project path")] - public string rootPath = "Scan"; - public Texture2D[] texListForDebugging; - public bool clearAfterLoaded = false; - private string todayFolder = DateTime.Now.ToString("yyyy-MM-dd"); - private Queue waiting_queue = new Queue(); - private Queue ready_queue = new Queue(); - private Queue texturePool = new Queue(); - - private Thread loadingThread; - private bool isThreadRunning = true; - private FileSystemWatcher watcher; - public Dictionary type_map = new Dictionary(); - [SerializeField] - private bool search_last_file = false; - [SerializeField] - private bool dailyFolder = true; - [SerializeField] - private bool isRelative = false; - void Awake() - { - instance = this; - //rootPath = Application.dataPath + "/"+rootPath; - } - void Start() - { - DateTime date = DateTime.Now; - - if (isRelative) - rootPath = Application.dataPath + "\\" + rootPath; - - if (search_last_file) - { - List historic_files = find_last_files(); - foreach (string file in historic_files) - { - lock (waiting_queue) - { - waiting_queue.Enqueue(new TextureData(file)); - } - } - } - - - - //string[] dir_list = {"2013.02.21","2010.06.20","1985.08.27","3820.01.02" }; - if (!Directory.Exists(rootPath)) - { - Directory.CreateDirectory(rootPath); - } - string watch_path = rootPath; - if (dailyFolder) - { - watch_path = rootPath + "/" + todayFolder; - if (!Directory.Exists(watch_path)) - { - Directory.CreateDirectory(watch_path); - } - } - watcher = new FileSystemWatcher(watch_path); - watcher.Created += onFileChanged; - - watcher.EnableRaisingEvents = true; - - loadingThread = new Thread(new ThreadStart(resizing_to_memory_service)); - loadingThread.Start(); - StartCoroutine(loadTextureFromMemory()); - /* - TextureAddedEvent += (TextureData t) => - { - //Debug.Log("Add " + t); - }; - TextureRemovedEvent += (TextureData t) => - { - //Debug.Log("Remove " + t); - };*/ - } - void OnDestroy() - { - isThreadRunning = false; - while (loadingThread.IsAlive) - { - Thread.Sleep(1); - } - loadingThread.Abort(); - } - IEnumerator loadTextureFromMemory() - { - while (true) - { - if (ready_queue.Count > 0) - { - TextureData newData = null; - lock (ready_queue) - { - newData = ready_queue.Dequeue(); - } - - if(newData.createTextureFromMemory()) - { - yield return null; - texturePool.Enqueue(newData); - TextureAddedEvent.Invoke(newData); - - if (clearAfterLoaded) - { - File.Delete(newData.filePath); - } - - - yield return null; - while (texturePool.Count > maxNum) - { - TextureData removalData = texturePool.Dequeue(); - TextureRemovedEvent.Invoke(removalData); - removalData.destroyTexture(); - } - - texListForDebugging = new Texture2D[texturePool.Count]; - int i = 0; - foreach(TextureData data in texturePool) - { - texListForDebugging[i++] = data.texture; - } - } - } - yield return new WaitForSeconds(photoCheckingPeriod); - } - } - private List find_last_files() - { - List result = new List(); - string[] dir_list = Directory.GetDirectories(rootPath); - Array.Sort(dir_list); - bool ok = false; - for (int i = dir_list.Length - 1; i >= 0; --i) - { - var png_files = Directory.GetFiles(dir_list[i], "*.png"); - var jpg_files = Directory.GetFiles(dir_list[i], "*.jpg"); - var files_list = new List(); - files_list.AddRange(png_files); - files_list.AddRange(jpg_files); - string[] file_list = files_list.ToArray(); - - //string[] file_list = Directory.GetFiles(dir_list[i], "*.png"); - Array.Sort(file_list); - - for (int j = file_list.Length - 1; j >= 0; --j) - { - result.Add(file_list[j]); - if (ok = (result.Count >= maxNum)) - break; - } - if (ok) - break; - } - result.Reverse(); - return result; - } - private void onFileChanged(object sender, FileSystemEventArgs e) - { - TextureData data = new TextureData(e.FullPath); - lock (waiting_queue) - { - waiting_queue.Enqueue(data); - } - Debug.Log("onFileChanged() "+ e.FullPath); - } - - private void resizing_to_memory_service() - { - while (isThreadRunning) - { - if (waiting_queue.Count > 0) - { - TextureData data = null; - lock (waiting_queue) - { - data = waiting_queue.Dequeue(); - } - string str = data.ToString(); - - if (data.loadToMemory(photoSize)) - { - lock (ready_queue) - { - ready_queue.Enqueue(data); - } - str = "[ OK ]" + str; - } - else - { - str = "[FAIL]" + str; - } - Debug.Log(str); - } - else - { - Thread.Sleep((int)(photoCheckingPeriod * 1000)); - } - } - } - -} \ No newline at end of file diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/ImageFileWatcher/ImageFileWatcher.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/ImageFileWatcher/ImageFileWatcher.cs.meta deleted file mode 100644 index 3464bb1..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/ImageFileWatcher/ImageFileWatcher.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 9f4f2d421ffd80c4cb1dbd4eddc88495 -timeCreated: 1478857282 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/ImageFileWatcher/ImageUtil.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/ImageFileWatcher/ImageUtil.cs deleted file mode 100644 index 6c68576..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/ImageFileWatcher/ImageUtil.cs +++ /dev/null @@ -1,53 +0,0 @@ -using System; -using System.Drawing; -using System.Drawing.Drawing2D; -using System.Drawing.Imaging; -using UnityEngine; - -public class ImageUtil -{ - public static Bitmap ResizeImage(Image bitmap, int maxSize) - { - float aspect = (float)bitmap.Width / bitmap.Height; - int w; - int h; - if (aspect > 1.0f) - { - w = maxSize; - h = (int)Mathf.Round(w / aspect); - } - else - { - h = maxSize; - w = (int)Mathf.Round(h * aspect); - } - return ResizeImage(bitmap, w, h); - } - public static Bitmap ResizeImage(Image image, int width, int height) - { - var destImage = new Bitmap(width, height); - destImage.SetResolution(image.HorizontalResolution, image.VerticalResolution); - using (var graphics = System.Drawing.Graphics.FromImage(destImage)) - { - graphics.CompositingMode = CompositingMode.SourceCopy; - graphics.CompositingQuality = CompositingQuality.HighQuality; - graphics.InterpolationMode = InterpolationMode.HighQualityBicubic; - graphics.SmoothingMode = SmoothingMode.HighQuality; - graphics.PixelOffsetMode = PixelOffsetMode.HighQuality; - using (var wrapMode = new ImageAttributes()) - { - wrapMode.SetWrapMode(System.Drawing.Drawing2D.WrapMode.Clamp); - try - { - var destRect = new Rectangle(0, 0, width, height); - graphics.DrawImage(image, destRect, 0, 0, image.Width, image.Height, GraphicsUnit.Pixel, wrapMode); - }catch(Exception err) - { - Debug.Log("err:" + err.StackTrace); - } - } - } - destImage.RotateFlip(RotateFlipType.RotateNoneFlipY); - return destImage; - } -} \ No newline at end of file diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/ImageFileWatcher/ImageUtil.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/ImageFileWatcher/ImageUtil.cs.meta deleted file mode 100644 index 4af314e..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/ImageFileWatcher/ImageUtil.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 073bd8ab12f26224ba4c2e123962d948 -timeCreated: 1482217138 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/ImageFileWatcher/TextureData.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/ImageFileWatcher/TextureData.cs deleted file mode 100644 index 505ba72..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/ImageFileWatcher/TextureData.cs +++ /dev/null @@ -1,183 +0,0 @@ - -using System; -using System.Drawing; -using System.Drawing.Imaging; -using System.IO; -using System.Runtime.InteropServices; -using UnityEngine; - -public class TextureData -{ - public static int lastId = 0; - public string type { get { return _type; } } - public int id { get { return _id; } } - public Texture2D texture { get { return _tex; } } - public string filePath { get { return _filePath; } } - //private bool _is_decoded = false; - public TextureData(string filePath) - { - _id = lastId; - _filePath = filePath; - //string tmp = "YYYY-MM-DD-hh-mm-ss-fff-"; - //int b = _filePath.LastIndexOf("\\")+tmp.Length; - int e = _filePath.LastIndexOf("."); - int b = _filePath.LastIndexOf("+",e); - if (b != -1 && e != -1 && b < e) - _type = _filePath.Substring(b + 1, e - b - 1); - } - public override bool Equals(object obj) - { - if (obj == null || !(obj is TextureData)) - return false; - else - return this.id == ((TextureData)obj).id; - } - - public override int GetHashCode() - { - return this.id; - } - public override string ToString() - { - return _type+": "+_filePath; - } - - public bool loadToMemory(int maxSize = 0) - { - try - { -#if false - FileStream fs = File.Open(_filePath, FileMode.Open); - System.Drawing.Image img = System.Drawing.Image.FromStream(fs); - fs.Close(); -#else - using (System.Drawing.Image img = System.Drawing.Image.FromFile(_filePath)) -#endif - { - if (maxSize == 0) - maxSize = Math.Max(img.Width, img.Height); - //Bitmap resizedBitmap = new Bitmap(img);// ImageUtil.ResizeImage(img, maxSize); - Bitmap resizedBitmap = ImageUtil.ResizeImage(img, maxSize); - _width = resizedBitmap.Width; - _height = resizedBitmap.Height; - - _rawdata = createRawbytes(resizedBitmap); - //_is_decoded = true; - - } - return true; - } - catch (System.Exception err) - { - Debug.Log(err.StackTrace); - return false; - } - } -#if false - private static ImageCodecInfo GetEncoderInfo(String mimeType) - { - int j; - ImageCodecInfo[] encoders; - encoders = ImageCodecInfo.GetImageEncoders(); - for (j = 0; j < encoders.Length; ++j) - { - if (encoders[j].MimeType == mimeType) - return encoders[j]; - } - return null; - } - - public bool encode() - { - if(_rawdata == null) - { - return false; - } - Bitmap bitmap = new Bitmap(_width,_height, PixelFormat.Format32bppArgb); - BitmapData bitmapData = bitmap.LockBits(new Rectangle(0, 0, _width, _height), ImageLockMode.ReadOnly, PixelFormat.Format32bppArgb); - int length = bitmapData.Stride * bitmapData.Height; - Marshal.Copy(_rawdata,0, bitmapData.Scan0,length); - bitmap.UnlockBits(bitmapData); - - MemoryStream ms = new MemoryStream(); - - ImageCodecInfo myImageCodecInfo = GetEncoderInfo("image/png"); - - EncoderParameters myEncoderParameters = new EncoderParameters(1); - - // Save the bitmap as a JPEG file with quality level 25. - EncoderParameter myEncoderParameter = new EncoderParameter(Encoder.Quality, 90); - myEncoderParameters.Param[0] = myEncoderParameter; - - - bitmap.Save(ms, myImageCodecInfo, myEncoderParameters); - - - _compacted_data = ms.ToArray(); - _rawdata = null; - _is_decoded = false; - - return true; - } - public bool decode() - { - if (_compacted_data == null) - { - return false; - } - MemoryStream ms = new MemoryStream(); - ms.Write(_compacted_data, 0, _compacted_data.Length); - Bitmap bitmap = new Bitmap(ms); - - _rawdata = createRawbytes(bitmap); - _compacted_data = null; - _is_decoded = true; - - return true; - } -#endif - private byte[] createRawbytes(Bitmap bitmap) - { - BitmapData bitmapData = bitmap.LockBits(new Rectangle(0, 0, _width, _height), ImageLockMode.ReadOnly, PixelFormat.Format32bppArgb); - int length = bitmapData.Stride * bitmapData.Height; - byte[] result = new byte[length]; - Marshal.Copy(bitmapData.Scan0, result, 0, length); - bitmap.UnlockBits(bitmapData); - - return result; - } - public bool createTextureFromMemory() - { - destroyTexture(); - _tex = new Texture2D(_width, _height, TextureFormat.BGRA32, false); - _tex.LoadRawTextureData(_rawdata); - _tex.Compress(false); - _rawdata = null; - _tex.Apply(); - - return true; - } - public void destroyTexture() - { - //if(_tex!=null) - // UnityEngine.Object.Destroy(_tex); - _tex = null; - } - /* - public bool isDecoded() - { - return _is_decoded; - } - */ - //////////////////////////////////////////////////////////////////////////////// - private int _id=0; - private string _filePath = ""; - private string _type=""; - private byte[] _rawdata; - //private byte[] _compacted_data; - private Texture2D _tex; - private int _width; - private int _height; - - -} \ No newline at end of file diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/ImageFileWatcher/TextureData.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/ImageFileWatcher/TextureData.cs.meta deleted file mode 100644 index 248a19d..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/ImageFileWatcher/TextureData.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: bc27e4cafc85e684ca18278a6d560d51 -timeCreated: 1482216914 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/Instantiate.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/Instantiate.meta deleted file mode 100644 index 1988f17..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/Instantiate.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: f07fa386b76b78e41a6a2ddd7e8da42b -folderAsset: yes -timeCreated: 1490862110 -licenseType: Pro -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/Instantiate/GameObjectSpawnter.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/Instantiate/GameObjectSpawnter.cs deleted file mode 100644 index 1846b6a..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/Instantiate/GameObjectSpawnter.cs +++ /dev/null @@ -1,52 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -public class GameObjectSpawnter : MonoBehaviour { - - [AutoUI] - public bool is_pwan = true; - [AutoUI] - public int max_amount; - public int now_amount; - [AutoUI] - public float spawnterDelayTime; - public GameObject spawn_obj; - public Transform[] spawn_area; - private float timer = 0; - public bool CanSpawnPooPoo() - { - if (spawn_obj == null) - return false; - if (!is_pwan) - return false; - - if (now_amount >= max_amount) - return false; - - timer -= Time.deltaTime; - - if (timer <= 0) - { - timer = spawnterDelayTime; - return true; - } - - return false; - } - - public Vector3 spawnPosition() - { - Transform spwanTransform = spawn_area[Random.Range(0, spawn_area.Length)]; - Vector3 scale = spwanTransform.lossyScale; - Vector3 spwanPos = spawn_birth_pos(scale); - spwanPos += spwanTransform.position; - now_amount++; - return spwanPos; - } - - private Vector3 spawn_birth_pos(Vector3 v) - { - return new Vector3(Random.Range(-v.x / 2, v.x / 2), Random.Range(-v.y / 2, v.y / 2), Random.Range(-v.z / 2, v.z / 2)); - } -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/Instantiate/GameObjectSpawnter.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/Instantiate/GameObjectSpawnter.cs.meta deleted file mode 100644 index d49d1bc..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/Instantiate/GameObjectSpawnter.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: b6cfecb907de4474e9d43df3b01567bc -timeCreated: 1490862136 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/IronHorse.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/IronHorse.meta deleted file mode 100644 index e94c181..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/IronHorse.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: b9e6b978143cd8d47aab62d0942d34c9 -folderAsset: yes -timeCreated: 1489048454 -licenseType: Free -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/IronHorse/AVProQuad.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/IronHorse/AVProQuad.cs deleted file mode 100644 index b3855e6..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/IronHorse/AVProQuad.cs +++ /dev/null @@ -1,69 +0,0 @@ -using UnityEngine; -using UnityEngine.UI; -using System.Collections; -using System.Collections.Generic; -using uc; -using UnityEngine.Events; - -public class AVProQuad : MonoBehaviour -{ - public DShowClip movieFilename; - - public bool movieLoop; - public MoviePlayerPool.QueryStrategy strategy; - public Vector2 Size { get { return size; } } - [SerializeField] - private MoviePlayerBase avpro_movie; - //public AVProQuickTimeMovie AvProMovie { get { return avpro_movie; } } - private MeshRenderer meshRenderer { get { return GetComponent(); } } - private AudioSource audio_source; - private Vector2 size = Vector2.zero; - - void Awake() - { - load(movieFilename, movieLoop); - audio_source = GetComponent(); - if (audio_source != null) - { - audio_source.loop = movieLoop; - } - //meshRenderer.material = new Material(Shader.Find("Sprites/Default")); - } - - IEnumerator Start() - { - while (avpro_movie == null) - yield return null; - - if (avpro_movie != null) - { - avpro_movie.Play(); - } - - if (audio_source != null) - audio_source.Play(); - } - - public void Update() - { - if (avpro_movie != null) - { - meshRenderer.material.SetTexture("_MainTex", avpro_movie.Texture); - if(avpro_movie.Texture != null) - size = new Vector2(avpro_movie.Texture.width, avpro_movie.Texture.height); - } - } - - public void load(DShowClip filename, bool loop) - { - avpro_movie = MoviePlayerPool.Singleton.GetMoviePlayer(filename, loop, strategy); - } - - private void OnDestroy() - { - if(strategy == MoviePlayerPool.QueryStrategy.CreateNew) - { - MoviePlayerPool.Singleton.releaseMovie(avpro_movie); - } - } -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/IronHorse/AVProQuad.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/IronHorse/AVProQuad.cs.meta deleted file mode 100644 index 009070d..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/IronHorse/AVProQuad.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: a478f0e96f4dca04280827909679274f -timeCreated: 1489477867 -licenseType: Free -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/IronHorse/AutoFlip.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/IronHorse/AutoFlip.cs deleted file mode 100644 index e05e41f..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/IronHorse/AutoFlip.cs +++ /dev/null @@ -1,95 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -public class AutoFlip : MonoBehaviour { - [SerializeField] - bool autoFlipX = false; - - [SerializeField] - bool autoFlipY = false; - - [SerializeField] - Camera referenceCamera; - - Vector2 screenPointOld; - Vector2 direction = Vector2.zero; - Vector2 directionOld = Vector2.zero; - - // Use this for initialization - void Start () { - if (referenceCamera == null) - referenceCamera = FindObjectOfType().GetComponent().worldCamera; - - screenPointOld = referenceCamera.WorldToScreenPoint(transform.position); - } - - int flipCounterX = 0; - int flipCounterY = 0; - - // Update is called once per frame - void Update () { - if (referenceCamera == null) - return; - - Vector2 screenPoint = referenceCamera.WorldToScreenPoint(transform.position); - direction = screenPoint - screenPointOld; - if (direction.x == 0) - direction.x = directionOld.x; - - if (direction.y == 0) - direction.y = directionOld.y; - - Quaternion rotation = transform.rotation; - - { //flip X - if (direction.x * directionOld.x < 0) - { - flipCounterX = 1; - } - - if (direction.x * directionOld.x > 0 && flipCounterX != 0) - { - flipCounterX += 1; - } - - - if (autoFlipX && flipCounterX >= 4) - { - rotation *= Quaternion.Euler(0, 180, 0); - flipCounterX = 0; - } - } - - { //flip Y - if (direction.y * directionOld.y < 0) - { - flipCounterY = 1; - } - - if (direction.y * directionOld.y > 0 && flipCounterY != 0) - { - flipCounterY += 1; - } - - if (autoFlipY && flipCounterY >= 4) - { - rotation *= Quaternion.Euler(180, 0, 0); - flipCounterY = 0; - } - } - - transform.rotation = rotation; - - screenPointOld = screenPoint; - - directionOld = direction; - /* - if (direction.x != 0) - directionOld.x = direction.x; - - if (direction.y != 0) - directionOld.y = direction.y; - */ - } -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/IronHorse/AutoFlip.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/IronHorse/AutoFlip.cs.meta deleted file mode 100644 index 6732341..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/IronHorse/AutoFlip.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 26187b37b05257b468f1a406000e7e35 -timeCreated: 1489487975 -licenseType: Free -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/IronHorse/AutoScaler.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/IronHorse/AutoScaler.cs deleted file mode 100644 index f57a865..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/IronHorse/AutoScaler.cs +++ /dev/null @@ -1,56 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -[ExecuteInEditMode] -public class AutoScaler : MonoBehaviour { - - [SerializeField] - [TooltipAttribute("Adjust the final scale by 2^scaleFactor.")] - [Range(-2, 2)] - float scaleFactor = 0; - - [Header("Semi Auto Fields")] - [SerializeField] - Camera referenceCamera; - - [SerializeField] - Canvas canvas; - - [SerializeField] - AVProQuad avproQuad; - - [SerializeField] - float pixelsPerUnit = 100; - - void Start () { - if(referenceCamera == null) - referenceCamera = Camera.main; - if (canvas == null) - canvas = FindObjectOfType().GetComponent(); - - avproQuad = GetComponent(); - - SpriteRenderer spriteRenderer = GetComponent(); - if (spriteRenderer != null) - pixelsPerUnit = spriteRenderer.sprite.pixelsPerUnit; - } - - void Update() - { -//#if UNITY_EDITOR - if (canvas == null || referenceCamera == null) - return; - - Vector3 heading = transform.position - referenceCamera.transform.position; - Vector3 d = Vector3.one * Vector3.Dot(heading, referenceCamera.transform.forward) * pixelsPerUnit; - if (avproQuad != null) - { - d.x = d.x * avproQuad.Size.x / pixelsPerUnit; - d.y = d.y * avproQuad.Size.y / pixelsPerUnit; - } - float scale = Mathf.Pow(2, scaleFactor); - transform.localScale = d / canvas.planeDistance * scale; -//#endif - } -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/IronHorse/AutoScaler.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/IronHorse/AutoScaler.cs.meta deleted file mode 100644 index d20a75b..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/IronHorse/AutoScaler.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: bbb237ea8f1c97a4ab42c2db2c5b9b0d -timeCreated: 1489395063 -licenseType: Free -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/IronHorse/Editor.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/IronHorse/Editor.meta deleted file mode 100644 index d1a799c..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/IronHorse/Editor.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 96904902755e10645886b30a44112fe9 -folderAsset: yes -timeCreated: 1489390627 -licenseType: Pro -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/IronHorse/Editor/CreateIronHorseDataHolder.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/IronHorse/Editor/CreateIronHorseDataHolder.cs deleted file mode 100644 index d5934e7..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/IronHorse/Editor/CreateIronHorseDataHolder.cs +++ /dev/null @@ -1,40 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; -using UnityEditor; -using System.IO; -using UnityEditor.ProjectWindowCallback; -using System; - -namespace IronHorse -{ - public class CreateIronHorseDataHolder - { - [MenuItem("Assets/Create/IronHorseDataHolder", priority = 201)] - static void CreateDataAsset() - { - var icon = EditorGUIUtility.FindTexture("ScriptableObject Icon"); - - ProjectWindowUtil.StartNameEditingIfProjectWindowExists(0, ScriptableObject.CreateInstance(), "IronHorseDataHolder.asset", icon, null); - - } - - internal static IronHorseDataHolder CreateIronHorseDataHolderProfileAtPath(string path) - { - var profile = ScriptableObject.CreateInstance(); - profile.name = Path.GetFileName(path); - AssetDatabase.CreateAsset(profile, path); - return profile; - } - } - - - class DoCreateIronHorseProfile : EndNameEditAction - { - public override void Action(int instanceId, string pathName, string resourceFile) - { - IronHorseDataHolder holder = CreateIronHorseDataHolder.CreateIronHorseDataHolderProfileAtPath(pathName); - ProjectWindowUtil.ShowCreatedAsset(holder); - } - } -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/IronHorse/Editor/CreateIronHorseDataHolder.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/IronHorse/Editor/CreateIronHorseDataHolder.cs.meta deleted file mode 100644 index 2fe7fb3..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/IronHorse/Editor/CreateIronHorseDataHolder.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 535477b593aa05b47a94d0f66dc6f85e -timeCreated: 1489390661 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/IronHorse/Follower.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/IronHorse/Follower.cs deleted file mode 100644 index 7692d3d..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/IronHorse/Follower.cs +++ /dev/null @@ -1,79 +0,0 @@ -using UnityEngine; -using System.Collections; -[ExecuteInEditMode] -public class Follower : MonoBehaviour { - public Transform leader; - - public bool position = true; - public bool rotation = true; - public bool scaling = true; - public bool useInitRotation = true; - - public float pos_duration = 0.2f; - public float rot_duration = 0.2f; - public float scale_duration = 0.2f; - - Quaternion initialRotate = Quaternion.identity; - - Vector3 TargetPosition - { - get - { - if (leader == null) - return Vector3.zero; - if (biasMode == BiasMode.WorldSpace) return leader.position + bias; - else return leader.TransformPoint(bias); - } - } - public Vector3 bias; - public enum BiasMode - { - TargetLocalSpace, - WorldSpace - } - public BiasMode biasMode = BiasMode.WorldSpace; - - // Use this for initialization - void Start () { - //game.hideFlags = HideFlags.DontSave; - if(useInitRotation) - initialRotate = transform.rotation; - } - - // Update is called once per frame - void Update () { - if (leader == null) - return; - - float pos_step = Mathf.Clamp01(Time.deltaTime / pos_duration); - float rot_step = Mathf.Clamp01(Time.deltaTime / rot_duration); - float scale_step = Mathf.Clamp01(Time.deltaTime / scale_duration); - - if (Application.isPlaying == false) - pos_step = rot_step = scale_step = 1.0f; - - if (position) - transform.position = Vector3.Lerp(transform.position, TargetPosition, pos_step); - - if (rotation) - transform.rotation = Quaternion.Slerp(transform.rotation, leader.rotation * initialRotate, rot_step); - - if(scaling) - transform.localScale = Vector3.Lerp(transform.localScale, leader.localScale, scale_step); - } - - private void OnDestroy() - { - transform.rotation = initialRotate; - } - - void OnDrawGizmos() - { - Gizmos.color = Color.red; - Gizmos.DrawLine(transform.position, transform.position + transform.right); - Gizmos.color = Color.green; - Gizmos.DrawLine(transform.position, transform.position + transform.up); - Gizmos.color = Color.blue; - Gizmos.DrawLine(transform.position, transform.position + transform.forward); - } -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/IronHorse/Follower.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/IronHorse/Follower.cs.meta deleted file mode 100644 index 6f0808e..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/IronHorse/Follower.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: be2e1a8110137fa4489427ca12e25794 -timeCreated: 1480649878 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/IronHorse/IronHorse.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/IronHorse/IronHorse.cs deleted file mode 100644 index 96824b4..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/IronHorse/IronHorse.cs +++ /dev/null @@ -1,104 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using uc.Spline; -using UnityEngine; - -public class IronHorse : MonoBehaviour { - - [SerializeField] - private IronHorseDataHolder ironHorseHolder; - - public BezierSplineComponent m_bezierSpline; - [SerializeField] - public float targetSpeed; - public Ease.Easing m_ease; - public bool playOnStart = true; - - public float speedSmooth { set { speed_smooth = value; } } - private float speed_smooth = 0.1f; - float m_speed = 1; - float m_position = 0; - BaseSpline.SplineIterator m_iter; - - public float initialPosition = 0; - - public float Progress - { - get { if(m_bezierSpline != null) return m_position / m_bezierSpline.Spline.Length; return 0; } - } - - // Use this for initialization - IEnumerator Start () - { - while (m_bezierSpline == null) - yield return null; - - m_iter = m_bezierSpline.Spline.GetIterator(); - m_iter.SetTransform(m_bezierSpline.transform); - - if (ironHorseHolder) - { - targetSpeed = ironHorseHolder.TargetSpeed; - speed_smooth = ironHorseHolder.SpeedSmooth; - m_ease = ironHorseHolder.ease; - } - if(initialPosition != 0) - m_position = initialPosition; - - - if (playOnStart) - Play(); - } - - // Update is called once per frame - void Update() - { - if (m_bezierSpline == null || m_iter == null) - return; - - m_speed = Mathf.Lerp(m_speed, targetSpeed, speed_smooth); - - if(isPlaying) - m_position += m_speed * Time.deltaTime; - - float position = Ease.EaseByType(m_ease, 0, m_bezierSpline.Spline.Length, m_position / m_bezierSpline.Spline.Length); - m_iter.SetOffset(position); - - transform.position = m_iter.GetPosition(); - - Vector3 tangent = m_iter.GetTangent(); - if(tangent != Vector3.zero) - transform.localRotation = Quaternion.LookRotation(tangent); - } - - bool isPlaying = false; - public void Play() - { - isPlaying = true; - } - - public void Pause() - { - isPlaying = false; - } - - public void Stop() - { - Pause(); - m_position = initialPosition; - } - - void OnDrawGizmos() - { - if (m_iter == null) - return; - Gizmos.matrix = transform.localToWorldMatrix; - Gizmos.color = Color.black; - float fov = 30; - float near = 0; - float far = 10; - float aspect = 2; - Gizmos.DrawFrustum(Vector3.zero, fov, far, near, aspect); - Gizmos.DrawLine(Vector3.zero, Vector3.forward * far); - } -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/IronHorse/IronHorse.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/IronHorse/IronHorse.cs.meta deleted file mode 100644 index 68e9460..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/IronHorse/IronHorse.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: bf7012e40088f6b4faed980b209c2b99 -timeCreated: 1482311402 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/IronHorse/IronHorseDataHolder.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/IronHorse/IronHorseDataHolder.cs deleted file mode 100644 index 502129b..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/IronHorse/IronHorseDataHolder.cs +++ /dev/null @@ -1,11 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -public class IronHorseDataHolder : ScriptableObject { - - public float TargetSpeed = 10; - [Range(0,1)] - public float SpeedSmooth = 0.1f; - public Ease.Easing ease = Ease.Easing.Linear; -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/IronHorse/IronHorseDataHolder.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/IronHorse/IronHorseDataHolder.cs.meta deleted file mode 100644 index 4bfec3e..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/IronHorse/IronHorseDataHolder.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: d43dff73f8e444546bfd0e5d4c8ef27e -timeCreated: 1489390351 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/IronHorse/TouchMovie.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/IronHorse/TouchMovie.cs deleted file mode 100644 index c97cd83..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/IronHorse/TouchMovie.cs +++ /dev/null @@ -1,97 +0,0 @@ -using UnityEngine; -using System.Collections; -using UnityEngine.EventSystems; -using System; - -public class TouchMovie : MonoBehaviour, IPointerDownHandler { - - //public Texture texture; - - DShowMoviePlayer movie; - - [SerializeField] - private int MaxFrameCount = 0; - - private bool isTouch = false; - - [SerializeField] - private float MoviePlayInterval = 30; - - private float playtime; - - [SerializeField] - AudioSource audioSource; - - void Awake() - { - //audioSource = GetComponent(); - movie = GetComponent(); - } - - // Use this for initialization - void Start () { - playtime = MoviePlayInterval; - } - - // Update is called once per frame - void Update () { - - if (playtime > 0) - playtime -= Time.deltaTime; - - if(playtime<=0) - { - playtime = MoviePlayInterval; - movie.Play(); - isTouch = true; - } - - if(!isTouch) - { - if(MaxFrameCount!=0) - { - if (movie.Frame >= MaxFrameCount) - movie.Frame = 0; - } - if (audioSource != null) - { - if (audioSource.isPlaying) - audioSource.Stop(); - } - } - else - { - if (MaxFrameCount != 0) - { - if (movie.Frame >= MaxFrameCount) - { - if (audioSource != null) - { - if (!audioSource.isPlaying) - audioSource.Play(); - } - } - } - } - if(movie.IsFinished) - { - isTouch = false; - if(!movie.Loop) - { - movie.Pause(); - movie.Frame = 0; - isTouch = false; - } - } - } - - public void OnPointerDown(PointerEventData eventData) - { - if (!movie) - return; - - movie.Play(); - isTouch = true; - playtime = MoviePlayInterval; - } -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/IronHorse/TouchMovie.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/IronHorse/TouchMovie.cs.meta deleted file mode 100644 index 4e585dd..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/IronHorse/TouchMovie.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 5dc058dc969334c4baed7708e33a627f -timeCreated: 1480925151 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/MouseRecord.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/MouseRecord.meta deleted file mode 100644 index 43818a2..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/MouseRecord.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: a4fe425bbe10c6243ac6b60f17e02ecb -folderAsset: yes -timeCreated: 1494575165 -licenseType: Pro -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/MouseRecord/MousePositionRecorder.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/MouseRecord/MousePositionRecorder.cs deleted file mode 100644 index c0c0f27..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/MouseRecord/MousePositionRecorder.cs +++ /dev/null @@ -1,99 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; -using WriteReadXML; -using System; -using System.IO; -using UnityEngine.UI; -public class MousePositionRecorder : MonoBehaviour { - - private float startTime; - private string path; - [SerializeField] - private bool record; - - MouseRecordData recordData; - - private bool saving =false; - - [SerializeField] - GameObject InputFileName; - - // Use this for initialization - void Start () { - record = false; - recordData = new MouseRecordData(); - path = Application.dataPath + "/../TUIOData"; - } - - // Update is called once per frame - void Update () { - - if (saving) - return; - - if(Input.GetKeyDown(KeyCode.LeftControl)) - if (!record) - { - StartReocrd(); - } - if(Input.GetKeyUp(KeyCode.LeftControl)) - if (record) - StopRecord(); - - if (Input.GetKey(KeyCode.LeftControl)) - { - if(Input.GetMouseButtonDown(0)) - { - recordData.AddData(Time.time - startTime, Input.mousePosition, (int)TouchPhase.Began); - } - if (Input.GetMouseButton(0)) - { - if (record && Time.frameCount % 2 == 0) - { - recordData.AddData(Time.time - startTime, Input.mousePosition,(int)TouchPhase.Moved); - } - } - if (Input.GetMouseButtonUp(0)) - { - recordData.AddData(Time.time - startTime, Input.mousePosition, (int)TouchPhase.Ended); - } - } - } - - void StartReocrd() - { - print("start record"); - record = true; - startTime = Time.time; - recordData = new MouseRecordData(); - } - - void StopRecord() - { - print("stop record"); - record = false; - if (!Directory.Exists(path)) - { - Directory.CreateDirectory(path); - } - saving = true; - - InputFileName.GetComponentInChildren().textComponent.text = ""; - InputFileName.GetComponentInChildren().text = ""; - InputFileName.SetActive(saving); - } - - public void SaveData(string filename) - { - if(filename != "") - WriteRead_XML.write(path + "/" + filename + ".xml", recordData); - else - WriteRead_XML.write(path + "/" + DateTime.Now.ToString("yyyy-MMdd-HHmmss") + ".xml", recordData); - - saving = false; - - InputFileName.SetActive(saving); - } - -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/MouseRecord/MousePositionRecorder.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/MouseRecord/MousePositionRecorder.cs.meta deleted file mode 100644 index 910bbf9..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/MouseRecord/MousePositionRecorder.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: d5e1a69af0ded744aaf596f8621031d6 -timeCreated: 1494320228 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/MouseRecord/MouseRecordData.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/MouseRecord/MouseRecordData.cs deleted file mode 100644 index e3178ea..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/MouseRecord/MouseRecordData.cs +++ /dev/null @@ -1,51 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; -[System.Serializable] -public class MouseRecordData -{ - public List TimeList; - public List PosList; - public List StateList; - public float startTime; - public int currentCount; - public MouseRecordData(MouseRecordData rec) - { - TimeList = rec.TimeList; - PosList = rec.PosList; - StateList = rec.StateList; - } - - public MouseRecordData() - { - TimeList = new List(); - PosList = new List(); - StateList = new List(); - } - - public void StartUse() - { - startTime = Time.time; - currentCount = 1; - } - - public float CurrentTimeInterval { get { return TimeList[currentCount]; } } - - public Vector2 CurrentPosition { get { return PosList[currentCount]; } } - - public int CurrentState { get { return StateList[currentCount]; } } - - public void AddData(float time, Vector2 pos, int state) - { - TimeList.Add(time); - PosList.Add(new Vector2(pos.x / Screen.width, (Screen.height - pos.y) / Screen.height)); - StateList.Add(state); - } - - public void RemoveData(int i) - { - TimeList.RemoveAt(i); - PosList.RemoveAt(i); - StateList.RemoveAt(i); - } -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/MouseRecord/MouseRecordData.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/MouseRecord/MouseRecordData.cs.meta deleted file mode 100644 index 207c804..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/MouseRecord/MouseRecordData.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: ac2ef04fdb663c3498cd8398762620a3 -timeCreated: 1494485395 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/MouseRecord/MouseReocrd.prefab b/Unity-19050-05-BallPool/Assets/UnityUtils/MouseRecord/MouseReocrd.prefab deleted file mode 100644 index a362c77..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/MouseRecord/MouseReocrd.prefab +++ /dev/null @@ -1,589 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!1001 &100100000 -Prefab: - m_ObjectHideFlags: 1 - serializedVersion: 2 - m_Modification: - m_TransformParent: {fileID: 0} - m_Modifications: [] - m_RemovedComponents: [] - m_ParentPrefab: {fileID: 0} - m_RootGameObject: {fileID: 1145427747889000} - m_IsPrefabParent: 1 ---- !u!1 &1132569974689588 -GameObject: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 - m_Component: - - component: {fileID: 224329225580626450} - - component: {fileID: 222044279332232740} - - component: {fileID: 114671723098843166} - m_Layer: 5 - m_Name: Panel - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!1 &1145427747889000 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 - m_Component: - - component: {fileID: 4095985734808838} - - component: {fileID: 114419937142645754} - m_Layer: 0 - m_Name: MouseReocrd - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!1 &1174652010523566 -GameObject: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 - m_Component: - - component: {fileID: 224756943387103046} - - component: {fileID: 222508958074881168} - - component: {fileID: 114796366647978798} - m_Layer: 5 - m_Name: Text - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!1 &1181017128168798 -GameObject: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 - m_Component: - - component: {fileID: 224791935485473310} - - component: {fileID: 222117994685849106} - - component: {fileID: 114955142630196180} - m_Layer: 5 - m_Name: Placeholder - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!1 &1304123199519650 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 - m_Component: - - component: {fileID: 224805162131864716} - - component: {fileID: 223593338526273072} - - component: {fileID: 114692739916111498} - - component: {fileID: 114841667499538072} - m_Layer: 5 - m_Name: Canvas - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 0 ---- !u!1 &1368405636461710 -GameObject: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 - m_Component: - - component: {fileID: 224195381467158958} - - component: {fileID: 222777760630519368} - - component: {fileID: 114845087309707250} - - component: {fileID: 114792416378346880} - m_Layer: 5 - m_Name: InputField - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!1 &1919748941890862 -GameObject: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 - m_Component: - - component: {fileID: 224164156020394476} - - component: {fileID: 222205226031592332} - - component: {fileID: 114707445449251628} - m_Layer: 5 - m_Name: Text - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &4095985734808838 -Transform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1145427747889000} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: -4.2876215, y: -6.8355255, z: -11.477396} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: - - {fileID: 224805162131864716} - m_Father: {fileID: 0} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &114419937142645754 -MonoBehaviour: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1145427747889000} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: d5e1a69af0ded744aaf596f8621031d6, type: 3} - m_Name: - m_EditorClassIdentifier: - record: 0 - InputFileName: {fileID: 1304123199519650} ---- !u!114 &114671723098843166 -MonoBehaviour: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1132569974689588} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 0.392} - m_RaycastTarget: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - m_Sprite: {fileID: 10907, guid: 0000000000000000f000000000000000, type: 0} - m_Type: 1 - m_PreserveAspect: 0 - m_FillCenter: 1 - m_FillMethod: 4 - m_FillAmount: 1 - m_FillClockwise: 1 - m_FillOrigin: 0 ---- !u!114 &114692739916111498 -MonoBehaviour: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1304123199519650} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 1980459831, guid: f70555f144d8491a825f0804e09c671c, type: 3} - m_Name: - m_EditorClassIdentifier: - m_UiScaleMode: 0 - m_ReferencePixelsPerUnit: 100 - m_ScaleFactor: 1 - m_ReferenceResolution: {x: 800, y: 600} - m_ScreenMatchMode: 0 - m_MatchWidthOrHeight: 0 - m_PhysicalUnit: 3 - m_FallbackScreenDPI: 96 - m_DefaultSpriteDPI: 96 - m_DynamicPixelsPerUnit: 1 ---- !u!114 &114707445449251628 -MonoBehaviour: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1919748941890862} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} - m_RaycastTarget: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - m_FontData: - m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} - m_FontSize: 20 - m_FontStyle: 0 - m_BestFit: 0 - m_MinSize: 1 - m_MaxSize: 40 - m_Alignment: 0 - m_AlignByGeometry: 0 - m_RichText: 1 - m_HorizontalOverflow: 0 - m_VerticalOverflow: 0 - m_LineSpacing: 1 - m_Text: 'FileName: - -' ---- !u!114 &114792416378346880 -MonoBehaviour: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1368405636461710} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 575553740, guid: f70555f144d8491a825f0804e09c671c, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Navigation: - m_Mode: 3 - m_SelectOnUp: {fileID: 0} - m_SelectOnDown: {fileID: 0} - m_SelectOnLeft: {fileID: 0} - m_SelectOnRight: {fileID: 0} - m_Transition: 1 - m_Colors: - m_NormalColor: {r: 1, g: 1, b: 1, a: 1} - m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} - m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} - m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} - m_ColorMultiplier: 1 - m_FadeDuration: 0.1 - m_SpriteState: - m_HighlightedSprite: {fileID: 0} - m_PressedSprite: {fileID: 0} - m_DisabledSprite: {fileID: 0} - m_AnimationTriggers: - m_NormalTrigger: Normal - m_HighlightedTrigger: Highlighted - m_PressedTrigger: Pressed - m_DisabledTrigger: Disabled - m_Interactable: 1 - m_TargetGraphic: {fileID: 114845087309707250} - m_TextComponent: {fileID: 114796366647978798} - m_Placeholder: {fileID: 114955142630196180} - m_ContentType: 0 - m_InputType: 0 - m_AsteriskChar: 42 - m_KeyboardType: 0 - m_LineType: 0 - m_HideMobileInput: 0 - m_CharacterValidation: 0 - m_CharacterLimit: 0 - m_OnEndEdit: - m_PersistentCalls: - m_Calls: - - m_Target: {fileID: 114419937142645754} - m_MethodName: SaveData - m_Mode: 0 - m_Arguments: - m_ObjectArgument: {fileID: 0} - m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine - m_IntArgument: 0 - m_FloatArgument: 0 - m_StringArgument: - m_BoolArgument: 0 - m_CallState: 2 - m_TypeName: UnityEngine.UI.InputField+SubmitEvent, UnityEngine.UI, Version=1.0.0.0, - Culture=neutral, PublicKeyToken=null - m_OnValueChanged: - m_PersistentCalls: - m_Calls: [] - m_TypeName: UnityEngine.UI.InputField+OnChangeEvent, UnityEngine.UI, Version=1.0.0.0, - Culture=neutral, PublicKeyToken=null - m_CaretColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} - m_CustomCaretColor: 0 - m_SelectionColor: {r: 0.65882355, g: 0.80784315, b: 1, a: 0.7529412} - m_Text: - m_CaretBlinkRate: 0.85 - m_CaretWidth: 1 - m_ReadOnly: 0 ---- !u!114 &114796366647978798 -MonoBehaviour: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1174652010523566} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} - m_RaycastTarget: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - m_FontData: - m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} - m_FontSize: 14 - m_FontStyle: 0 - m_BestFit: 0 - m_MinSize: 10 - m_MaxSize: 40 - m_Alignment: 0 - m_AlignByGeometry: 0 - m_RichText: 0 - m_HorizontalOverflow: 1 - m_VerticalOverflow: 0 - m_LineSpacing: 1 - m_Text: ---- !u!114 &114841667499538072 -MonoBehaviour: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1304123199519650} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 1301386320, guid: f70555f144d8491a825f0804e09c671c, type: 3} - m_Name: - m_EditorClassIdentifier: - m_IgnoreReversedGraphics: 1 - m_BlockingObjects: 0 - m_BlockingMask: - serializedVersion: 2 - m_Bits: 4294967295 ---- !u!114 &114845087309707250 -MonoBehaviour: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1368405636461710} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_RaycastTarget: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - m_Sprite: {fileID: 10911, guid: 0000000000000000f000000000000000, type: 0} - m_Type: 1 - m_PreserveAspect: 0 - m_FillCenter: 1 - m_FillMethod: 4 - m_FillAmount: 1 - m_FillClockwise: 1 - m_FillOrigin: 0 ---- !u!114 &114955142630196180 -MonoBehaviour: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1181017128168798} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 0.5} - m_RaycastTarget: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - m_FontData: - m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} - m_FontSize: 14 - m_FontStyle: 2 - m_BestFit: 0 - m_MinSize: 10 - m_MaxSize: 40 - m_Alignment: 0 - m_AlignByGeometry: 0 - m_RichText: 1 - m_HorizontalOverflow: 0 - m_VerticalOverflow: 0 - m_LineSpacing: 1 - m_Text: Enter fileName... ---- !u!222 &222044279332232740 -CanvasRenderer: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1132569974689588} ---- !u!222 &222117994685849106 -CanvasRenderer: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1181017128168798} ---- !u!222 &222205226031592332 -CanvasRenderer: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1919748941890862} ---- !u!222 &222508958074881168 -CanvasRenderer: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1174652010523566} ---- !u!222 &222777760630519368 -CanvasRenderer: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1368405636461710} ---- !u!223 &223593338526273072 -Canvas: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1304123199519650} - m_Enabled: 1 - serializedVersion: 3 - m_RenderMode: 0 - m_Camera: {fileID: 0} - m_PlaneDistance: 100 - m_PixelPerfect: 0 - m_ReceivesEvents: 1 - m_OverrideSorting: 0 - m_OverridePixelPerfect: 0 - m_SortingBucketNormalizedSize: 0 - m_AdditionalShaderChannelsFlag: 0 - m_SortingLayerID: 0 - m_SortingOrder: 0 - m_TargetDisplay: 0 ---- !u!224 &224164156020394476 -RectTransform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1919748941890862} - 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: [] - m_Father: {fileID: 224329225580626450} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0.5, y: 0.5} - m_AnchorMax: {x: 0.5, y: 0.5} - m_AnchoredPosition: {x: -50.7, y: -3.48} - m_SizeDelta: {x: 160, y: 30} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!224 &224195381467158958 -RectTransform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1368405636461710} - 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: 224791935485473310} - - {fileID: 224756943387103046} - m_Father: {fileID: 224329225580626450} - m_RootOrder: 1 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0.5, y: 0.5} - m_AnchorMax: {x: 0.5, y: 0.5} - m_AnchoredPosition: {x: 51.2, y: 0} - m_SizeDelta: {x: 160, y: 30} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!224 &224329225580626450 -RectTransform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1132569974689588} - 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: 224164156020394476} - - {fileID: 224195381467158958} - m_Father: {fileID: 224805162131864716} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0.5, y: 0.5} - m_AnchorMax: {x: 0.5, y: 0.5} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 280, y: 40} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!224 &224756943387103046 -RectTransform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1174652010523566} - 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: [] - m_Father: {fileID: 224195381467158958} - m_RootOrder: 1 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0.5, y: 0.5} - m_AnchorMax: {x: 0.5, y: 0.5} - m_AnchoredPosition: {x: 0, y: -0.5} - m_SizeDelta: {x: 140, y: 17} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!224 &224791935485473310 -RectTransform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1181017128168798} - 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: [] - m_Father: {fileID: 224195381467158958} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0.5, y: 0.5} - m_AnchorMax: {x: 0.5, y: 0.5} - m_AnchoredPosition: {x: 0, y: -0.5} - m_SizeDelta: {x: 140, y: 17} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!224 &224805162131864716 -RectTransform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1304123199519650} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 0, y: 0, z: 0} - m_Children: - - {fileID: 224329225580626450} - m_Father: {fileID: 4095985734808838} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 0} - m_Pivot: {x: 0, y: 0} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/MouseRecord/MouseReocrd.prefab.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/MouseRecord/MouseReocrd.prefab.meta deleted file mode 100644 index 911e0c6..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/MouseRecord/MouseReocrd.prefab.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 6f562c9dc0946e047b8542df5356ed2d -timeCreated: 1494574771 -licenseType: Pro -NativeFormatImporter: - mainObjectFileID: 100100000 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/MouseRecord/WriteLoadXML.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/MouseRecord/WriteLoadXML.cs deleted file mode 100644 index 0c61d79..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/MouseRecord/WriteLoadXML.cs +++ /dev/null @@ -1,33 +0,0 @@ -using System; -using System.Xml.Serialization; -using System.IO; -using UnityEngine; -namespace WriteReadXML -{ - public class WriteRead_XML - { - public static void write(string file_name, T t) - { - StreamWriter file = new StreamWriter(file_name); - XmlSerializer _serializer = new XmlSerializer(typeof(T)); - _serializer.Serialize(file, t); - file.Close(); - } - public static T read(string file_name) - { - T result = default(T); - try - { - StreamReader file = new StreamReader(file_name); - XmlSerializer _serializer = new XmlSerializer(typeof(T)); - result = (T)_serializer.Deserialize(file); - file.Close(); - } - catch (Exception err) - { - Debug.LogWarning(err.StackTrace); - } - return result; - } - } -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/MouseRecord/WriteLoadXML.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/MouseRecord/WriteLoadXML.cs.meta deleted file mode 100644 index 07d8200..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/MouseRecord/WriteLoadXML.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 3574e9465d2d90a47809d576c191c672 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/ReadMe.MD b/Unity-19050-05-BallPool/Assets/UnityUtils/ReadMe.MD deleted file mode 100644 index 19961d5..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/ReadMe.MD +++ /dev/null @@ -1,16 +0,0 @@ -# How To Use ucDeploy -1. If Unity is just installed, you should input the serial number or choose Unity personal. You only have to do it once. -1. Copy all the files in Assets/Editor to the location of your project. -1. If you only want to output single scene(level), copy the "[template] build_single_scene.bat" to the location of your project, otherwise "[template] build_multi_scene.bat" -1. Modify the batch file. - * Setup the variable - "unity_x86_path" or "unity_x64_path" : If you install the unity to the different location like D:\, you have to modify it. - * Setup the variable - "build_path" : the location where you want to output. - * Setup the variable - "exe_filename" : execution file name. - * Setup the variable - "scene_path" : what the scene(level) you want to output. - * [Option] "show_the_log_folder_when_error_occur" : if you setup it on, when the build failed, the log folder will be open. - * [Option] "show_the_exe_folder_when_sccuess" : if you setup it on, when the build sccuess, the location of the execution will be open. - -# [Note] -1. the default location of the Unity - C:\Program Files (x86)\Unity or C:\Program Files\Unity -2. the default location of the output - C:\UC\ -3. the default build targer is x64. diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/ReadMe.MD.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/ReadMe.MD.meta deleted file mode 100644 index f7c8781..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/ReadMe.MD.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 5558220b5fe1065488e6834536eebdc0 -timeCreated: 1490336625 -licenseType: Free -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder.meta deleted file mode 100644 index c7731e6..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: c8ca047ad071b2e48bcee2eef0513b35 -folderAsset: yes -timeCreated: 1492414468 -licenseType: Pro -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/AudioListenerRecorder.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/AudioListenerRecorder.cs deleted file mode 100644 index 11c22c4..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/AudioListenerRecorder.cs +++ /dev/null @@ -1,144 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.IO; -using UnityEngine; -using NAudio.Wave; -using NAudio.Lame; -using System.Threading; -using System.Net; -using System.Security.Cryptography.X509Certificates; -using System.Net.Security; - -[RequireComponent(typeof(AudioListener))] -public class AudioListenerRecorder : MonoBehaviour { - - [SerializeField] - public SaveAudio.Savetype saveAudioType; - private int samplerate; - public int outputRate { get { return samplerate; } } - [SerializeField] - private string fileName = "recTest.wav"; - private int headerSize = 44; - private bool recOutput; - private FileStream fileStream; - - void Awake() - { - samplerate = AudioSettings.GetConfiguration().sampleRate; - - string filePath; -#if UNITY_64 - filePath = Application.dataPath + "/../libmp3lame.64.dll"; -#else - filePath = Application.dataPath + "/../libmp3lame.32.dll"; -#endif - if (!File.Exists(filePath)) - { - Thread WriteThread = new Thread(() => DownloadPlugins(filePath)); - WriteThread.Start(); - } - } - - void DownloadPlugins(string filePath) - { - ServicePointManager.ServerCertificateValidationCallback = MyRemoteCertificateValidationCallback; -#if UNITY_64 - string remoteUri = "https://nas.ultracombos.com/share.cgi?ssid=0UBoGfN&fid=0UBoGfN&path=%2F&filename=libmp3lame.64.dll&openfolder=forcedownload&ep="; -#else - string remoteUri = "https://nas.ultracombos.com/share.cgi?ssid=0UBoGfN&fid=0UBoGfN&path=%2F&filename=libmp3lame.32.dll&openfolder=forcedownload&ep="; -#endif - var ur = new Uri(remoteUri); - - HttpWebRequest httpRequest = (HttpWebRequest)WebRequest.Create(ur); - HttpWebResponse httpResponse = (HttpWebResponse)httpRequest.GetResponse(); - - System.IO.Stream dataStream = httpResponse.GetResponseStream(); - byte[] buffer = new byte[8192]; - - FileStream fs = new FileStream(filePath, FileMode.Create, FileAccess.Write); - int size = 0; - do - { - size = dataStream.Read(buffer, 0, buffer.Length); - if (size > 0) - fs.Write(buffer, 0, size); - } while (size > 0); - fs.Close(); - - httpResponse.Close(); - Debug.Log(remoteUri + ";Download Complete"); - } - public bool MyRemoteCertificateValidationCallback(System.Object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors) - { - bool isOk = true; - // If there are errors in the certificate chain, look at each error to determine the cause. - if (sslPolicyErrors != SslPolicyErrors.None) - { - for (int i = 0; i < chain.ChainStatus.Length; i++) - { - if (chain.ChainStatus[i].Status != X509ChainStatusFlags.RevocationStatusUnknown) - { - chain.ChainPolicy.RevocationFlag = X509RevocationFlag.EntireChain; - chain.ChainPolicy.RevocationMode = X509RevocationMode.Online; - chain.ChainPolicy.UrlRetrievalTimeout = new TimeSpan(0, 1, 0); - chain.ChainPolicy.VerificationFlags = X509VerificationFlags.AllFlags; - bool chainIsValid = chain.Build((X509Certificate2)certificate); - if (!chainIsValid) - { - isOk = false; - } - } - } - } - return isOk; - } - - public void StartRecord(string filename) - { - fileName = filename; - StartWriting(fileName); - recOutput = true; - } - - public void StopRecord() - { - recOutput = false; - SaveAudio.WriteHeader(fileStream, saveAudioType); - fileStream = null; - } - - void StartWriting(string name) - { - fileStream = new FileStream(name + "."+ saveAudioType.ToString(), FileMode.Create); - byte emptyByte = new byte(); - for (int i = 0; i < headerSize; i++) //preparing the header - { - fileStream.WriteByte(emptyByte); - } - } - - void OnAudioFilterRead(float[] data, int channels) - { - if (recOutput) - { - SaveAudio.ConvertAndWrite(fileStream , data, saveAudioType); - } - } - - void OnDisable() - { - if (fileStream == null) - return; - fileStream.Dispose(); - fileStream.Close(); - } - - void OnDestroy() - { - if (fileStream == null) - return; - fileStream.Dispose(); - fileStream.Close(); - } -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/AudioListenerRecorder.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/AudioListenerRecorder.cs.meta deleted file mode 100644 index 72a610e..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/AudioListenerRecorder.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 8d77be33a4130d1448032df96f00447f -timeCreated: 1491969221 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/Editor.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/Editor.meta deleted file mode 100644 index 0fec500..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/Editor.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 41ede3595a014e7458fe66043d5a1f28 -folderAsset: yes -timeCreated: 1492414468 -licenseType: Pro -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/Editor/MovieRecorderEditor.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/Editor/MovieRecorderEditor.cs deleted file mode 100644 index 072fec2..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/Editor/MovieRecorderEditor.cs +++ /dev/null @@ -1,90 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; -using UnityEditor; -using System.IO; -using System.Threading; -using System.Net; -using System; -using System.Net.Security; -using System.Security.Cryptography.X509Certificates; - -[ExecuteInEditMode] -[CustomEditor(typeof(MovieRecorder))] -public class MovieRecorderEditor : Editor { - - public bool MyRemoteCertificateValidationCallback(System.Object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors) - { - bool isOk = true; - // If there are errors in the certificate chain, look at each error to determine the cause. - if (sslPolicyErrors != SslPolicyErrors.None) - { - for (int i = 0; i < chain.ChainStatus.Length; i++) - { - if (chain.ChainStatus[i].Status != X509ChainStatusFlags.RevocationStatusUnknown) - { - chain.ChainPolicy.RevocationFlag = X509RevocationFlag.EntireChain; - chain.ChainPolicy.RevocationMode = X509RevocationMode.Online; - chain.ChainPolicy.UrlRetrievalTimeout = new TimeSpan(0, 1, 0); - chain.ChainPolicy.VerificationFlags = X509VerificationFlags.AllFlags; - bool chainIsValid = chain.Build((X509Certificate2)certificate); - if (!chainIsValid) - { - isOk = false; - } - } - } - } - return isOk; - } - - void OnEnable() - { - if (!Directory.Exists(Application.streamingAssetsPath)) - Directory.CreateDirectory(Application.streamingAssetsPath); - if (!Directory.Exists(Application.streamingAssetsPath + "/FFmpegOut")) - Directory.CreateDirectory(Application.streamingAssetsPath + "/FFmpegOut"); - var filePath = Application.streamingAssetsPath + "/FFmpegOut/ffmpeg.exe"; - if (!File.Exists(filePath)) - { - Thread WriteThread = new Thread(() => Downloadffmpeg(filePath)); - WriteThread.Start(); - } - } - - void Downloadffmpeg(string path) - { - ServicePointManager.ServerCertificateValidationCallback = MyRemoteCertificateValidationCallback; - string remoteUri = "https://nas.ultracombos.com/share.cgi?ssid=0UBoGfN&fid=0UBoGfN&path=%2F&filename=ffmpeg.exe&openfolder=forcedownload&ep="; - - var ur = new Uri(remoteUri); - - HttpWebRequest httpRequest = (HttpWebRequest)WebRequest.Create(ur); - HttpWebResponse httpResponse = (HttpWebResponse)httpRequest.GetResponse(); - - System.IO.Stream dataStream = httpResponse.GetResponseStream(); - byte[] buffer = new byte[8192]; - - FileStream fs = new FileStream(path,FileMode.Create, FileAccess.Write); - int size = 0; - do - { - size = dataStream.Read(buffer, 0, buffer.Length); - if (size > 0) - fs.Write(buffer, 0, size); - } while (size > 0); - fs.Close(); - - httpResponse.Close(); - Debug.Log(remoteUri + ";Download Complete"); - - } - - public override void OnInspectorGUI() - { - //GUILayout.Label("the most important is FPS ,take care if u do not want the mistake what happen to the audio and capture is not have synchronization!!"); - GUILayout.Label("注意一下FPS ,過低可能發生影片聲音沒同步問題 "); - EditorGUILayout.Separator(); - DrawDefaultInspector(); - } -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/Editor/MovieRecorderEditor.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/Editor/MovieRecorderEditor.cs.meta deleted file mode 100644 index 45f23eb..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/Editor/MovieRecorderEditor.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 05b87e9c84ca52644b02291fa1eac698 -timeCreated: 1492411778 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/Encoder.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/Encoder.meta deleted file mode 100644 index 01e1cd2..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/Encoder.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 00bce3088486eb44685c4d9a514646ba -folderAsset: yes -timeCreated: 1491980326 -licenseType: Pro -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/Encoder/ID3TagData.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/Encoder/ID3TagData.cs deleted file mode 100644 index c2ca33a..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/Encoder/ID3TagData.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace NAudio.Lame -{ - /// ID3 tag content - public class ID3TagData - { - // Standard values: - /// Track title (TIT2) - public string Title; - /// Artist (TPE1) - public string Artist; - /// Album (TALB) - public string Album; - /// Year (TYER) - public string Year; - /// Comment (COMM) - public string Comment; - /// Genre (TCON) - public string Genre; - /// Track number (TRCK) - public string Track; - - // Experimental: - /// Subtitle (TIT3) - public string Subtitle; - /// AlbumArtist (TPE2) - public string AlbumArtist; - - /// Album art - PNG, JPG or GIF file content - public byte[] AlbumArt; - } -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/Encoder/ID3TagData.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/Encoder/ID3TagData.cs.meta deleted file mode 100644 index f0e4b35..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/Encoder/ID3TagData.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: e69a5c193017ee14aa5da0e724a8ea43 -timeCreated: 1492512880 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/Encoder/LameDLL.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/Encoder/LameDLL.cs deleted file mode 100644 index be0fdb5..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/Encoder/LameDLL.cs +++ /dev/null @@ -1,90 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using LameDLLWrap; - -namespace NAudio.Lame -{ - /// LAME DLL version information - public class LAMEVersion - { - /* generic LAME version */ - /// LAME library major version - public int Major { get; private set; } - /// LAME library minor version - public int Minor { get; private set; } - /// LAME library 'Alpha' version flag - public bool Alpha { get; private set; } - /// LAME library 'Beta' version flag - public bool Beta { get; private set; } - - /// Psychoacoustic code major version - public int PsychoAcoustic_Major { get; private set; } - /// Psychoacoustic code minor version - public int PsychoAcoustic_Minor { get; private set; } - /// Psychoacoustic code 'Alpha' version flag - public bool PsychoAcoustic_Alpha { get; private set; } - /// Psychoacoustic code 'Beta' version flag - public bool PsychoAcoustic_Beta { get; private set; } - - /// Compile-time features string - public string Features { get; private set; } - - /// Constructor, library-local, converts - /// - internal LAMEVersion(LameDLLWrap.LAMEVersion source) - { - Major = source.major; - Minor = source.minor; - Alpha = source.alpha; - Beta = source.beta; - - PsychoAcoustic_Major = source.psy_major; - PsychoAcoustic_Minor = source.psy_minor; - PsychoAcoustic_Alpha = source.psy_alpha; - PsychoAcoustic_Beta = source.psy_beta; - - Features = source.features; - } - - // Prevent default construction - private LAMEVersion() { } - } - - /// - /// Static class providing access to context-free LAME entry points - /// - /// - /* - public static class LameDLL - { - static LameDLL() - { - Loader.Init(); - } - - #region DLL version data - /// Lame Version - public static string LameVersion { get { return LibMp3Lame.LameVersion; } } - /// Lame Short Version - public static string LameShortVersion { get { return LibMp3Lame.LameShortVersion; } } - /// Lame Very Short Version - public static string LameVeryShortVersion { get { return LibMp3Lame.LameVeryShortVersion; } } - /// Lame Psychoacoustic Version - public static string LamePsychoacousticVersion { get { return LibMp3Lame.LamePsychoacousticVersion; } } - /// Lame URL - public static string LameURL { get { return LibMp3Lame.LameURL; } } - /// Lame library bit width - 32 or 64 bit - public static string LameOSBitness { get { return LibMp3Lame.LameOSBitness; } } - - /// Get LAME version information - /// LAME version structure - public static NAudio.Lame.LAMEVersion GetLameVersion() - { - return new NAudio.Lame.LAMEVersion(LibMp3Lame.GetLameVersion()); - } - #endregion - } - */ -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/Encoder/LameDLL.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/Encoder/LameDLL.cs.meta deleted file mode 100644 index b80ae48..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/Encoder/LameDLL.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: a775e1475659fa648ab534c09e089c0a -timeCreated: 1492512880 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/Encoder/LibMp3Lame.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/Encoder/LibMp3Lame.cs deleted file mode 100644 index 47cb58f..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/Encoder/LibMp3Lame.cs +++ /dev/null @@ -1,2163 +0,0 @@ -#region MIT license -// -// MIT license -// -// Copyright (c) 2013 Corey Murtagh -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// -#endregion -#region Attributions -// -// Contents of the LibMp3Lame.NativeMethods class and associated enumerations -// are directly based on the lame.h v1.190, available at: -// http://lame.cvs.sourceforge.net/viewvc/lame/lame/include/lame.h?revision=1.190&content-type=text%2Fplain -// -// Source lines and comments included where useful/possible. -// -#endregion - -using UnityEngine; - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Runtime.InteropServices; - - -/* - * Native dll invocation helper by Francis R. Griffiths-Keam - * www.runningdimensions.com/blog - */ - -public static class Native -{ - public static T Invoke(IntPtr library, params object[] pars) - { - IntPtr funcPtr = GetProcAddress(library, typeof(T2).Name); - if (funcPtr == IntPtr.Zero) - { - Debug.LogWarning("Could not gain reference to method address."); - return default(T); - } - - var func = Marshal.GetDelegateForFunctionPointer(GetProcAddress(library, typeof(T2).Name), typeof(T2)); - return (T)func.DynamicInvoke(pars); - } - - public static void Invoke(IntPtr library, params object[] pars) - { - IntPtr funcPtr = GetProcAddress(library, typeof(T).Name); - if (funcPtr == IntPtr.Zero) - { - Debug.LogWarning("Could not gain reference to method address."); - return; - } - - var func = Marshal.GetDelegateForFunctionPointer(funcPtr, typeof(T)); - func.DynamicInvoke(pars); - } - - [DllImport("kernel32", SetLastError = true)] - [return: MarshalAs(UnmanagedType.Bool)] - public static extern bool FreeLibrary(IntPtr hModule); - - [DllImport("kernel32", SetLastError = true, CharSet = CharSet.Unicode)] - public static extern IntPtr LoadLibrary(string lpFileName); - - [DllImport("kernel32")] - public static extern IntPtr GetProcAddress(IntPtr hModule, string procedureName); -} - - -namespace LameDLLWrap -{ -// using NAudio.Lame; - - /// LAME encoding presets - internal enum LAMEPreset : int - { - //values from 8 to 320 should be reserved for abr bitrates - //for abr I'd suggest to directly use the targeted bitrate as a value - - /// 8-kbit ABR - ABR_8 = 8, - /// 16-kbit ABR - ABR_16 = 16, - /// 32-kbit ABR - ABR_32 = 32, - /// 48-kbit ABR - ABR_48 = 48, - /// 64-kbit ABR - ABR_64 = 64, - /// 96-kbit ABR - ABR_96 = 96, - /// 128-kbit ABR - ABR_128 = 128, - /// 160-kbit ABR - ABR_160 = 160, - /// 256-kbit ABR - ABR_256 = 256, - /// 320-kbit ABR - ABR_320 = 320, - - //Vx to match Lame and VBR_xx to match FhG - /// VBR Quality 9 - V9 = 410, - /// FhG: VBR Q10 - VBR_10 = 410, - /// VBR Quality 8 - V8 = 420, - /// FhG: VBR Q20 - VBR_20 = 420, - /// VBR Quality 7 - V7 = 430, - /// FhG: VBR Q30 - VBR_30 = 430, - /// VBR Quality 6 - V6 = 440, - /// FhG: VBR Q40 - VBR_40 = 440, - /// VBR Quality 5 - V5 = 450, - /// FhG: VBR Q50 - VBR_50 = 450, - /// VBR Quality 4 - V4 = 460, - /// FhG: VBR Q60 - VBR_60 = 460, - /// VBR Quality 3 - V3 = 470, - /// FhG: VBR Q70 - VBR_70 = 470, - /// VBR Quality 2 - V2 = 480, - /// FhG: VBR Q80 - VBR_80 = 480, - /// VBR Quality 1 - V1 = 490, - /// FhG: VBR Q90 - VBR_90 = 490, - /// VBR Quality 0 - V0 = 500, - /// FhG: VBR Q100 - VBR_100 = 500, - - // still there for compatibility - /// R3Mix quality - - R3MIX = 1000, - /// Standard Quality - STANDARD = 1001, - /// Extreme Quality - EXTREME = 1002, - /// Insane Quality - INSANE = 1003, - /// Fast Standard Quality - STANDARD_FAST = 1004, - /// Fast Extreme Quality - EXTREME_FAST = 1005, - /// Medium Quality - MEDIUM = 1006, - /// Fast Medium Quality - MEDIUM_FAST = 1007 - } - - /// Delegate for receiving output messages - /// Text to output - public delegate void ReportFunction(string text); - - [UnmanagedFunctionPointer(CallingConvention.Cdecl, SetLastError = true, CharSet = CharSet.Ansi)] - internal delegate void delReportFunction(string fmt, IntPtr args); - - public delegate void GenreCallback(int index, string genre); - - [UnmanagedFunctionPointer(CallingConvention.Cdecl, SetLastError = true, CharSet = CharSet.Ansi)] - internal delegate void delGenreCallback( - int index, - string genre, - IntPtr cookie - ); - - /// MPEG channel mode - public enum MPEGMode : uint - { - /// Stereo - Stereo = 0, - /// Joint Stereo - // JointStereo = 1, - DualChannel = 2, // LAME does not support this - /// Mono - Mono = 3, - /// Undefined - NotSet = 4 - } - - - /// Assembler optimizations - public enum ASMOptimizations : uint - { - /// Use MMX instructions - MMX = 1, - /// Use AMD 3DNow instructions - AMD_3DNow = 2, - /// Use SSE instructions - SSE = 3 - } - - /// Variable BitRate Mode - public enum VBRMode : uint - { - /// No VBR (Constant Bitrate) - Off = 0, - /// MT Algorithm (Mark Taylor). Now same as MTRH - MT, - /// RH Algorithm (Roger Hegemann) - RH, - /// ABR - Average Bitrate - ABR, - /// MTRH Algorithm (Mark Taylor & Roger Hegemann)( - MTRH, - /// Default algorithm: MTRH - Default = MTRH - } - - /// MPEG wrapper version - public enum MPEGVersion : int - { - /// MPEG 2 - MPEG2 = 0, - /// MPEG 1 - MPEG1 = 1, - /// MPEG 2.5 - MPEG2_5 = 2 - } - - /// LAME DLL version information - [StructLayout(LayoutKind.Sequential)] - public class LAMEVersion - { - /* generic LAME version */ - /// LAME library major version - public int major; - /// LAME library minor version - public int minor; - /// LAME library 'Alpha' version flag - [MarshalAs(UnmanagedType.Bool)] - public bool alpha; - /// LAME library 'Beta' version flag - [MarshalAs(UnmanagedType.Bool)] - public bool beta; - - /// Psychoacoustic code major version - public int psy_major; - /// Psychoacoustic code minor version - public int psy_minor; - /// Psychoacoustic code 'Alpha' version flag - [MarshalAs(UnmanagedType.Bool)] - public bool psy_alpha; - /// Psychoacoustic code 'Beta' version flag - [MarshalAs(UnmanagedType.Bool)] - public bool psy_beta; - - /* compile time features */ - // const char *features; /* Don't make assumptions about the contents! */ - private IntPtr features_ptr = IntPtr.Zero; - - /// Compile-time features string - public string features - { - get - { - if (features_ptr != IntPtr.Zero) - return Marshal.PtrToStringAuto(features_ptr); - return null; - } - } - } - - - [StructLayout(LayoutKind.Sequential)] - public struct mp3data - { - /// 1 if header was parsed and following data was computed - [MarshalAs(UnmanagedType.Bool)] - public bool header_parsed; - /// number of channels - public int stereo; - /// sample rate - public int samplerate; - /// bitrate - public int bitrate; - /// mp3 frame type - public int mode; - /// mp3 frame type - public int mode_ext; - /// number of samples per MP3 frame - public int framesize; - - // This data is only computed if mpglib detects a Xing VBR header - - /// number of samples in MP3 file - public ulong nsamp; - /// total number of frames in MP3 file - public int totalframes; - - // This data is not currently computed by mpglib - - /// frames decoded counter - public int framenum; - } - - - - - /// LAME interface class - public class LibMp3Lame : IDisposable - { - /// Constructor - public LibMp3Lame() - { - context = NativeMethods.lame_init(); - InitReportFunctions(); - } - - /// Destructor - ~LibMp3Lame() - { - Dispose(true); - } - - /// Dispose of object - public void Dispose() - { - Dispose(false); - } - - /// Clean up object, closing LAME context if present - /// True if called from destructor, else false - protected virtual void Dispose(bool final) - { - if (context != IntPtr.Zero) - { - NativeMethods.lame_close(context); - context = IntPtr.Zero; - } - } - - #region LAME context handle - private IntPtr context = IntPtr.Zero; - #endregion - - #region DLL version data - /// Lame Version - public static string LameVersion { get { return NativeMethods.get_lame_version(); } } - /// Lame Short Version - public static string LameShortVersion { get { return NativeMethods.get_lame_short_version(); } } - /// Lame Very Short Version - public static string LameVeryShortVersion { get { return NativeMethods.get_lame_very_short_version(); } } - /// Lame Psychoacoustic Version - public static string LamePsychoacousticVersion { get { return NativeMethods.get_psy_version(); } } - /// Lame URL - public static string LameURL { get { return NativeMethods.get_lame_url(); } } - /// Lame library bit width - 32 or 64 bit - public static string LameOSBitness { get { return NativeMethods.get_lame_os_bitness(); } } - - /// Get LAME version information - /// LAME version structure - public static LAMEVersion GetLameVersion() - { - LAMEVersion ver = new LAMEVersion(); - NativeMethods.get_lame_version_numerical(ver); - return ver; - } - #endregion - - #region Properties - delegate int setFunc(IntPtr p, T val); - - // wrapper function to simplify calling lame_set_* entry points - void setter(setFunc f, T value, string name = null) - { - int res = f(context, value); - if (res != 0) - { - if (string.IsNullOrEmpty(name)) - name = f.Method.Name; - throw new Exception(string.Format("libmp3lame: {0}({1}) returned error code: {2}", name, value, res)); - } - } - - #region Input Stream Description - /// Number of samples (optional) - public UInt64 NumSamples - { - get { return NativeMethods.lame_get_num_samples(context); } - set { setter(NativeMethods.lame_set_num_samples, value); } - } - /// Input sample rate - public int InputSampleRate - { - get { return NativeMethods.lame_get_in_samplerate(context); } - set { setter(NativeMethods.lame_set_in_samplerate, value); } - } - /// Number of channels - public int NumChannels - { - get { return NativeMethods.lame_get_num_channels(context); } - set { setter(NativeMethods.lame_set_num_channels, value); } - } - /// Global amplification factor - public float Scale - { - get { return NativeMethods.lame_get_scale(context); } - set { setter(NativeMethods.lame_set_scale, value); } - } - /// Left channel amplification - public float ScaleLeft - { - get { return NativeMethods.lame_get_scale_left(context); } - set { setter(NativeMethods.lame_set_scale_left, value); } - } - /// Right channel amplification - public float ScaleRight - { - get { return NativeMethods.lame_get_scale_right(context); } - set { setter(NativeMethods.lame_set_scale_right, value); } - } - /// Output sample rate - public int OutputSampleRate - { - get { return NativeMethods.lame_get_out_samplerate(context); } - set { setter(NativeMethods.lame_set_out_samplerate, value); } - } - #endregion - - #region General Control Parameters - /// Enable analysis - public bool Anaylysis - { - get { return NativeMethods.lame_get_analysis(context); } - set { setter(NativeMethods.lame_set_analysis, value); } - } - /// Write VBR tag to MP3 file - public bool WriteVBRTag - { - get { return NativeMethods.lame_get_bWriteVbrTag(context) != 0; } - set { setter(NativeMethods.lame_set_bWriteVbrTag, value ? 1 : 0); } - } - /// - public bool DecodeOnly - { - get { return NativeMethods.lame_get_decode_only(context) != 0; } - set { setter(NativeMethods.lame_set_decode_only, value ? 1 : 0); } - } - /// Encoding quality - public int Quality - { - get { return NativeMethods.lame_get_quality(context); } - set { setter(NativeMethods.lame_set_quality, value); } - } - /// Specify MPEG channel mode, or use best guess if false - public MPEGMode Mode - { - get { return NativeMethods.lame_get_mode(context); } - set { setter(NativeMethods.lame_set_mode, value); } - } - /// Force M/S mode - public bool ForceMS - { - get { return NativeMethods.lame_get_force_ms(context); } - set { setter(NativeMethods.lame_set_force_ms, value); } - } - /// Use free format - public bool UseFreeFormat - { - get { return NativeMethods.lame_get_free_format(context); } - set { setter(NativeMethods.lame_set_free_format, value); } - } - /// Perform replay gain analysis - public bool FindReplayGain - { - get { return NativeMethods.lame_get_findReplayGain(context); } - set { setter(NativeMethods.lame_set_findReplayGain, value); } - } - /// Decode on the fly. Search for the peak sample. If the ReplayGain analysis is enabled then perform the analysis on the decoded data stream. - public bool DecodeOnTheFly - { - get { return NativeMethods.lame_get_decode_on_the_fly(context); } - set { setter(NativeMethods.lame_set_decode_on_the_fly, value); } - } - /// Counters for gapless encoding - public int NoGapTotal - { - get { return NativeMethods.lame_get_nogap_total(context); } - set { setter(NativeMethods.lame_set_nogap_total, value); } - } - /// Counters for gapless encoding - public int NoGapCurrentIndex - { - get { return NativeMethods.lame_get_nogap_currentindex(context); } - set { setter(NativeMethods.lame_set_nogap_currentindex, value); } - } - /// Output bitrate - public int BitRate - { - get { return NativeMethods.lame_get_brate(context); } - set { setter(NativeMethods.lame_set_brate, value); } - } - /// Output compression ratio - public float CompressionRatio - { - get { return NativeMethods.lame_get_compression_ratio(context); } - set { setter(NativeMethods.lame_set_compression_ratio, value); } - } - - /// Set compression preset - public bool SetPreset(int preset) - { - int res = NativeMethods.lame_set_preset(context, (LAMEPreset) preset); - return res == 0; - } - - /// Enable/Disable optimizations - public bool SetOptimization(ASMOptimizations opt, bool enabled) - { - int res = NativeMethods.lame_set_asm_optimizations(context, opt, enabled); - return res == 0; - } - #endregion - - #region Frame parameters - /// Set output Copyright flag - public bool Copyright - { - get { return NativeMethods.lame_get_copyright(context); } - set { setter(NativeMethods.lame_set_copyright, value); } - } - /// Set output Original flag - public bool Original - { - get { return NativeMethods.lame_get_original(context); } - set { setter(NativeMethods.lame_set_original, value); } - } - /// Set error protection. Uses 2 bytes from each frame for CRC checksum - public bool ErrorProtection - { - get { return NativeMethods.lame_get_error_protection(context); } - set { setter(NativeMethods.lame_set_error_protection, value); } - } - /// MP3 'private extension' bit. Meaningless. - public bool Extension - { - get { return NativeMethods.lame_get_extension(context); } - set { setter(NativeMethods.lame_set_extension, value); } - } - /// Enforce strict ISO compliance. - public bool StrictISO - { - get { return NativeMethods.lame_get_strict_ISO(context); } - set { setter(NativeMethods.lame_set_strict_ISO, value); } - } - #endregion - - #region Quantization/Noise Shaping - /// Disable the bit reservoir. - public bool DisableReservoir { get { return NativeMethods.lame_get_disable_reservoir(context); } set { setter(NativeMethods.lame_set_disable_reservoir, value); } } - /// Set a different "best quantization" function - public int QuantComp { get { return NativeMethods.lame_get_quant_comp(context); } set { setter(NativeMethods.lame_set_quant_comp, value); } } - /// Set a different "best quantization" function - public int QuantCompShort { get { return NativeMethods.lame_get_quant_comp_short(context); } set { setter(NativeMethods.lame_set_quant_comp_short, value); } } - /// Set a different "best quantization" function - public int ExperimentalX { get { return NativeMethods.lame_get_experimentalX(context); } set { setter(NativeMethods.lame_set_experimentalX, value); } } - /// Set a different "best quantization" function - public int ExperimentalY { get { return NativeMethods.lame_get_experimentalY(context); } set { setter(NativeMethods.lame_set_experimentalY, value); } } - /// Set a different "best quantization" function - public int ExperimentalZ { get { return NativeMethods.lame_get_experimentalZ(context); } set { setter(NativeMethods.lame_set_experimentalZ, value); } } - /// Set a different "best quantization" function - public int ExperimentalNSPsyTune { get { return NativeMethods.lame_get_exp_nspsytune(context); } set { setter(NativeMethods.lame_set_exp_nspsytune, value); } } - /// Set a different "best quantization" function - public int MSFix { get { return NativeMethods.lame_get_msfix(context); } set { setter(NativeMethods.lame_set_msfix, value); } } - #endregion - - #region VBR Control - /// Set VBR mode - public VBRMode VBR { get { return NativeMethods.lame_get_VBR(context); } set { setter(NativeMethods.lame_set_VBR, value); } } - /// VBR quality level. 0 = highest, 9 = lowest. - public int VBRQualityLevel { get { return NativeMethods.lame_get_VBR_q(context); } set { setter(NativeMethods.lame_set_VBR_q, value); } } - /// VBR quality level. 0 = highest, 9 = lowest - public float VBRQuality { get { return NativeMethods.lame_get_VBR_quality(context); } set { setter(NativeMethods.lame_set_VBR_quality, value); } } - - /// ABR average bitrate - public int VBRMeanBitrateKbps { get { return NativeMethods.lame_get_VBR_mean_bitrate_kbps(context); } set { setter(NativeMethods.lame_set_VBR_mean_bitrate_kbps, value); } } - /// ABR minimum bitrate - public int VBRMinBitrateKbps { get { return NativeMethods.lame_get_VBR_min_bitrate_kbps(context); } set { setter(NativeMethods.lame_set_VBR_min_bitrate_kbps, value); } } - /// ABR maximum bitrate - public int VBRMaxBitrateKbps { get { return NativeMethods.lame_get_VBR_max_bitrate_kbps(context); } set { setter(NativeMethods.lame_set_VBR_max_bitrate_kbps, value); } } - - /// Strictly enforce minimum bitrate. Normall it will be violated for analog silence. - public bool VBRHardMin { get { return NativeMethods.lame_get_VBR_hard_min(context); } set { setter(NativeMethods.lame_set_VBR_hard_min, value); } } - #endregion - - #region Filtering control -#pragma warning disable 1591 - public int LowPassFreq { get { return NativeMethods.lame_get_lowpassfreq(context); } set { setter(NativeMethods.lame_set_lowpassfreq, value); } } - public int LowPassWidth { get { return NativeMethods.lame_get_lowpasswidth(context); } set { setter(NativeMethods.lame_set_lowpasswidth, value); } } - public int HighPassFreq { get { return NativeMethods.lame_get_highpassfreq(context); } set { setter(NativeMethods.lame_set_highpassfreq, value); } } - public int HighPassWidth { get { return NativeMethods.lame_get_highpasswidth(context); } set { setter(NativeMethods.lame_set_highpasswidth, value); } } -#pragma warning restore 1591 - #endregion - - #region Internal state variables, read only -#pragma warning disable 1591 - public MPEGVersion Version { get { return NativeMethods.lame_get_version(context); } } - public int EncoderDelay { get { return NativeMethods.lame_get_encoder_delay(context); } } - public int EncoderPadding { get { return NativeMethods.lame_get_encoder_padding(context); } } - public int MFSamplesToEncode { get { return NativeMethods.lame_get_mf_samples_to_encode(context); } } - public int MP3BufferSize { get { return NativeMethods.lame_get_size_mp3buffer(context); } } - public int FrameNumber { get { return NativeMethods.lame_get_frameNum(context); } } - public int TotalFrames { get { return NativeMethods.lame_get_totalframes(context); } } - public int RadioGain { get { return NativeMethods.lame_get_RadioGain(context); } } - public int AudiophileGain { get { return NativeMethods.lame_get_AudiophileGain(context); } } - public float PeakSample { get { return NativeMethods.lame_get_PeakSample(context); } } - public int NoClipGainChange { get { return NativeMethods.lame_get_noclipGainChange(context); } } - public float NoClipScale { get { return NativeMethods.lame_get_noclipScale(context); } } -#pragma warning restore 1591 - #endregion - - #endregion - - #region Methods - /// Initialize encoder with parameters - /// Success/fail - public bool InitParams() - { - if (context == IntPtr.Zero) - throw new InvalidOperationException("InitParams called without initializing context"); - int res = NativeMethods.lame_init_params(context); - return res == 0; - } - - /// Write 16-bit integer PCM samples to encoder - /// PCM sample data. Interleaved for stereo. - /// Number of valid samples. - /// Buffer to write encoded data to - /// Size of buffer. - /// True if mono, false if stereo. - /// Number of bytes of encoded data written to output buffer. - public int Write(short[] samples, int nSamples, byte[] output, int outputSize, bool mono) - { - int rc = -1; - if (mono) - rc = NativeMethods.lame_encode_buffer(context, samples, samples, nSamples, output, outputSize); - else - rc = NativeMethods.lame_encode_buffer_interleaved(context, samples, nSamples / 2, output, outputSize); - - return rc; - } - - // float - /// Write 32-bit floating point PCM samples to encoder - /// PCM sample data. Interleaved for stereo. - /// Number of valid samples. - /// Buffer to write encoded data to - /// Size of buffer. - /// True if mono, false if stereo. - /// Number of bytes of encoded data written to output buffer. - public int Write(float[] samples, int nSamples, byte[] output, int outputSize, bool mono) - { - int rc = -1; - if (mono) - rc = NativeMethods.lame_encode_buffer_ieee_float(context, samples, samples, nSamples, output, outputSize); - else - rc = NativeMethods.lame_encode_buffer_interleaved_ieee_float(context, samples, nSamples / 2, output, outputSize); - return rc; - } - - /// Flush encoder output - /// Buffer to write encoded data to - /// Size of buffer. - /// Number of bytes of encoded data written to output buffer. - public int Flush(byte[] output, int outputSize) - { - int res = NativeMethods.lame_encode_flush(context, output, outputSize); - return Math.Max(0, res); - } - - #endregion - - internal static class NativeMethods - { - /* - private static Delegate _get_delegate(string func_name) - { - IntPtr func_ptr = Native.GetProcAddress(_ofplugin, func_name); - //if (func_ptr == IntPtr.Zero) - // Debug.LogError("Function " + func_name + " doesn't exist."); - return Marshal.GetDelegateForFunctionPointer(func_ptr, typeof(T)); - } - static NativeMethods() - { - - _my_plugin = Native.LoadLibrary(Application.dataPath + "/Plugins/"+ libname); - lame_init = (LameInitNative)_get_delegate("lame_init"); - } - */ -#if X64 - const string libname = @"libmp3lame.64.dll"; -#else - const string libname = @"libmp3lame.32.dll"; -#endif - - public static readonly string BoundDLL = libname; - - // typedef void (*lame_report_function)(const char *format, va_list ap); - - #region Startup/Shutdown - - private static IntPtr _my_plugin; - /* - * REQUIRED: - * initialize the encoder. sets default for all encoder parameters, - * returns NULL if some malloc()'s failed - * otherwise returns pointer to structure needed for all future - * API calls. - */ - // lame_global_flags * CDECL lame_init(void); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern IntPtr lame_init(); - /* - internal delegate IntPtr LameInitNative(); - internal static LameInitNative lame_init; - */ - /* - * REQUIRED: - * final call to free all remaining buffers - */ - // int CDECL lame_close (lame_global_flags *); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int lame_close(IntPtr context); - - #endregion - - #region LAME information - /* - * OPTIONAL: - * get the version number, in a string. of the form: - * "3.63 (beta)" or just "3.63". - */ - // const char* CDECL get_lame_version ( void ); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern string get_lame_version(); - // const char* CDECL get_lame_short_version ( void ); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern string get_lame_short_version(); - // const char* CDECL get_lame_very_short_version ( void ); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern string get_lame_very_short_version(); - // const char* CDECL get_psy_version ( void ); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern string get_psy_version(); - // const char* CDECL get_lame_url ( void ); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern string get_lame_url(); - // const char* CDECL get_lame_os_bitness ( void ); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern string get_lame_os_bitness(); - - // void CDECL get_lame_version_numerical(lame_version_t *); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern void get_lame_version_numerical([Out]LAMEVersion ver); - #endregion - - #region Input Stream Description - /* number of samples. default = 2^32-1 */ - // int CDECL lame_set_num_samples(lame_global_flags *, unsigned long); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int lame_set_num_samples(IntPtr context, UInt64 num_samples); - // unsigned long CDECL lame_get_num_samples(const lame_global_flags *); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern UInt64 lame_get_num_samples(IntPtr context); - - /* input sample rate in Hz. default = 44100hz */ - // int CDECL lame_set_in_samplerate(lame_global_flags *, int); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int lame_set_in_samplerate(IntPtr context, int value); - // int CDECL lame_get_in_samplerate(const lame_global_flags *); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int lame_get_in_samplerate(IntPtr context); - - /* number of channels in input stream. default=2 */ - //int CDECL lame_set_num_channels(lame_global_flags *, int); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int lame_set_num_channels(IntPtr context, int value); - //int CDECL lame_get_num_channels(const lame_global_flags *); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int lame_get_num_channels(IntPtr context); - - /* - scale the input by this amount before encoding. default=1 - (not used by decoding routines) - */ - //int CDECL lame_set_scale(lame_global_flags *, float); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int lame_set_scale(IntPtr context, float value); - //float CDECL lame_get_scale(const lame_global_flags *); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern float lame_get_scale(IntPtr context); - - /* - scale the channel 0 (left) input by this amount before encoding. default=1 - (not used by decoding routines) - */ - // int CDECL lame_set_scale_left(lame_global_flags *, float); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int lame_set_scale_left(IntPtr context, float value); - // float CDECL lame_get_scale_left(const lame_global_flags *); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern float lame_get_scale_left(IntPtr context); - - /* - scale the channel 1 (right) input by this amount before encoding. default=1 - (not used by decoding routines) - */ - // int CDECL lame_set_scale_right(lame_global_flags *, float); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int lame_set_scale_right(IntPtr context, float value); - // float CDECL lame_get_scale_right(const lame_global_flags *); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern float lame_get_scale_right(IntPtr context); - - /* - output sample rate in Hz. default = 0, which means LAME picks best value - based on the amount of compression. MPEG only allows: - MPEG1 32, 44.1, 48khz - MPEG2 16, 22.05, 24 - MPEG2.5 8, 11.025, 12 - (not used by decoding routines) - */ - // int CDECL lame_set_out_samplerate(lame_global_flags *, int); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int lame_set_out_samplerate(IntPtr context, int value); - // int CDECL lame_get_out_samplerate(const lame_global_flags *); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int lame_get_out_samplerate(IntPtr context); - - #endregion - - #region General control parameters - - /* 1=cause LAME to collect data for an MP3 frame analyzer. default=0 */ - // int CDECL lame_set_analysis(lame_global_flags *, int); - // int CDECL lame_get_analysis(const lame_global_flags *); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int lame_set_analysis(IntPtr context, [MarshalAs(UnmanagedType.Bool)] bool value); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.Bool)] - internal static extern bool lame_get_analysis(IntPtr context); - - /* - 1 = write a Xing VBR header frame. - default = 1 - this variable must have been added by a Hungarian notation Windows programmer :-) - */ - // int CDECL lame_set_bWriteVbrTag(lame_global_flags *, int); - // int CDECL lame_get_bWriteVbrTag(const lame_global_flags *); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int lame_set_bWriteVbrTag(IntPtr context, [MarshalAs(UnmanagedType.Bool)] int value); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int lame_get_bWriteVbrTag(IntPtr context); - - /* 1=decode only. use lame/mpglib to convert mp3/ogg to wav. default=0 */ - // int CDECL lame_set_decode_only(lame_global_flags *, int); - // int CDECL lame_get_decode_only(const lame_global_flags *); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int lame_set_decode_only(IntPtr context, [MarshalAs(UnmanagedType.Bool)] int value); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int lame_get_decode_only(IntPtr context); - - /* - internal algorithm selection. True quality is determined by the bitrate - but this variable will effect quality by selecting expensive or cheap algorithms. - quality=0..9. 0=best (very slow). 9=worst. - recommended: 2 near-best quality, not too slow - 5 good quality, fast - 7 ok quality, really fast - */ - // int CDECL lame_set_quality(lame_global_flags *, int); - // int CDECL lame_get_quality(const lame_global_flags *); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int lame_set_quality(IntPtr context, int value); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int lame_get_quality(IntPtr context); - - /* - mode = 0,1,2,3 = stereo, jstereo, dual channel (not supported), mono - default: lame picks based on compression ration and input channels - */ - // int CDECL lame_set_mode(lame_global_flags *, MPEG_mode); - // MPEG_mode CDECL lame_get_mode(const lame_global_flags *); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int lame_set_mode(IntPtr context, MPEGMode value); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern MPEGMode lame_get_mode(IntPtr context); - - /* - force_ms. Force M/S for all frames. For testing only. - default = 0 (disabled) - */ - // int CDECL lame_set_force_ms(lame_global_flags *, int); - // int CDECL lame_get_force_ms(const lame_global_flags *); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int lame_set_force_ms(IntPtr context, [MarshalAs(UnmanagedType.Bool)] bool value); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.Bool)] - internal static extern bool lame_get_force_ms(IntPtr context); - - /* use free_format? default = 0 (disabled) */ - // int CDECL lame_set_free_format(lame_global_flags *, int); - // int CDECL lame_get_free_format(const lame_global_flags *); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int lame_set_free_format(IntPtr context, [MarshalAs(UnmanagedType.Bool)] bool value); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.Bool)] - internal static extern bool lame_get_free_format(IntPtr context); - - /* perform ReplayGain analysis? default = 0 (disabled) */ - // int CDECL lame_set_findReplayGain(lame_global_flags *, int); - // int CDECL lame_get_findReplayGain(const lame_global_flags *); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int lame_set_findReplayGain(IntPtr context, [In, MarshalAs(UnmanagedType.Bool)] bool value); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.Bool)] - internal static extern bool lame_get_findReplayGain(IntPtr context); - - /* decode on the fly. Search for the peak sample. If the ReplayGain - * analysis is enabled then perform the analysis on the decoded data - * stream. default = 0 (disabled) - * NOTE: if this option is set the build-in decoder should not be used */ - // int CDECL lame_set_decode_on_the_fly(lame_global_flags *, int); - // int CDECL lame_get_decode_on_the_fly(const lame_global_flags *); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int lame_set_decode_on_the_fly(IntPtr context, [In, MarshalAs(UnmanagedType.Bool)] bool value); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.Bool)] - internal static extern bool lame_get_decode_on_the_fly(IntPtr context); - - /* counters for gapless encoding */ - // int CDECL lame_set_nogap_total(lame_global_flags*, int); - // int CDECL lame_get_nogap_total(const lame_global_flags*); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int lame_set_nogap_total(IntPtr context, int value); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int lame_get_nogap_total(IntPtr context); - - // int CDECL lame_set_nogap_currentindex(lame_global_flags* , int); - // int CDECL lame_get_nogap_currentindex(const lame_global_flags*); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int lame_set_nogap_currentindex(IntPtr context, int value); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int lame_get_nogap_currentindex(IntPtr context); - - /* set one of brate compression ratio. default is compression ratio of 11. */ - // int CDECL lame_set_brate(lame_global_flags *, int); - // int CDECL lame_get_brate(const lame_global_flags *); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int lame_set_brate(IntPtr context, int value); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int lame_get_brate(IntPtr context); - - // int CDECL lame_set_compression_ratio(lame_global_flags *, float); - // float CDECL lame_get_compression_ratio(const lame_global_flags *); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int lame_set_compression_ratio(IntPtr context, float value); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern float lame_get_compression_ratio(IntPtr context); - - //int CDECL lame_set_preset( lame_global_flags* gfp, int ); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int lame_set_preset(IntPtr context, LAMEPreset value); - - //int CDECL lame_set_asm_optimizations( lame_global_flags* gfp, int, int ); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int lame_set_asm_optimizations(IntPtr context, ASMOptimizations opt, [MarshalAs(UnmanagedType.Bool)] bool val); - - #endregion - - #region Frame parameters - /* mark as copyright. default=0 */ - // int CDECL lame_set_copyright(lame_global_flags *, int); - // int CDECL lame_get_copyright(const lame_global_flags *); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int lame_set_copyright(IntPtr context, [MarshalAs(UnmanagedType.Bool)] bool value); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.Bool)] - internal static extern bool lame_get_copyright(IntPtr context); - - /* mark as original. default=1 */ - // int CDECL lame_set_original(lame_global_flags *, int); - // int CDECL lame_get_original(const lame_global_flags *); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int lame_set_original(IntPtr context, [MarshalAs(UnmanagedType.Bool)] bool value); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.Bool)] - internal static extern bool lame_get_original(IntPtr context); - - /* error_protection. Use 2 bytes from each frame for CRC checksum. default=0 */ - // int CDECL lame_set_error_protection(lame_global_flags *, int); - // int CDECL lame_get_error_protection(const lame_global_flags *); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int lame_set_error_protection(IntPtr context, [MarshalAs(UnmanagedType.Bool)] bool value); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.Bool)] - internal static extern bool lame_get_error_protection(IntPtr context); - - /* MP3 'private extension' bit Meaningless. default=0 */ - // int CDECL lame_set_extension(lame_global_flags *, int); - // int CDECL lame_get_extension(const lame_global_flags *); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int lame_set_extension(IntPtr context, [MarshalAs(UnmanagedType.Bool)] bool value); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.Bool)] - internal static extern bool lame_get_extension(IntPtr context); - - /* enforce strict ISO compliance. default=0 */ - // int CDECL lame_set_strict_ISO(lame_global_flags *, int); - // int CDECL lame_get_strict_ISO(const lame_global_flags *); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int lame_set_strict_ISO(IntPtr context, [MarshalAs(UnmanagedType.Bool)] bool value); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.Bool)] - internal static extern bool lame_get_strict_ISO(IntPtr context); - - #endregion - - #region Quantization/Noise Shaping - /* disable the bit reservoir. For testing only. default=0 */ - // int CDECL lame_set_disable_reservoir(lame_global_flags *, int); - // int CDECL lame_get_disable_reservoir(const lame_global_flags *); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int lame_set_disable_reservoir(IntPtr context, [MarshalAs(UnmanagedType.Bool)] bool value); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.Bool)] - internal static extern bool lame_get_disable_reservoir(IntPtr context); - - /* select a different "best quantization" function. default=0 */ - // int CDECL lame_set_quant_comp(lame_global_flags *, int); - // int CDECL lame_get_quant_comp(const lame_global_flags *); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int lame_set_quant_comp(IntPtr context, int value); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int lame_get_quant_comp(IntPtr context); - - // int CDECL lame_set_quant_comp_short(lame_global_flags *, int); - // int CDECL lame_get_quant_comp_short(const lame_global_flags *); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int lame_set_quant_comp_short(IntPtr context, int value); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int lame_get_quant_comp_short(IntPtr context); - - // int CDECL lame_set_experimentalX(lame_global_flags *, int); /* compatibility*/ - // int CDECL lame_get_experimentalX(const lame_global_flags *); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int lame_set_experimentalX(IntPtr context, int value); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int lame_get_experimentalX(IntPtr context); - - /* another experimental option. for testing only */ - // int CDECL lame_set_experimentalY(lame_global_flags *, int); - // int CDECL lame_get_experimentalY(const lame_global_flags *); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int lame_set_experimentalY(IntPtr context, int value); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int lame_get_experimentalY(IntPtr context); - - /* another experimental option. for testing only */ - // int CDECL lame_set_experimentalZ(lame_global_flags *, int); - // int CDECL lame_get_experimentalZ(const lame_global_flags *); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int lame_set_experimentalZ(IntPtr context, int value); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int lame_get_experimentalZ(IntPtr context); - - /* Naoki's psycho acoustic model. default=0 */ - // int CDECL lame_set_exp_nspsytune(lame_global_flags *, int); - // int CDECL lame_get_exp_nspsytune(const lame_global_flags *); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int lame_set_exp_nspsytune(IntPtr context, int value); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int lame_get_exp_nspsytune(IntPtr context); - - // void CDECL lame_set_msfix(lame_global_flags *, double); - // float CDECL lame_get_msfix(const lame_global_flags *); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int lame_set_msfix(IntPtr context, int value); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int lame_get_msfix(IntPtr context); - - #endregion - - #region VBR control - /* Types of VBR. default = vbr_off = CBR */ - // int CDECL lame_set_VBR(lame_global_flags *, vbr_mode); - // vbr_mode CDECL lame_get_VBR(const lame_global_flags *); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int lame_set_VBR(IntPtr context, VBRMode value); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern VBRMode lame_get_VBR(IntPtr context); - - /* VBR quality level. 0=highest 9=lowest */ - // int CDECL lame_set_VBR_q(lame_global_flags *, int); - // int CDECL lame_get_VBR_q(const lame_global_flags *); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int lame_set_VBR_q(IntPtr context, int value); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int lame_get_VBR_q(IntPtr context); - - /* VBR quality level. 0=highest 9=lowest, Range [0,...,10[ */ - // int CDECL lame_set_VBR_quality(lame_global_flags *, float); - // float CDECL lame_get_VBR_quality(const lame_global_flags *); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int lame_set_VBR_quality(IntPtr context, float value); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern float lame_get_VBR_quality(IntPtr context); - - /* Ignored except for VBR=vbr_abr (ABR mode) */ - // int CDECL lame_set_VBR_mean_bitrate_kbps(lame_global_flags *, int); - // int CDECL lame_get_VBR_mean_bitrate_kbps(const lame_global_flags *); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int lame_set_VBR_mean_bitrate_kbps(IntPtr context, int value); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int lame_get_VBR_mean_bitrate_kbps(IntPtr context); - - // int CDECL lame_set_VBR_min_bitrate_kbps(lame_global_flags *, int); - // int CDECL lame_get_VBR_min_bitrate_kbps(const lame_global_flags *); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int lame_set_VBR_min_bitrate_kbps(IntPtr context, int value); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int lame_get_VBR_min_bitrate_kbps(IntPtr context); - - // int CDECL lame_set_VBR_max_bitrate_kbps(lame_global_flags *, int); - // int CDECL lame_get_VBR_max_bitrate_kbps(const lame_global_flags *); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int lame_set_VBR_max_bitrate_kbps(IntPtr context, int value); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int lame_get_VBR_max_bitrate_kbps(IntPtr context); - - /* - 1=strictly enforce VBR_min_bitrate. Normally it will be violated for - analog silence - */ - // int CDECL lame_set_VBR_hard_min(lame_global_flags *, int); - // int CDECL lame_get_VBR_hard_min(const lame_global_flags *); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int lame_set_VBR_hard_min(IntPtr context, [MarshalAs(UnmanagedType.Bool)] bool value); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.Bool)] - internal static extern bool lame_get_VBR_hard_min(IntPtr context); - - #endregion - - #region Filtering control - /* freq in Hz to apply lowpass. Default = 0 = lame chooses. -1 = disabled */ - // int CDECL lame_set_lowpassfreq(lame_global_flags *, int); - // int CDECL lame_get_lowpassfreq(const lame_global_flags *); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int lame_set_lowpassfreq(IntPtr context, int value); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int lame_get_lowpassfreq(IntPtr context); - - /* width of transition band, in Hz. Default = one polyphase filter band */ - // int CDECL lame_set_lowpasswidth(lame_global_flags *, int); - // int CDECL lame_get_lowpasswidth(const lame_global_flags *); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int lame_set_lowpasswidth(IntPtr context, int value); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int lame_get_lowpasswidth(IntPtr context); - - /* freq in Hz to apply highpass. Default = 0 = lame chooses. -1 = disabled */ - // int CDECL lame_set_highpassfreq(lame_global_flags *, int); - // int CDECL lame_get_highpassfreq(const lame_global_flags *); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int lame_set_highpassfreq(IntPtr context, int value); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int lame_get_highpassfreq(IntPtr context); - - /* width of transition band, in Hz. Default = one polyphase filter band */ - // int CDECL lame_set_highpasswidth(lame_global_flags *, int); - // int CDECL lame_get_highpasswidth(const lame_global_flags *); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int lame_set_highpasswidth(IntPtr context, int value); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int lame_get_highpasswidth(IntPtr context); - - #endregion - - #region Psychoacoustics and other advanced settings - /* only use ATH for masking */ - // int CDECL lame_set_ATHonly(lame_global_flags *, int); - // int CDECL lame_get_ATHonly(const lame_global_flags *); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int lame_set_ATHonly(IntPtr context, [MarshalAs(UnmanagedType.Bool)] bool value); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.Bool)] - internal static extern bool lame_get_ATHonly(IntPtr context); - - /* only use ATH for short blocks */ - // int CDECL lame_set_ATHshort(lame_global_flags *, int); - // int CDECL lame_get_ATHshort(const lame_global_flags *); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int lame_set_ATHshort(IntPtr context, [MarshalAs(UnmanagedType.Bool)] bool value); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.Bool)] - internal static extern bool lame_get_ATHshort(IntPtr context); - - /* disable ATH */ - // int CDECL lame_set_noATH(lame_global_flags *, int); - // int CDECL lame_get_noATH(const lame_global_flags *); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int lame_set_noATH(IntPtr context, [MarshalAs(UnmanagedType.Bool)] bool value); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.Bool)] - internal static extern bool lame_get_noATH(IntPtr context); - - /* select ATH formula */ - // int CDECL lame_set_ATHtype(lame_global_flags *, int); - // int CDECL lame_get_ATHtype(const lame_global_flags *); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int lame_set_ATHtype(IntPtr context, int value); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int lame_get_ATHtype(IntPtr context); - - /* lower ATH by this many db */ - // int CDECL lame_set_ATHlower(lame_global_flags *, float); - // float CDECL lame_get_ATHlower(const lame_global_flags *); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int lame_set_ATHlower(IntPtr context, float value); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern float lame_get_ATHlower(IntPtr context); - - /* select ATH adaptive adjustment type */ - // int CDECL lame_set_athaa_type( lame_global_flags *, int); - // int CDECL lame_get_athaa_type( const lame_global_flags *); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int lame_set_athaa_type(IntPtr context, int value); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int lame_get_athaa_type(IntPtr context); - - /* adjust (in dB) the point below which adaptive ATH level adjustment occurs */ - // int CDECL lame_set_athaa_sensitivity( lame_global_flags *, float); - // float CDECL lame_get_athaa_sensitivity( const lame_global_flags* ); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int lame_set_athaa_sensitivity(IntPtr context, float value); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern float lame_get_athaa_sensitivity(IntPtr context); - - /* - allow blocktypes to differ between channels? - default: 0 for jstereo, 1 for stereo - */ - // int CDECL lame_set_allow_diff_short(lame_global_flags *, int); - // int CDECL lame_get_allow_diff_short(const lame_global_flags *); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int lame_set_allow_diff_short(IntPtr context, [MarshalAs(UnmanagedType.Bool)] bool value); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.Bool)] - internal static extern bool lame_get_allow_diff_short(IntPtr context); - - /* use temporal masking effect (default = 1) */ - // int CDECL lame_set_useTemporal(lame_global_flags *, int); - // int CDECL lame_get_useTemporal(const lame_global_flags *); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int lame_set_useTemporal(IntPtr context, [MarshalAs(UnmanagedType.Bool)] bool value); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.Bool)] - internal static extern bool lame_get_useTemporal(IntPtr context); - - /* use temporal masking effect (default = 1) */ - // int CDECL lame_set_interChRatio(lame_global_flags *, float); - // float CDECL lame_get_interChRatio(const lame_global_flags *); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int lame_set_interChRatio(IntPtr context, float value); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern float lame_get_interChRatio(IntPtr context); - - /* disable short blocks */ - // int CDECL lame_set_no_short_blocks(lame_global_flags *, int); - // int CDECL lame_get_no_short_blocks(const lame_global_flags *); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int lame_set_no_short_blocks(IntPtr context, [MarshalAs(UnmanagedType.Bool)] bool value); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.Bool)] - internal static extern bool lame_get_no_short_blocks(IntPtr context); - - /* force short blocks */ - // int CDECL lame_set_force_short_blocks(lame_global_flags *, int); - // int CDECL lame_get_force_short_blocks(const lame_global_flags *); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int lame_set_force_short_blocks(IntPtr context, [MarshalAs(UnmanagedType.Bool)] bool value); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.Bool)] - internal static extern bool lame_get_force_short_blocks(IntPtr context); - - /* Input PCM is emphased PCM (for instance from one of the rarely - emphased CDs), it is STRONGLY not recommended to use this, because - psycho does not take it into account, and last but not least many decoders - ignore these bits */ - // int CDECL lame_set_emphasis(lame_global_flags *, int); - // int CDECL lame_get_emphasis(const lame_global_flags *); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int lame_set_emphasis(IntPtr context, int value); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int lame_get_emphasis(IntPtr context); - #endregion - - #region Internal state variables, read only - /* version 0=MPEG-2 1=MPEG-1 (2=MPEG-2.5) */ - // int CDECL lame_get_version(const lame_global_flags *); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern MPEGVersion lame_get_version(IntPtr context); - - /* encoder delay */ - // int CDECL lame_get_encoder_delay(const lame_global_flags *); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int lame_get_encoder_delay(IntPtr context); - - /* - padding appended to the input to make sure decoder can fully decode - all input. Note that this value can only be calculated during the - call to lame_encoder_flush(). Before lame_encoder_flush() has - been called, the value of encoder_padding = 0. - */ - // int CDECL lame_get_encoder_padding(const lame_global_flags *); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int lame_get_encoder_padding(IntPtr context); - - /* size of MPEG frame */ - // int CDECL lame_get_framesize(const lame_global_flags *); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int lame_get_framesize(IntPtr context); - - /* number of PCM samples buffered, but not yet encoded to mp3 data. */ - // int CDECL lame_get_mf_samples_to_encode( const lame_global_flags* gfp ); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int lame_get_mf_samples_to_encode(IntPtr context); - - /* - size (bytes) of mp3 data buffered, but not yet encoded. - this is the number of bytes which would be output by a call to - lame_encode_flush_nogap. NOTE: lame_encode_flush() will return - more bytes than this because it will encode the reamining buffered - PCM samples before flushing the mp3 buffers. - */ - // int CDECL lame_get_size_mp3buffer( const lame_global_flags* gfp ); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int lame_get_size_mp3buffer(IntPtr context); - - /* number of frames encoded so far */ - // int CDECL lame_get_frameNum(const lame_global_flags *); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int lame_get_frameNum(IntPtr context); - - /* - lame's estimate of the total number of frames to be encoded - only valid if calling program set num_samples - */ - // int CDECL lame_get_totalframes(const lame_global_flags *); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int lame_get_totalframes(IntPtr context); - - /* RadioGain value. Multiplied by 10 and rounded to the nearest. */ - // int CDECL lame_get_RadioGain(const lame_global_flags *); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int lame_get_RadioGain(IntPtr context); - - /* AudiophileGain value. Multipled by 10 and rounded to the nearest. */ - // int CDECL lame_get_AudiophileGain(const lame_global_flags *); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int lame_get_AudiophileGain(IntPtr context); - - /* the peak sample */ - // float CDECL lame_get_PeakSample(const lame_global_flags *); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern float lame_get_PeakSample(IntPtr context); - - /* Gain change required for preventing clipping. The value is correct only if - peak sample searching was enabled. If negative then the waveform - already does not clip. The value is multiplied by 10 and rounded up. */ - // int CDECL lame_get_noclipGainChange(const lame_global_flags *); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int lame_get_noclipGainChange(IntPtr context); - - /* user-specified scale factor required for preventing clipping. Value is - correct only if peak sample searching was enabled and no user-specified - scaling was performed. If negative then either the waveform already does - not clip or the value cannot be determined */ - // float CDECL lame_get_noclipScale(const lame_global_flags *); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern float lame_get_noclipScale(IntPtr context); - #endregion - - #region Processing - /* - * REQUIRED: - * sets more internal configuration based on data provided above. - * returns -1 if something failed. - */ - // int CDECL lame_init_params(lame_global_flags *); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int lame_init_params(IntPtr context); - - /* - * input pcm data, output (maybe) mp3 frames. - * This routine handles all buffering, resampling and filtering for you. - * - * return code number of bytes output in mp3buf. Can be 0 - * -1: mp3buf was too small - * -2: malloc() problem - * -3: lame_init_params() not called - * -4: psycho acoustic problems - * - * The required mp3buf_size can be computed from num_samples, - * samplerate and encoding rate, but here is a worst case estimate: - * - * mp3buf_size in bytes = 1.25*num_samples + 7200 - * - * I think a tighter bound could be: (mt, March 2000) - * MPEG1: - * num_samples*(bitrate/8)/samplerate + 4*1152*(bitrate/8)/samplerate + 512 - * MPEG2: - * num_samples*(bitrate/8)/samplerate + 4*576*(bitrate/8)/samplerate + 256 - * - * but test first if you use that! - * - * set mp3buf_size = 0 and LAME will not check if mp3buf_size is - * large enough. - * - * NOTE: - * if gfp->num_channels=2, but gfp->mode = 3 (mono), the L & R channels - * will be averaged into the L channel before encoding only the L channel - * This will overwrite the data in buffer_l[] and buffer_r[]. - * - */ - // int CDECL lame_encode_buffer ( - // lame_global_flags* gfp, /* global context handle */ - // const short int buffer_l [], /* PCM data for left channel */ - // const short int buffer_r [], /* PCM data for right channel */ - // const int nsamples, /* number of samples per channel */ - // unsigned char* mp3buf, /* pointer to encoded MP3 stream */ - // const int mp3buf_size ); /* number of valid octets in this stream */ - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int lame_encode_buffer(IntPtr context, - [In]//[MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.I2)] - short[] buffer_l, - [In]//[MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.I2)] - short[] buffer_r, - int nSamples, - [In, Out]//[MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.I1)] - byte[] mp3buf, - int mp3buf_size - ); - - /* - * as above, but input has L & R channel data interleaved. - * NOTE: - * num_samples = number of samples in the L (or R) - * channel, not the total number of samples in pcm[] - */ - // int CDECL lame_encode_buffer_interleaved( - // lame_global_flags* gfp, /* global context handlei */ - // short int pcm[], /* PCM data for left and right - // channel, interleaved */ - // int num_samples, /* number of samples per channel, _not_ number of samples in pcm[] */ - // unsigned char* mp3buf, /* pointer to encoded MP3 stream */ - // int mp3buf_size ); /* number of valid octets in this stream */ - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int lame_encode_buffer_interleaved(IntPtr context, - [In]//[MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.I2)] - short[] pcm, - int num_samples, - [In, Out]//[MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.I1)] - byte[] mp3buf, - int mp3buf_size - ); - - /* as lame_encode_buffer, but for 'float's. - * !! NOTE: !! data must still be scaled to be in the same range as - * short int, +/- 32768 - */ - // int CDECL lame_encode_buffer_float( - // lame_global_flags* gfp, /* global context handle */ - // const float pcm_l [], /* PCM data for left channel */ - // const float pcm_r [], /* PCM data for right channel */ - // const int nsamples, /* number of samples per channel */ - // unsigned char* mp3buf, /* pointer to encoded MP3 stream */ - // const int mp3buf_size ); /* number of valid octets in this stream */ - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int lame_encode_buffer_float(IntPtr context, - [In]//[MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.R4)] - float[] pcm_l, - [In]//[MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.R4)] - float[] pcm_r, - int nSamples, - [In, Out]//[MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.I1)] - byte[] mp3buf, - int mp3buf_size - ); - - /* as lame_encode_buffer, but for 'float's. - * !! NOTE: !! data must be scaled to +/- 1 full scale - */ - // int CDECL lame_encode_buffer_ieee_float( - // lame_t gfp, - // const float pcm_l [], /* PCM data for left channel */ - // const float pcm_r [], /* PCM data for right channel */ - // const int nsamples, - // unsigned char * mp3buf, - // const int mp3buf_size); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int lame_encode_buffer_ieee_float(IntPtr context, - [In]//[MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.R4)] - float[] pcm_l, - [In]//[MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.R4)] - float[] pcm_r, - int nSamples, - [In, Out]//[MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.I1)] - byte[] mp3buf, - int mp3buf_size - ); - - // int CDECL lame_encode_buffer_interleaved_ieee_float( - // lame_t gfp, - // const float pcm[], /* PCM data for left and right channel, interleaved */ - // const int nsamples, - // unsigned char * mp3buf, - // const int mp3buf_size); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int lame_encode_buffer_interleaved_ieee_float(IntPtr context, - [In]//[MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.R4)] - - float[] pcm, - int nSamples, - [In, Out]//[MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.I1)] - byte[] mp3buf, - int mp3buf_size - ); - - /* as lame_encode_buffer, but for 'double's. - * !! NOTE: !! data must be scaled to +/- 1 full scale - */ - // int CDECL lame_encode_buffer_ieee_double( - // lame_t gfp, - // const double pcm_l [], /* PCM data for left channel */ - // const double pcm_r [], /* PCM data for right channel */ - // const int nsamples, - // unsigned char * mp3buf, - // const int mp3buf_size); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int lame_encode_buffer_ieee_double(IntPtr context, - [In]//[MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.R8)] - double[] pcm_l, - [In]//[MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.R8)] - double[] pcm_r, - int nSamples, - [In, Out]//[MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.I1)] - byte[] mp3buf, - int mp3buf_size - ); - - // int CDECL lame_encode_buffer_interleaved_ieee_double( - // lame_t gfp, - // const double pcm[], /* PCM data for left and right channel, interleaved */ - // const int nsamples, - // unsigned char * mp3buf, - // const int mp3buf_size); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int lame_encode_buffer_interleaved_ieee_double(IntPtr context, - [In]//[MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.R8)] - double[] pcm, - int nSamples, - [In, Out]//[MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.I1)] - byte[] mp3buf, - int mp3buf_size - ); - - /* as lame_encode_buffer, but for long's - * !! NOTE: !! data must still be scaled to be in the same range as - * short int, +/- 32768 - * - * This scaling was a mistake (doesn't allow one to exploit full - * precision of type 'long'. Use lame_encode_buffer_long2() instead. - * - */ - // int CDECL lame_encode_buffer_long( - // lame_global_flags* gfp, /* global context handle */ - // const long buffer_l [], /* PCM data for left channel */ - // const long buffer_r [], /* PCM data for right channel */ - // const int nsamples, /* number of samples per channel */ - // unsigned char* mp3buf, /* pointer to encoded MP3 stream */ - // const int mp3buf_size ); /* number of valid octets in this stream */ - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int lame_encode_buffer_long(IntPtr context, - [In]//[MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.I8)] - long[] buffer_l, - [In]//[MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.I8)] - long[] buffer_r, - int nSamples, - [In, Out]//[MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.I1)] - byte[] mp3buf, - int mp3buf_size - ); - - /* Same as lame_encode_buffer_long(), but with correct scaling. - * !! NOTE: !! data must still be scaled to be in the same range as - * type 'long'. Data should be in the range: +/- 2^(8*size(long)-1) - * - */ - // int CDECL lame_encode_buffer_long2( - // lame_global_flags* gfp, /* global context handle */ - // const long buffer_l [], /* PCM data for left channel */ - // const long buffer_r [], /* PCM data for right channel */ - // const int nsamples, /* number of samples per channel */ - // unsigned char* mp3buf, /* pointer to encoded MP3 stream */ - // const int mp3buf_size ); /* number of valid octets in this stream */ - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int lame_encode_bufer_long2(IntPtr context, - [In]//[MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.I8)] - long[] buffer_l, - [In]//[MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.I8)] - long[] buffer_r, - int nSamples, - [In, Out]//[MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.I1)] - byte[] mp3buf, - int mp3buf_size - ); - - /* as lame_encode_buffer, but for int's - * !! NOTE: !! input should be scaled to the maximum range of 'int' - * If int is 4 bytes, then the values should range from - * +/- 2147483648. - * - * This routine does not (and cannot, without loosing precision) use - * the same scaling as the rest of the lame_encode_buffer() routines. - * - */ - // int CDECL lame_encode_buffer_int( - // lame_global_flags* gfp, /* global context handle */ - // const int buffer_l [], /* PCM data for left channel */ - // const int buffer_r [], /* PCM data for right channel */ - // const int nsamples, /* number of samples per channel */ - // unsigned char* mp3buf, /* pointer to encoded MP3 stream */ - // const int mp3buf_size ); /* number of valid octets in this stream */ - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int lame_encode_buffer_int(IntPtr context, - [In]//[MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.I4)] - int[] buffer_l, - [In]//[MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.I4)] - int[] buffer_r, - int nSamples, - [In, Out]//[MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.I1)] - byte[] mp3buf, - int mp3buf_size - ); - - /* - * REQUIRED: - * lame_encode_flush will flush the intenal PCM buffers, padding with - * 0's to make sure the final frame is complete, and then flush - * the internal MP3 buffers, and thus may return a - * final few mp3 frames. 'mp3buf' should be at least 7200 bytes long - * to hold all possible emitted data. - * - * will also write id3v1 tags (if any) into the bitstream - * - * return code = number of bytes output to mp3buf. Can be 0 - */ - // int CDECL lame_encode_flush( - // lame_global_flags * gfp, /* global context handle */ - // unsigned char* mp3buf, /* pointer to encoded MP3 stream */ - // int size); /* number of valid octets in this stream */ - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int lame_encode_flush(IntPtr context, - [In, Out]//[MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.I1)] - byte[] mp3buf, - int mp3buf_size - ); - - /* - * OPTIONAL: - * lame_encode_flush_nogap will flush the internal mp3 buffers and pad - * the last frame with ancillary data so it is a complete mp3 frame. - * - * 'mp3buf' should be at least 7200 bytes long - * to hold all possible emitted data. - * - * After a call to this routine, the outputed mp3 data is complete, but - * you may continue to encode new PCM samples and write future mp3 data - * to a different file. The two mp3 files will play back with no gaps - * if they are concatenated together. - * - * This routine will NOT write id3v1 tags into the bitstream. - * - * return code = number of bytes output to mp3buf. Can be 0 - */ - // int CDECL lame_encode_flush_nogap( - // lame_global_flags * gfp, /* global context handle */ - // unsigned char* mp3buf, /* pointer to encoded MP3 stream */ - // int size); /* number of valid octets in this stream */ - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int lame_encode_flush_nogap(IntPtr context, - [In, Out]//[MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.I1)] - byte[] mp3buf, - int mp3buf_size - ); - - - /* - * OPTIONAL: - * Normally, this is called by lame_init_params(). It writes id3v2 and - * Xing headers into the front of the bitstream, and sets frame counters - * and bitrate histogram data to 0. You can also call this after - * lame_encode_flush_nogap(). - */ - //int CDECL lame_init_bitstream( - // lame_global_flags * gfp); /* global context handle */ - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int lame_init_bitstream(IntPtr context); - - #endregion - - #region Reporting callbacks - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int lame_set_errorf(IntPtr context, delReportFunction fn); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int lame_set_debugf(IntPtr context, delReportFunction fn); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int lame_set_msgf(IntPtr context, delReportFunction fn); - - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern void lame_print_config(IntPtr context); - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern void lame_print_internals(IntPtr context); - - - #endregion - - #region 'printf' support for reporting functions - [DllImport("msvcrt.dll", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, ThrowOnUnmappableChar = true, BestFitMapping = false)] - internal static extern int _vsnprintf_s( - [In, Out, MarshalAs(UnmanagedType.LPStr)] StringBuilder str, - int sizeOfBuffer, - int count, - [In, MarshalAs(UnmanagedType.LPStr)] String format, - [In] IntPtr va_args); - - internal static string printf(string format, IntPtr va_args) - { - StringBuilder sb = new StringBuilder(4096); - //int res = NativeMethods._vsnprintf_s(sb, sb.Capacity, sb.Capacity - 2, format.Replace("\t", "\xFF"), va_args); - return sb.ToString().Replace("\xFF", "\t"); - } - #endregion - - - #region Decoding - /// required call to initialize decoder - /// Decoder context handle - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern IntPtr hip_decode_init(); - - /// cleanup call to exit decoder - /// Decoder context - /// - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int hip_decode_exit(IntPtr decContext); - - /// Hip reporting function: error - /// Decoder context - /// Reporting function - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern void hip_set_errorf(IntPtr decContext, delReportFunction f); - - /// Hip reporting function: debug - /// Decoder context - /// Reporting function - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern void hip_set_debugf(IntPtr decContext, delReportFunction f); - - /// Hip reporting function: message - /// Decoder context - /// Reporting function - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern void hip_set_msgf(IntPtr decContext, delReportFunction f); - - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int hip_decode(IntPtr decContext, [In] byte[] mp3buf, int len, [In, Out] short[] pcm_l, [In, Out] short[] pcm_r); - - // Same as hip_decode, and also returns mp3 header data - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int hip_decode_headers(IntPtr decContext, [In] byte[] mp3buf, int len, [In, Out] short[] pcm_l, [In, Out] short[] pcm_r, [Out] mp3data mp3data); - - // Same as hip_decode, but returns at most 1 frame - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int hip_decode1(IntPtr decContext, [In] byte[] mp3buf, int len, [In, Out] short[] pcm_l, [In, Out] short[] pcm_r); - - // Same as hip_decode1, but returns at most 1 frame and mp3 header data - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int hip_decode1_headers(IntPtr decContext, [In] byte[] mp3buf, int len, [In, Out] short[] pcm_l, [In, Out] short[] pcm_r, [Out] mp3data mp3data); - - // Same as hip_decode1_headers but also returns enc_delay and enc_padding - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int hip_decode(IntPtr decContext, [In] byte[] mp3buf, int len, [In, Out] short[] pcm_l, [In, Out] short[] pcm_r, [Out] mp3data mp3data, out int enc_delay, out int enc_padding); - - #endregion - - #region ID3 tag support - // utility to obtain alphabetically sorted list of genre names with numbers - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern void id3tag_genre_list(delGenreCallback handler, IntPtr cookie); - - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern void id3tag_init(IntPtr context); - - // force addition of ID3v2 tag - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern void id3tag_add_v2(IntPtr context); - - // add only a v1 tag - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern void id3tag_v1_only(IntPtr context); - - // add only a v2 tag - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern void id3tag_v2_only(IntPtr context); - - // pad version 1 tag with spaces instead of nulls - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern void id3tag_space_v1(IntPtr context); - - // pad version 2 tag with extra 128 bytes - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern void id3tag_pad_v2(IntPtr context); - - // pad version 2 tag with extra n bytes - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern void id3tag_set_pad(IntPtr context, int n); - - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern void id3tag_set_title(IntPtr context, string title); - - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern void id3tag_set_artist(IntPtr context, string artist); - - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern void id3tag_set_album(IntPtr context, string album); - - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern void id3tag_set_year(IntPtr context, string year); - - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern void id3tag_set_comment(IntPtr context, string comment); - - // return -1 result if track number is out of ID3v1 range and ignored for ID3v1 - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.Bool)] - internal static extern bool id3tag_set_track(IntPtr context, string track); - - // return non-zero result if genre name or number is invalid - // result 0: OK - // result -1: genre number out of range - // result -2: no valid ID3v1 genre name, mapped to ID3v1 'Other' - // but taken as-is for ID3v2 genre tag - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int id3tag_set_genre(IntPtr context, string genre); - - // return non-zero result if field name is invalid - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.Bool)] - internal static extern bool id3tag_set_fieldvalue(IntPtr context, string value); - - // return non-zero result if image type is invalid - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.Bool)] - internal static extern bool id3tag_set_albumart(IntPtr context, [In]byte[] image, int size); - - // lame_get_id3v1_tag copies ID3v1 tag into buffer. - // Function returns number of bytes copied into buffer, or number - // of bytes required if 'size' is too small. - // Function fails, if returned value is larger than 'size' - // NOTE: - // This function does nothing, if user/LAME disabled ID3v1 tag - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int id3tag_get_id3v1_tag(IntPtr context, [In, Out]byte[] buffer, int size); - - // lame_get_id3v2_tag copies ID3v2 tag into buffer. - // Function returns number of bytes copied into buffer, or number - // of bytes required if 'size' is too small. - // Function fails, if returned value is larger than 'size' - // NOTE: - // This function does nothing, if user/LAME disabled ID3v2 tag - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern int id3tag_get_id3v2_tag(IntPtr context, [In, Out]byte[] buffer, int size); - - // normally lame_init_param writes ID3v2 tags into the audio stream - // Call lame_set_write_id3tag_automatic(gfp, 0) before lame_init_param - // to turn off this behaviour and get ID3v2 tag with above function - // write it yourself into your file. - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - internal static extern void id3tag_set_write_id3tag_automatic(IntPtr context, bool value); - - [DllImport(libname, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.Bool)] - internal static extern bool id3tag_get_write_id3tag_automatic(IntPtr context); - #endregion - } - - /// Print out LAME configuration to standard output, or to registered output function - public void PrintConfig() { NativeMethods.lame_print_config(context); } - /// Print out LAME internals to standard output, or to registered output function - public void PrintInternals() { NativeMethods.lame_print_internals(context); } - - #region Reporting function support - - private ReportFunction rptError = null; - private ReportFunction rptDebug = null; - private ReportFunction rptMsg = null; - - private void error_proxy(string format, IntPtr va_args) - { - string text = NativeMethods.printf(format, va_args); - if (rptError != null) - rptError(text); - } - - private void debug_proxy(string format, IntPtr va_args) - { - string text = NativeMethods.printf(format, va_args); - if (rptDebug != null) - rptDebug(text); - } - - private void msg_proxy(string format, IntPtr va_args) - { - string text = NativeMethods.printf(format, va_args); - if (rptMsg != null) - rptMsg(text); - } - - private void InitReportFunctions() - { - NativeMethods.lame_set_errorf(context, error_proxy); - NativeMethods.lame_set_debugf(context, debug_proxy); - NativeMethods.lame_set_msgf(context, msg_proxy); - } - - /// Set reporting function for error output from LAME library - /// Reporting function - public void SetErrorFunc(ReportFunction fn) - { - rptError = fn; - } - - /// Set reporting function for debug output from LAME library - /// Reporting function - public void SetDebugFunc(ReportFunction fn) - { - rptDebug = fn; - } - - /// Set reporting function for message output from LAME library - /// Reporting function - public void SetMsgFunc(ReportFunction fn) - { - rptMsg = fn; - } - #endregion - - #region ID3 tag support - private static GenreCallback id3GenreCallback = null; - - private static void ID3Genre_proxy(int index, string genre, IntPtr cookie) - { - if (id3GenreCallback != null) - id3GenreCallback(index, genre); - } - -#if false // disabled for now, call ID3GenreList method instead - public void SetID3GenreCallback(GenreCallback fn) - { - id3GenreCallback = fn; - } -#endif - /// Utility to obtain a list of genre names with numbers - /// Dictionary containing genres - public static Dictionary ID3GenreList() - { - Dictionary res = new Dictionary(); - GenreCallback cbsave = id3GenreCallback; - id3GenreCallback = (idx, gen) => res[idx] = gen; - - NativeMethods.id3tag_genre_list(ID3Genre_proxy, IntPtr.Zero); - id3GenreCallback = null; - id3GenreCallback = cbsave; - return res; - } - - /// Initialize ID3 tag on context, clearing any existing ID3 information - public void ID3Init() - { - NativeMethods.id3tag_init(context); - } - - /// force addition of ID3v2 tag - public void ID3AddV2() - { - NativeMethods.id3tag_add_v2(context); - } - - /// add only a version 1 tag - public void ID3V1Only() - { - NativeMethods.id3tag_v1_only(context); - } - - /// add only a version 2 tag - public void ID3V2Only() - { - NativeMethods.id3tag_v2_only(context); - } - - /// pad version 1 tag with spaces instead of nulls - public void ID3SpaceV1() - { - NativeMethods.id3tag_space_v1(context); - } - - /// pad version 2 tag with extra 128 bytes - public void ID3PadV2() - { - NativeMethods.id3tag_pad_v2(context); - } - - /// pad version 2 tag with extra bytes - /// Number of bytes to pad - public void ID3SetPad(int nBytes) - { - NativeMethods.id3tag_set_pad(context, nBytes); - } - - /// Set ID3 title - /// Value to set - public void ID3SetTitle(string title) - { - NativeMethods.id3tag_set_title(context, title); - } - - public void ID3SetArtist(string artist) - { - NativeMethods.id3tag_set_artist(context, artist); - } - - public void ID3SetAlbum(string album) - { - NativeMethods.id3tag_set_album(context, album); - } - - /// Set year - /// Year value to set, as string - public void ID3SetYear(string year) - { - NativeMethods.id3tag_set_year(context, year); - } - - /// Set year - /// Year value to set, as integer - public void ID3SetYear(int year) - { - NativeMethods.id3tag_set_year(context, year.ToString()); - } - - public void ID3SetComment(string comment) - { - NativeMethods.id3tag_set_comment(context, comment); - } - - public bool ID3SetTrack(string track) - { - return !NativeMethods.id3tag_set_track(context, track); - } - - public int ID3SetGenre(string genre) - { - return NativeMethods.id3tag_set_genre(context, genre); - } - - public int ID3SetGenre(int genreIndex) - { - return NativeMethods.id3tag_set_genre(context, genreIndex.ToString()); - } - - public bool ID3SetFieldValue(string value) - { - return !NativeMethods.id3tag_set_fieldvalue(context, value); - } - - /// Set albumart of ID3 tag - /// raw image file data - /// True if successful, else false - /// Supported formats: JPG, PNG, GIF. - /// Max image size: 128KB - public bool ID3SetAlbumArt(byte[] image) - { - bool res = NativeMethods.id3tag_set_albumart(context, image, image.Length); - return !res; - } - - public byte[] ID3GetID3v1Tag() - { - int len = NativeMethods.id3tag_get_id3v1_tag(context, new byte[] { }, 0); - if (len < 1) - return null; - byte[] res = new byte[len]; - int rc = NativeMethods.id3tag_get_id3v1_tag(context, res, len); - if (rc != len) - return null; - return res; - } - - public byte[] ID3GetID3v2Tag() - { - int len = NativeMethods.id3tag_get_id3v2_tag(context, new byte[] { }, 0); - if (len < 1) - return null; - byte[] res = new byte[len]; - int rc = NativeMethods.id3tag_get_id3v2_tag(context, res, len); - if (rc != len) - return null; - return res; - } - - public bool ID3WriteTagAutomatic - { - get { return NativeMethods.id3tag_get_write_id3tag_automatic(context); } - set { NativeMethods.id3tag_set_write_id3tag_automatic(context, value); } - } - #endregion - } -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/Encoder/LibMp3Lame.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/Encoder/LibMp3Lame.cs.meta deleted file mode 100644 index cc10d98..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/Encoder/LibMp3Lame.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 25462b0f0bcf3524ca3c94a387cc19a5 -timeCreated: 1492512880 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/Encoder/Loader.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/Encoder/Loader.cs deleted file mode 100644 index 8db0787..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/Encoder/Loader.cs +++ /dev/null @@ -1,158 +0,0 @@ -#region MIT license -// -// MIT license -// -// Copyright (c) 2013 Corey Murtagh -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// -#endregion -using System; -using System.Diagnostics; -using System.Reflection; -using System.Runtime.InteropServices; -using System.Security; - -namespace NAudio.Lame -{ - /* - internal static class Loader - { - internal static bool Initialized = false; - internal static string LoadedName; - /// - /// / - /// - /// - /// - [DllImport("kernel32", SetLastError = true, CallingConvention = CallingConvention.Winapi)] - public extern static IntPtr LoadLibrary(string libraryName); - - [DllImport("kernel32", SetLastError = true, CallingConvention = CallingConvention.Winapi)] - public extern static IntPtr GetProcAddress(IntPtr hwnd, string procedureName); - - private delegate bool IsWow64ProcessDelegate([In] IntPtr handle, [Out] out bool isWow64Process); - - public static bool IsOS64Bit() - { - if (IntPtr.Size == 8 || (IntPtr.Size == 4 && Is32BitProcessOn64BitProcessor())) - { - return true; - } - else - { - return false; - } - } - - private static IsWow64ProcessDelegate GetIsWow64ProcessDelegate() - { - IntPtr handle = LoadLibrary("kernel32"); - - if (handle != IntPtr.Zero) - { - IntPtr fnPtr = GetProcAddress(handle, "IsWow64Process"); - - if (fnPtr != IntPtr.Zero) - { - return (IsWow64ProcessDelegate)Marshal.GetDelegateForFunctionPointer((IntPtr)fnPtr, typeof(IsWow64ProcessDelegate)); - } - } - - return null; - } - - private static bool Is32BitProcessOn64BitProcessor() - { - IsWow64ProcessDelegate fnDelegate = GetIsWow64ProcessDelegate(); - - if (fnDelegate == null) - { - return false; - } - - bool isWow64; - bool retVal = fnDelegate.Invoke(Process.GetCurrentProcess().Handle, out isWow64); - - if (retVal == false) - { - return false; - } - - return isWow64; - } - //// - private static Assembly LoadLameWrapper(object sender, ResolveEventArgs args) - { - //Console.WriteLine("LoadLameWrapper(): {0}", args.Name); - - var asmName = new AssemblyName(args.Name).Name + ".dll"; - var srcAssembly = typeof(LameMP3FileWriter).Assembly; - - // Search resources for requested assembly - byte[] src = null; - foreach (string nxt in srcAssembly.GetManifestResourceNames()) - { - int p1 = nxt.IndexOf(IsOS64Bit() ? "x64" : "x86"); - int p2 = nxt.IndexOf(asmName); - - if (p1 < 0 || p2 < 0 || p1 >= p2) - continue; - - LoadedName = nxt; - - // Load resource into byte array - using (var strm = srcAssembly.GetManifestResourceStream(nxt)) - { - src = new byte[strm.Length]; - strm.Read(src, 0, (int)strm.Length); - break; - } - } - if (src == null) - return null; - - // Load assembly from byte array - //Console.WriteLine("Loaded {0} bytes from resource", src.Length); - try - { - var res = Assembly.Load(src, null, System.Security.Policy.Evidence.Equals() SecurityContextSource.CurrentAppDomain); - return res; - } - catch //(Exception e) - { - //Console.WriteLine("LoadLameWrapper: Failed to create assembly from buffer."); - //Console.WriteLine("Exception:"); - //Console.WriteLine("{0}", e.Message); - throw; - } - } - - public static void Init() - { - if (!Initialized) - { - // Register assembly resolver - AppDomain.CurrentDomain.AssemblyResolve += LoadLameWrapper; - Initialized = true; - } - } - } - */ -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/Encoder/Loader.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/Encoder/Loader.cs.meta deleted file mode 100644 index 4b5567d..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/Encoder/Loader.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: a8bf5d81788fc044280dc57d5b39fe6b -timeCreated: 1492512880 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/Encoder/MP3FileWriter.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/Encoder/MP3FileWriter.cs deleted file mode 100644 index e75a28e..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/Encoder/MP3FileWriter.cs +++ /dev/null @@ -1,714 +0,0 @@ -#region MIT license -// -// MIT license -// -// Copyright (c) 2013 Corey Murtagh -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// -#endregion -using System; -using System.IO; -using System.Runtime.InteropServices; -using NAudio.Wave; -using LameDLLWrap; -using System.Collections.Generic; - -namespace NAudio.Lame -{ - /// LAME encoding presets - public enum LAMEPreset : int - { - /*values from 8 to 320 should be reserved for abr bitrates*/ - /*for abr I'd suggest to directly use the targeted bitrate as a value*/ - - /// 8-kbit ABR - ABR_8 = 8, - /// 16-kbit ABR - ABR_16 = 16, - /// 32-kbit ABR - ABR_32 = 32, - /// 48-kbit ABR - ABR_48 = 48, - /// 64-kbit ABR - ABR_64 = 64, - /// 96-kbit ABR - ABR_96 = 96, - /// 128-kbit ABR - ABR_128 = 128, - /// 160-kbit ABR - ABR_160 = 160, - /// 256-kbit ABR - ABR_256 = 256, - /// 320-kbit ABR - ABR_320 = 320, - - /*Vx to match Lame and VBR_xx to match FhG*/ - /// VBR Quality 9 - V9 = 410, - /// FhG: VBR Q10 - VBR_10 = 410, - /// VBR Quality 8 - V8 = 420, - /// FhG: VBR Q20 - VBR_20 = 420, - /// VBR Quality 7 - V7 = 430, - /// FhG: VBR Q30 - VBR_30 = 430, - /// VBR Quality 6 - V6 = 440, - /// FhG: VBR Q40 - VBR_40 = 440, - /// VBR Quality 5 - V5 = 450, - /// FhG: VBR Q50 - VBR_50 = 450, - /// VBR Quality 4 - V4 = 460, - /// FhG: VBR Q60 - VBR_60 = 460, - /// VBR Quality 3 - V3 = 470, - /// FhG: VBR Q70 - VBR_70 = 470, - /// VBR Quality 2 - V2 = 480, - /// FhG: VBR Q80 - VBR_80 = 480, - /// VBR Quality 1 - V1 = 490, - /// FhG: VBR Q90 - VBR_90 = 490, - /// VBR Quality 0 - V0 = 500, - /// FhG: VBR Q100 - VBR_100 = 500, - - /*still there for compatibility*/ - /// R3Mix quality - - R3MIX = 1000, - /// Standard Quality - STANDARD = 1001, - /// Extreme Quality - EXTREME = 1002, - /// Insane Quality - INSANE = 1003, - /// Fast Standard Quality - STANDARD_FAST = 1004, - /// Fast Extreme Quality - EXTREME_FAST = 1005, - /// Medium Quality - MEDIUM = 1006, - /// Fast Medium Quality - MEDIUM_FAST = 1007 - } - - /// Delegate for receiving output messages - /// Text to output - /// Output from the LAME library is very limited. At this stage only a few direct calls will result in output. No output is normally generated during encoding. - public delegate void OutputHandler(string text); - - /// Delegate for progress feedback from encoder - /// instance that the progress update is for - /// Total number of bytes passed to encoder - /// Total number of bytes written to output - /// True if encoding process is completed - public delegate void ProgressHandler(object writer, long inputBytes, long outputBytes, bool finished); - - /// MP3 encoding class, uses libmp3lame DLL to encode. - public class LameMP3FileWriter : Stream - { - /// Static initializer, ensures that the correct library is loaded - /* - static LameMP3FileWriter() - { - Loader.Init(); - } - */ - // Ensure that the Loader is initialized correctly - //static bool init_loader = Loader.Initialized; - - /// Union class for fast buffer conversion - /// - /// - /// Because of the way arrays work in .NET, all of the arrays will have the same - /// length value. To prevent unaware code from trying to read/write from out of - /// bounds, allocation is done at the grain of the Least Common Multiple of the - /// sizes of the contained types. In this case the LCM is 8 bytes - the size of - /// a double or a long - which simplifies allocation. - /// - /// This means that when you ask for an array of 500 bytes you will actually get - /// an array of 63 doubles - 504 bytes total. Any code that uses the length of - /// the array will see only 63 bytes, shorts, etc. - /// - /// CodeAnalysis does not like this class, with good reason. It should never be - /// exposed beyond the scope of the MP3FileWriter. - /// - /// - // uncomment to suppress CodeAnalysis warnings for the ArrayUnion class: - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Portability", "CA1900:ValueTypeFieldsShouldBePortable", Justification = "This design breaks portability, but is never exposed outside the class. Tested on x86 and x64 architectures.")] - [StructLayout(LayoutKind.Explicit)] - private class ArrayUnion - { - /// Length of the byte array - [FieldOffset(0)] - public readonly int nBytes; - - /// Array of unsigned 8-bit integer values, length will be misreported - [FieldOffset(16)] - public readonly byte[] bytes; - - /// Array of signed 16-bit integer values, length will be misreported - [FieldOffset(16)] - public readonly short[] shorts; - - /// Array of signed 32-bit integer values, length will be misreported - [FieldOffset(16)] - public readonly int[] ints; - - /// Array of signed 64-bit integer values, length will be correct - [FieldOffset(16)] - public readonly long[] longs; - - /// Array of signed 32-bit floating point values, length will be misreported - [FieldOffset(16)] - public readonly float[] floats; - - /// Array of signed 64-bit floating point values, length will be correct - /// This is the actual array allocated by the constructor - [FieldOffset(16)] - public readonly double[] doubles; - - // True sizes of the various array types, calculated from number of bytes - - /// Actual length of the 'shorts' member array - public int nShorts { get { return nBytes / 2; } } - /// Actual length of the 'ints' member array - public int nInts { get { return nBytes / 4; } } - /// Actual length of the 'longs' member array - public int nLongs { get { return nBytes / 8; } } - /// Actual length of the 'floats' member array - public int nFloats { get { return nBytes / 4; } } - /// Actual length of the 'doubles' member array - public int nDoubles { get { return doubles.Length; } } - - /// Initialize array to hold the requested number of bytes - /// Minimum byte count of array - /// - /// Since all arrays will have the same apparent count, allocation - /// is done on the array with the largest data type. This helps - /// to prevent out-of-bounds reads and writes by methods that do - /// not know about the union. - /// - public ArrayUnion(int reqBytes) - { - // Calculate smallest number of doubles required to store the - // requested byte count - int reqDoubles = (reqBytes + 7) / 8; - - this.doubles = new double[reqDoubles]; - this.nBytes = reqDoubles * 8; - } - - private ArrayUnion() - { - throw new Exception("Default constructor cannot be called for ArrayUnion"); - } - }; - - #region Properties - // LAME library context - private LibMp3Lame _lame; - - // Format of input wave data - private readonly WaveFormat inputFormat; - - // Output stream to write encoded data to - private Stream outStream; - - // Flag to control whether we should dispose of output stream - private bool disposeOutput = false; - #endregion - - #region Structors - /// Create MP3FileWriter to write to a file on disk - /// Name of file to create - /// Input WaveFormat - /// LAME quality preset - /// Optional ID3 data block - public LameMP3FileWriter(string outFileName, WaveFormat format, NAudio.Lame.LAMEPreset quality, ID3TagData id3 = null) - : this(File.Create(outFileName), format, quality, id3) - { - this.disposeOutput = true; - } - - /// Create MP3FileWriter to write to supplied stream - /// Stream to write encoded data to - /// Input WaveFormat - /// LAME quality preset - /// Optional ID3 data block - public LameMP3FileWriter(Stream outStream, WaveFormat format, NAudio.Lame.LAMEPreset quality, ID3TagData id3 = null) - : base() - { - //Loader.Init(); - //if (!Loader.Initialized) - // Loader.Initialized = false; - - // sanity check - if (outStream == null) - throw new ArgumentNullException("outStream"); - if (format == null) - throw new ArgumentNullException("format"); - - // check for unsupported wave formats - if (format.Channels != 1 && format.Channels != 2) - throw new ArgumentException(string.Format("Unsupported number of channels {0}", format.Channels), "format"); - if (format.Encoding != WaveFormatEncoding.Pcm && format.Encoding != WaveFormatEncoding.IeeeFloat) - throw new ArgumentException(string.Format("Unsupported encoding format {0}", format.Encoding.ToString()), "format"); - if (format.Encoding == WaveFormatEncoding.Pcm && format.BitsPerSample != 16) - throw new ArgumentException(string.Format("Unsupported PCM sample size {0}", format.BitsPerSample), "format"); - if (format.Encoding == WaveFormatEncoding.IeeeFloat && format.BitsPerSample != 32) - throw new ArgumentException(string.Format("Unsupported Float sample size {0}", format.BitsPerSample), "format"); - if (format.SampleRate < 8000 || format.SampleRate > 48000) - throw new ArgumentException(string.Format("Unsupported Sample Rate {0}", format.SampleRate), "format"); - - // select encoder function that matches data format - if (format.Encoding == WaveFormatEncoding.Pcm) - { - if (format.Channels == 1) - _encode = encode_pcm_16_mono; - else - _encode = encode_pcm_16_stereo; - } - else - { - if (format.Channels == 1) - _encode = encode_float_mono; - else - _encode = encode_float_stereo; - } - - // Set base properties - this.inputFormat = format; - this.outStream = outStream; - this.disposeOutput = false; - - // Allocate buffers based on sample rate - this.inBuffer = new ArrayUnion(format.AverageBytesPerSecond); - this.outBuffer = new byte[format.SampleRate * 5 / 4 + 7200]; - - // Initialize lame library - this._lame = new LibMp3Lame(); - - this._lame.InputSampleRate = format.SampleRate; - this._lame.NumChannels = format.Channels; - - this._lame.SetPreset((int)quality); - - if (id3 != null) - ApplyID3Tag(id3); - - this._lame.InitParams(); - } - - - /// Create MP3FileWriter to write to a file on disk - /// Name of file to create - /// Input WaveFormat - /// Output bit rate in kbps - /// Optional ID3 data block - public LameMP3FileWriter(string outFileName, WaveFormat format, int bitRate, ID3TagData id3 = null) - : this(File.Create(outFileName), format, bitRate, id3) - { - this.disposeOutput = true; - } - - /// Create MP3FileWriter to write to supplied stream - /// Stream to write encoded data to - /// Input WaveFormat - /// Output bit rate in kbps - /// Optional ID3 data block - public LameMP3FileWriter(Stream outStream, WaveFormat format, int bitRate, ID3TagData id3 = null) - : base() - { - //Loader.Init(); - //if (!Loader.Initialized) - // Loader.Initialized = false; - - // sanity check - if (outStream == null) - throw new ArgumentNullException("outStream"); - if (format == null) - throw new ArgumentNullException("format"); - - // check for unsupported wave formats - if (format.Channels != 1 && format.Channels != 2) - throw new ArgumentException(string.Format("Unsupported number of channels {0}", format.Channels), "format"); - if (format.Encoding != WaveFormatEncoding.Pcm && format.Encoding != WaveFormatEncoding.IeeeFloat) - throw new ArgumentException(string.Format("Unsupported encoding format {0}", format.Encoding.ToString()), "format"); - if (format.Encoding == WaveFormatEncoding.Pcm && format.BitsPerSample != 16) - throw new ArgumentException(string.Format("Unsupported PCM sample size {0}", format.BitsPerSample), "format"); - if (format.Encoding == WaveFormatEncoding.IeeeFloat && format.BitsPerSample != 32) - throw new ArgumentException(string.Format("Unsupported Float sample size {0}", format.BitsPerSample), "format"); - if (format.SampleRate < 8000 || format.SampleRate > 48000) - throw new ArgumentException(string.Format("Unsupported Sample Rate {0}", format.SampleRate), "format"); - - // select encoder function that matches data format - if (format.Encoding == WaveFormatEncoding.Pcm) - { - if (format.Channels == 1) - _encode = encode_pcm_16_mono; - else - _encode = encode_pcm_16_stereo; - } - else - { - if (format.Channels == 1) - _encode = encode_float_mono; - else - _encode = encode_float_stereo; - } - - // Set base properties - this.inputFormat = format; - this.outStream = outStream; - this.disposeOutput = false; - - // Allocate buffers based on sample rate - this.inBuffer = new ArrayUnion(format.AverageBytesPerSecond); - this.outBuffer = new byte[format.SampleRate * 5 / 4 + 7200]; - - // Initialize lame library - this._lame = new LibMp3Lame(); - - this._lame.InputSampleRate = format.SampleRate; - this._lame.NumChannels = format.Channels; - - this._lame.BitRate = bitRate; - - if (id3 != null) - ApplyID3Tag(id3); - - this._lame.InitParams(); - } - - - // Close LAME instance and output stream on dispose - /// Dispose of object - /// True if called from destructor, false otherwise - protected override void Dispose(bool final) - { - if (_lame != null && outStream != null) - Flush(); - - if (_lame != null) - { - _lame.Dispose(); - _lame = null; - } - - if (outStream != null && disposeOutput) - { - outStream.Dispose(); - outStream = null; - } - - base.Dispose(final); - } - #endregion - - /// Get internal LAME library instance - /// LAME library instance - public LibMp3Lame GetLameInstance() - { - return _lame; - } - - #region Internal encoder operations - // Input buffer - private ArrayUnion inBuffer = null; - - /// Current write position in input buffer - private int inPosition; - - /// Output buffer, size determined by call to Lame.beInitStream - protected byte[] outBuffer; - - long _inputByteCount = 0; - long _outputByteCount = 0; - - // encoder write functions, one for each supported input wave format - - private int encode_pcm_16_mono() - { - return _lame.Write(inBuffer.shorts, inPosition / 2, outBuffer, outBuffer.Length, true); - } - - private int encode_pcm_16_stereo() - { - return _lame.Write(inBuffer.shorts, inPosition / 2, outBuffer, outBuffer.Length, false); - } - - private int encode_float_mono() - { - return _lame.Write(inBuffer.floats, inPosition / 4, outBuffer, outBuffer.Length, true); - } - - private int encode_float_stereo() - { - return _lame.Write(inBuffer.floats, inPosition / 4, outBuffer, outBuffer.Length, false); - } - - // Selected encoding write function - delegate int delEncode(); - delEncode _encode = null; - - // Pass data to encoder - private void Encode() - { - // check if encoder closed - if (outStream == null || _lame == null) - throw new InvalidOperationException("Output Stream closed."); - - // If no data to encode, do nothing - if (inPosition < inputFormat.Channels * 2) - return; - - // send to encoder - int rc = _encode(); - - if (rc > 0) - { - outStream.Write(outBuffer, 0, rc); - _outputByteCount += rc; - } - - _inputByteCount += inPosition; - inPosition = 0; - - // report progress - RaiseProgress(false); - } - #endregion - - #region Stream implementation - /// Write-only stream. Always false. - public override bool CanRead { get { return false; } } - /// Non-seekable stream. Always false. - public override bool CanSeek { get { return false; } } - /// True when encoder can accept more data - public override bool CanWrite { get { return outStream != null && _lame != null; } } - - /// Dummy Position. Always 0. - public override long Position - { - get { return 0; } - set { throw new NotImplementedException(); } - } - - /// Dummy Length. Always 0. - public override long Length - { - get { return 0; } - } - - /// Add data to output buffer, sending to encoder when buffer full - /// Source buffer - /// Offset of data in buffer - /// Length of data - public override void Write(byte[] buffer, int offset, int count) - { - while (count > 0) - { - int blockSize = Math.Min(inBuffer.nBytes - inPosition, count); - Buffer.BlockCopy(buffer, offset, inBuffer.bytes, inPosition, blockSize); - - inPosition += blockSize; - count -= blockSize; - offset += blockSize; - - if (inPosition >= inBuffer.nBytes) - Encode(); - } - } - - /// Finalise compression, add final output to output stream and close encoder - public override void Flush() - { - // write remaining data - if (inPosition > 0) - Encode(); - - // finalize compression - int rc = _lame.Flush(outBuffer, outBuffer.Length); - if (rc > 0) - { - outStream.Write(outBuffer, 0, rc); - _outputByteCount += rc; - } - - // report progress - RaiseProgress(true); - - // Cannot continue after flush, so clear output stream - if (disposeOutput) - outStream.Dispose(); - outStream = null; - } - - /// Reading not supported. Throws NotImplementedException. - /// - /// - /// - /// - public override int Read(byte[] buffer, int offset, int count) - { - throw new NotImplementedException(); - } - - /// Setting length not supported. Throws NotImplementedException. - /// Length value - public override void SetLength(long value) - { - throw new NotImplementedException(); - } - - /// Seeking not supported. Throws NotImplementedException. - /// Seek offset - /// Seek origin - public override long Seek(long offset, SeekOrigin origin) - { - throw new NotImplementedException(); - } - #endregion - - #region ID3 support - private void ApplyID3Tag(ID3TagData tag) - { - if (tag == null) - return; - - if (!string.IsNullOrEmpty(tag.Title)) - _lame.ID3SetTitle(tag.Title); - if (!string.IsNullOrEmpty(tag.Artist)) - _lame.ID3SetArtist(tag.Artist); - if (!string.IsNullOrEmpty(tag.Album)) - _lame.ID3SetAlbum(tag.Album); - if (!string.IsNullOrEmpty(tag.Year)) - _lame.ID3SetYear(tag.Year); - if (!string.IsNullOrEmpty(tag.Comment)) - _lame.ID3SetComment(tag.Comment); - if (!string.IsNullOrEmpty(tag.Genre)) - _lame.ID3SetGenre(tag.Genre); - if (!string.IsNullOrEmpty(tag.Track)) - _lame.ID3SetTrack(tag.Track); - - if (!string.IsNullOrEmpty(tag.Subtitle)) - _lame.ID3SetFieldValue(string.Format("TIT3={0}", tag.Subtitle)); - - if (!string.IsNullOrEmpty(tag.AlbumArtist)) - _lame.ID3SetFieldValue(string.Format("TPE2={0}", tag.AlbumArtist)); - - - if (tag.AlbumArt != null && tag.AlbumArt.Length > 0 && tag.AlbumArt.Length < 131072) - _lame.ID3SetAlbumArt(tag.AlbumArt); - } - - private static Dictionary _genres; - /// Dictionary of Genres supported by LAME's ID3 tag support - public static Dictionary Genres - { - get - { - if (_genres == null) - _genres = LibMp3Lame.ID3GenreList(); - return _genres; - } - } - #endregion - - #region LAME library print hooks - /// Set output function for Error output - /// Function to call for Error output - public void SetErrorFunction(OutputHandler fn) - { - GetLameInstance().SetErrorFunc(t => fn(t)); - } - - /// Set output function for Debug output - /// Function to call for Debug output - public void SetDebugFunction(OutputHandler fn) - { - GetLameInstance().SetMsgFunc(t => fn(t)); - } - - /// Set output function for Message output - /// Function to call for Message output - public void SetMessageFunction(OutputHandler fn) - { - GetLameInstance().SetMsgFunc(t => fn(t)); - } - - /// Get configuration of LAME context, results passed to Message function - public void PrintLAMEConfig() - { - GetLameInstance().PrintConfig(); - } - - /// Get internal settings of LAME context, results passed to Message function - public void PrintLAMEInternals() - { - GetLameInstance().PrintInternals(); - } - #endregion - - #region Progress event - int _minProgressTime = 100; - /// Minimimum time between progress events in ms, or 0 for no limit - /// Defaults to 100ms - public int MinProgressTime - { - get { return _minProgressTime; } - set - { - _minProgressTime = Math.Max(0, value); - } - } - - /// Called when data is written to the output file from Encode or Flush - public event ProgressHandler OnProgress; - - DateTime _lastProgress = DateTime.Now; - /// Call any registered OnProgress handlers - /// True if called at end of output - protected void RaiseProgress(bool finished) - { - var timeDelta = DateTime.Now - _lastProgress; - if (finished || timeDelta.TotalMilliseconds >= _minProgressTime) - { - _lastProgress = DateTime.Now; - var prog = OnProgress; - if (prog != null) - prog(this, _inputByteCount, _outputByteCount, finished); - } - } - #endregion - } -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/Encoder/MP3FileWriter.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/Encoder/MP3FileWriter.cs.meta deleted file mode 100644 index e4e1b57..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/Encoder/MP3FileWriter.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: dd29cf8ecdb4a1c4da54d1a9f5559bef -timeCreated: 1492512880 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/FFmpegOut.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/FFmpegOut.meta deleted file mode 100644 index 07c5b3f..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/FFmpegOut.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: cc572eb7215289d4998e2ebd1f2a2dbc -folderAsset: yes -timeCreated: 1488810210 -licenseType: Pro -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/FFmpegOut/CameraCapture.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/FFmpegOut/CameraCapture.cs deleted file mode 100644 index 4e067f7..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/FFmpegOut/CameraCapture.cs +++ /dev/null @@ -1,218 +0,0 @@ -using UnityEngine; - -namespace FFmpegOut -{ - [RequireComponent(typeof(Camera))] - [AddComponentMenu("FFmpegOut/Camera Capture")] - public class CameraCapture : MonoBehaviour - { - #region Editable properties - - [SerializeField] bool _setResolution = true; - [SerializeField] int _width = 1280; - [SerializeField] int _height = 720; - [SerializeField] int _frameRate = 30; - [SerializeField] bool _allowSlowDown = true; - [SerializeField] public FFmpegPipe.Codec _codec; - - #endregion - - public void SetResolution(int w,int h) - { - _width = w; - _height = h; - } - - - #region Private members - - [SerializeField, HideInInspector] Shader _shader; - Material _material; - - FFmpegPipe _pipe; - float _elapsed; - - RenderTexture _tempTarget; - GameObject _tempBlitter; - - static int _activePipeCount; - - #endregion - - #region MonoBehavior functions - - public float recordTime; - private float updateIntervalTime; - private long CurrentFrameCount; - //private Camera RenderCamera; - void OnValidate() - { - - } - - void OnEnable() - { - if (!FFmpegConfig.CheckAvailable) - { - Debug.LogError( - "ffmpeg.exe is missing. " + - "Please refer to the installation instruction. " + - "https://github.com/keijiro/FFmpegOut" - ); - enabled = false; - } - updateIntervalTime = 1 / (float)_frameRate; - //Application.targetFrameRate = _frameRate; - //RenderCamera = GetComponent(); - SetResolution(Screen.width,Screen.height); - } - - void OnDisable() - { - if (_pipe != null) ClosePipe(); - } - - void OnDestroy() - { - if (_pipe != null) ClosePipe(); - } - - void Start() - { - _material = new Material(_shader); - //_frameRate = Application.targetFrameRate; - } - - public void StartCapture(string filename) - { - if (_pipe == null) OpenPipe(filename); - } - - public void StopCapture() - { - if (_pipe != null) ClosePipe(); - } - - - - void OnRenderImage(RenderTexture source, RenderTexture destination) - { - if (_pipe != null) - { - if ((Time.time - recordTime) / updateIntervalTime >= CurrentFrameCount) - { - var tempRT = RenderTexture.GetTemporary(source.width, source.height); - Graphics.Blit(source, tempRT, _material, 0); - - var tempTex = new Texture2D(source.width, source.height, TextureFormat.RGB24, false); - tempTex.ReadPixels(new Rect(0, 0, source.width, source.height), 0, 0, false); - tempTex.Apply(); - byte[] writeByte = tempTex.GetRawTextureData(); - _pipe.Write(writeByte); - - Destroy(tempTex); - RenderTexture.ReleaseTemporary(tempRT); - - CurrentFrameCount++; - } - } - - Graphics.Blit(source, destination); - } - - #endregion - - #region Private methods - - void OpenPipe(string filename) - { - if (_pipe != null) return; - - var camera = GetComponent(); - var width = _width; - var height = _height; - - // Apply the screen resolution settings. - if (_setResolution) - { - _tempTarget = RenderTexture.GetTemporary(width, height); - camera.targetTexture = _tempTarget; - _tempBlitter = Blitter.CreateGameObject(camera); - } - else - { - width = camera.pixelWidth; - height = camera.pixelHeight; - } - - // Open an output stream. - _pipe = new FFmpegPipe(filename, width, height, _frameRate, _codec); - _activePipeCount++; - - // Change the application frame rate on the first pipe. - if (_activePipeCount == 1) - { - if (_allowSlowDown) - Time.captureFramerate = _frameRate; - //else - //Application.targetFrameRate = _frameRate; - - } - recordTime = Time.time; - Debug.Log("Capture started (" + _pipe.Filename + ")"); - } - - void ClosePipe() - { - var camera = GetComponent(); - - // Destroy the blitter object. - if (_tempBlitter != null) - { - Destroy(_tempBlitter); - _tempBlitter = null; - } - - // Release the temporary render target. - if (_tempTarget != null && _tempTarget == camera.targetTexture) - { - camera.targetTexture = null; - RenderTexture.ReleaseTemporary(_tempTarget); - _tempTarget = null; - } - - // Close the output stream. - if (_pipe != null) - { - CurrentFrameCount = 0; - - Debug.Log("Capture ended (" + _pipe.Filename + ")"); - - StartCoroutine(_pipe.Close()); - _activePipeCount--; - - if (!string.IsNullOrEmpty(_pipe.Error)) - { - Debug.LogWarning( - "ffmpeg returned with a warning or an error message. " + - "See the following lines for details:\n" + _pipe.Error - ); - } - - _pipe = null; - - // Reset the application frame rate on the last pipe. - if (_activePipeCount == 0) - { - if (_allowSlowDown) - Time.captureFramerate = 0; - //else - //Application.targetFrameRate = -1; - //Application.targetFrameRate = _frameRate; - } - } - } - - #endregion - } -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/FFmpegOut/CameraCapture.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/FFmpegOut/CameraCapture.cs.meta deleted file mode 100644 index 87433ca..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/FFmpegOut/CameraCapture.cs.meta +++ /dev/null @@ -1,13 +0,0 @@ -fileFormatVersion: 2 -guid: a66fbd5ffe9b9d64da304996f1919f40 -timeCreated: 1488901810 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: - - _shader: {fileID: 4800000, guid: a4bd3b00ad1ed53458ec6ff07694985e, type: 3} - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/FFmpegOut/Editor.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/FFmpegOut/Editor.meta deleted file mode 100644 index 5983dfc..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/FFmpegOut/Editor.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: ca9c13867ad2c7142a339af129c0f7d7 -folderAsset: yes -timeCreated: 1491148560 -licenseType: Pro -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/FFmpegOut/Editor/CameraCaptureEditor.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/FFmpegOut/Editor/CameraCaptureEditor.cs deleted file mode 100644 index 1606cca..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/FFmpegOut/Editor/CameraCaptureEditor.cs +++ /dev/null @@ -1,57 +0,0 @@ -using UnityEngine; -using UnityEditor; - -namespace FFmpegOut -{ - [CanEditMultipleObjects] - [CustomEditor(typeof(CameraCapture))] - public class CameraCaptureEditor : Editor - { - SerializedProperty _setResolution; - SerializedProperty _width; - SerializedProperty _height; - SerializedProperty _frameRate; - SerializedProperty _allowSlowDown; - SerializedProperty _codec; - - static GUIContent [] _codecLabels = { - new GUIContent("ProRes (QuickTime)"), - new GUIContent("H.264 (MP4)"), - new GUIContent("VP8 (WebM)") - }; - - static int [] _codecOptions = { 0, 1, 2 }; - - void OnEnable() - { - _setResolution = serializedObject.FindProperty("_setResolution"); - _width = serializedObject.FindProperty("_width"); - _height = serializedObject.FindProperty("_height"); - _frameRate = serializedObject.FindProperty("_frameRate"); - _allowSlowDown = serializedObject.FindProperty("_allowSlowDown"); - _codec = serializedObject.FindProperty("_codec"); - } - - public override void OnInspectorGUI() - { - // Show the editor controls. - serializedObject.Update(); - - EditorGUILayout.PropertyField(_setResolution); - - if (_setResolution.hasMultipleDifferentValues || _setResolution.boolValue) - { - EditorGUI.indentLevel++; - EditorGUILayout.PropertyField(_width); - EditorGUILayout.PropertyField(_height); - EditorGUI.indentLevel--; - } - - EditorGUILayout.PropertyField(_frameRate); - EditorGUILayout.PropertyField(_allowSlowDown); - EditorGUILayout.IntPopup(_codec, _codecLabels, _codecOptions); - - serializedObject.ApplyModifiedProperties(); - } - } -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/FFmpegOut/Editor/CameraCaptureEditor.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/FFmpegOut/Editor/CameraCaptureEditor.cs.meta deleted file mode 100644 index 8dc5b52..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/FFmpegOut/Editor/CameraCaptureEditor.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 5e125d1c67e59c444a1e722899c8a950 -timeCreated: 1491148560 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/FFmpegOut/FFmpegConfig.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/FFmpegOut/FFmpegConfig.cs deleted file mode 100644 index 003bd4d..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/FFmpegOut/FFmpegConfig.cs +++ /dev/null @@ -1,29 +0,0 @@ -using UnityEngine; - -namespace FFmpegOut -{ - public static class FFmpegConfig - { - public static string BinaryPath - { - get { - var basePath = Application.streamingAssetsPath + "/FFmpegOut"; - - if (Application.platform == RuntimePlatform.OSXPlayer || - Application.platform == RuntimePlatform.OSXEditor) - return basePath + "/OSX/ffmpeg"; - - if (Application.platform == RuntimePlatform.LinuxPlayer || - Application.platform == RuntimePlatform.LinuxEditor) - return basePath + "/Linux/ffmpeg"; - - return basePath + "/ffmpeg.exe"; - } - } - - public static bool CheckAvailable - { - get { return System.IO.File.Exists(BinaryPath); } - } - } -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/FFmpegOut/FFmpegConfig.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/FFmpegOut/FFmpegConfig.cs.meta deleted file mode 100644 index a12a99d..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/FFmpegOut/FFmpegConfig.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 663b63359cba0b647bb991893fc0c1ea -timeCreated: 1491122743 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/FFmpegOut/FFmpegPipe.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/FFmpegOut/FFmpegPipe.cs deleted file mode 100644 index c49f223..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/FFmpegOut/FFmpegPipe.cs +++ /dev/null @@ -1,147 +0,0 @@ -using System.Diagnostics; -using System.IO; -using System; -using System.Collections.Generic; -using System.Threading; -using System.Collections; - -namespace FFmpegOut -{ - // A stream pipe class that invokes ffmpeg and connect to it. - public class FFmpegPipe - { - #region Public properties - - public enum Codec { ProRes, H264, VP8 } - - public string Filename { get; private set; } - public string Error { get; private set; } - - #endregion - - - List writeByteList; - static Thread thread; - - #region Public methods - - public FFmpegPipe(string name, int width, int height, int framerate, Codec codec) - { - //name += DateTime.Now.ToString(" yyyy MMdd HHmmss"); - //Filename = name.Replace(" ", "_") + GetSuffix(codec); - Filename = name + GetSuffix(codec); - var opt = "-y -f rawvideo -vcodec rawvideo -pixel_format rgb24"; - opt += " -video_size " + width + "x" + height; - opt += " -framerate " + framerate; - opt += " -loglevel warning -i - " + GetOptions(codec); - opt += " " + Filename; - - if (writeByteList == null) - writeByteList = new List(); - - writeByteList.Clear(); - GC.Collect(); - recording = true; - - var info = new ProcessStartInfo(FFmpegConfig.BinaryPath, opt); - info.UseShellExecute = false; - info.CreateNoWindow = true; - info.RedirectStandardInput = true; - info.RedirectStandardOutput = true; - info.RedirectStandardError = true; - - _subprocess = Process.Start(info); - _stdin = new BinaryWriter(_subprocess.StandardInput.BaseStream); - thread = new Thread(() => WriteStdin()); - thread.Start(); - } - - public void Write(byte[] data) - { - if (_subprocess == null) return; - - lock (writeByteList) - writeByteList.Add(data); - - //_stdin.Write(data); - //_stdin.Flush(); - } - - private static bool recording; - public void WriteStdin() - { - while (recording) - { - lock (_stdin) - { - lock (writeByteList) - { - while (writeByteList.Count > 0) - { - _stdin.Write(writeByteList[0]); - _stdin.Flush(); - writeByteList.RemoveAt(0); - } - } - } - - } - Thread.CurrentThread.Abort(); - } - - public IEnumerator Close() - { - if (_subprocess == null) yield break; - recording = false; - while (thread.IsAlive) - { - yield return null; - } - _subprocess.StandardInput.Close(); - _subprocess.WaitForExit(); - - var outputReader = _subprocess.StandardError; - Error = outputReader.ReadToEnd(); - - _subprocess.Close(); - _subprocess.Dispose(); - - outputReader.Close(); - outputReader.Dispose(); - - _subprocess = null; - _stdin = null; - } - - #endregion - - #region Private members - - Process _subprocess; - BinaryWriter _stdin; - - static string [] _suffixes = { - ".mov", - ".mp4", - ".webm" - }; - - static string [] _options = { - "-c:v prores_ks -pix_fmt yuv422p10le", - "-pix_fmt yuv420p", - "-c:v libvpx" - }; - - public static string GetSuffix(Codec codec) - { - return _suffixes[(int)codec]; - } - - static string GetOptions(Codec codec) - { - return _options[(int)codec]; - } - - #endregion - } -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/FFmpegOut/FFmpegPipe.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/FFmpegOut/FFmpegPipe.cs.meta deleted file mode 100644 index 9ed1550..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/FFmpegOut/FFmpegPipe.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: fffc00cbe6345c64a8d3898031c46d8a -timeCreated: 1491121325 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/FFmpegOut/Internal.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/FFmpegOut/Internal.meta deleted file mode 100644 index e29d5fa..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/FFmpegOut/Internal.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 88f8cafe5d48d4a4f89f22b10bbc64a4 -folderAsset: yes -timeCreated: 1491313768 -licenseType: Pro -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/FFmpegOut/Internal/Blitter.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/FFmpegOut/Internal/Blitter.cs deleted file mode 100644 index ac1a20f..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/FFmpegOut/Internal/Blitter.cs +++ /dev/null @@ -1,44 +0,0 @@ -using UnityEngine; - -namespace FFmpegOut -{ - // Simply blit a given texture to the screen. - [RequireComponent(typeof(Camera))] - internal class Blitter : MonoBehaviour - { - #region Static functions - - // A utility function for creating a blitter object. - public static GameObject CreateGameObject(Camera originalCamera) - { - var go = new GameObject("Blitter", _blitterComponents); - go.hideFlags = HideFlags.HideInHierarchy; - - var camera = go.GetComponent(); - camera.cullingMask = 0; - camera.targetDisplay = originalCamera.targetDisplay; - - var blitter = go.GetComponent(); - blitter._sourceTexture = originalCamera.targetTexture; - - return go; - } - - #endregion - - #region Private members - - static System.Type[] _blitterComponents = { - typeof(Camera), typeof(Blitter) - }; - - RenderTexture _sourceTexture; - - void OnRenderImage(RenderTexture source, RenderTexture destination) - { - Graphics.Blit(_sourceTexture, destination); - } - - #endregion - } -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/FFmpegOut/Internal/Blitter.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/FFmpegOut/Internal/Blitter.cs.meta deleted file mode 100644 index 23e50be..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/FFmpegOut/Internal/Blitter.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 6dc134cd7da61a9438d65f309789d0d3 -timeCreated: 1491312926 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/FFmpegOut/Internal/Shader.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/FFmpegOut/Internal/Shader.meta deleted file mode 100644 index ad545ef..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/FFmpegOut/Internal/Shader.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 3b9d23a6d19446d498b3ae54bae7b8fa -folderAsset: yes -timeCreated: 1488902130 -licenseType: Pro -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/FFmpegOut/Internal/Shader/CameraCapture.shader b/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/FFmpegOut/Internal/Shader/CameraCapture.shader deleted file mode 100644 index 3fff985..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/FFmpegOut/Internal/Shader/CameraCapture.shader +++ /dev/null @@ -1,34 +0,0 @@ -Shader "Hidden/FFmpegOut/CameraCapture" -{ - Properties - { - _MainTex("", 2D) = "white" {} - } - - CGINCLUDE - - #include "UnityCG.cginc" - - sampler2D _MainTex; - - fixed4 frag_flip(v2f_img i) : SV_Target - { - float2 uv = i.uv; - uv.y = 1 - uv.y; - return tex2D(_MainTex, uv); - } - - ENDCG - - SubShader - { - Cull Off ZWrite Off ZTest Always - Pass - { - CGPROGRAM - #pragma vertex vert_img - #pragma fragment frag_flip - ENDCG - } - } -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/FFmpegOut/Internal/Shader/CameraCapture.shader.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/FFmpegOut/Internal/Shader/CameraCapture.shader.meta deleted file mode 100644 index 2756114..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/FFmpegOut/Internal/Shader/CameraCapture.shader.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: a4bd3b00ad1ed53458ec6ff07694985e -timeCreated: 1488901510 -licenseType: Pro -ShaderImporter: - defaultTextures: [] - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/MovieRecorder.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/MovieRecorder.cs deleted file mode 100644 index 808f581..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/MovieRecorder.cs +++ /dev/null @@ -1,258 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; -using FFmpegOut; -using System; -using System.Diagnostics; -using System.IO; -using System.Threading; -using UnityEngine.UI; -using System.Linq; - -[RequireComponent(typeof(CameraCapture))] -[RequireComponent(typeof(AudioListenerRecorder))] -public class MovieRecorder : MonoBehaviour { - - //the most important is FPS ,take care if u do not want the mistake what happen to the audio and capture is not have synchronization - - private CameraCapture cameraCapture; - private AudioListenerRecorder audioListenerRecord; - private bool recording; - public bool IsRecord { get { return recording; } } - - #region Editable properties - [SerializeField] - private string fileName; - [SerializeField] - FFmpegPipe.Codec _codec; - [SerializeField] - public SaveAudio.Savetype saveAudioType; - [SerializeField] - private float RecordTime; - [SerializeField] - private bool reservedOriginal; - #endregion - - private float StartRecordTime; - - public delegate void RecordFinished(); - public static event RecordFinished FinishedEvent; - - #region UI - [SerializeField] - private RectTransform UIPanel; - [SerializeField] - private Text InputFileName; - [SerializeField] - private Text uiRecordTime; - [SerializeField] - private Toggle recordToggle; - [SerializeField] - private Dropdown mediaTypeDrop; - [SerializeField] - private Dropdown audioTypeDrop; - [SerializeField] - private Text InputWidth; - [SerializeField] - private Text InputHeight; - public string InputfileName { set { fileName = value; } } - private bool enableUI = false; - #endregion - - void Awake() - { - cameraCapture = GetComponent(); - audioListenerRecord = GetComponent(); - - if(UIPanel == null) - { - UIPanel = GameObject.Find("RecordUICanvas").transform.Find("Panel").GetComponent(); - } - if(UIPanel != null) - { - InputFileName = UIPanel.transform.Find("FileName").Find("InputField").GetComponent().textComponent; - uiRecordTime = UIPanel.transform.Find("RecordTime").GetChild(0).GetComponent(); - recordToggle = UIPanel.transform.Find("RecordToggle").GetComponent(); - mediaTypeDrop = UIPanel.transform.Find("MediaTypeDropdown").GetComponent(); - audioTypeDrop = UIPanel.transform.Find("AudioTypeDropdown").GetComponent(); - InputWidth = UIPanel.transform.Find("width").Find("InputField").GetComponent().textComponent; - InputHeight = UIPanel.transform.Find("height").Find("InputField").GetComponent().textComponent; - enableUI = false; - List mediaTypeOptions = new List(); - for (int i=0;i< (int)Enum.GetValues(typeof(FFmpegPipe.Codec)).Cast().Max() + 1;i++) - { - mediaTypeOptions.Add(new Dropdown.OptionData(((FFmpegPipe.Codec)i).ToString())); - } - mediaTypeDrop.AddOptions(mediaTypeOptions); - //mediaTypeDrop.onValueChanged.AddListener((v) => SetMediaType(v)); - List audioTypeOptions = new List(); - for (int i = 0; i < (int)Enum.GetValues(typeof(SaveAudio.Savetype)).Cast().Max()+1; i++) - { - audioTypeOptions.Add(new Dropdown.OptionData(((SaveAudio.Savetype)i).ToString())); - } - audioTypeDrop.AddOptions(audioTypeOptions); - //audioTypeDrop.onValueChanged.AddListener((v) => SetAudioType(v)); - } - UIPanel.gameObject.SetActive(enableUI); - } - - - // Use this for initialization - void Start () { - recording = false; - FinishedEvent += ShowReocrdTime; - } - - // Update is called once per frame - void Update () { - - if(Input.GetKeyDown(KeyCode.R)) - { - if(!recording) - { - fileName = DateTime.Now.ToString("yyyy-MMdd-HHmmss"); - StartRecord(fileName); - } - else - { - StopRecord(); - } - } - if (Input.GetKeyDown(KeyCode.F2)) - { - enableUI = !enableUI; - UIPanel.gameObject.SetActive(enableUI); - } - - - if (recording) - { - CountRecordTime(); - } - if(enableUI) - { - recordToggle.isOn = recording; - uiRecordTime.text = RecordTime.ToString(); - } - } - - void CountRecordTime() - { - RecordTime = Time.time - StartRecordTime; - } - - public void StartRecord(string filename) - { - if (recording) - return; - fileName = filename; - StartRecord(); - } - - public void StartRecord() - { - if (recording) - return; - if (enableUI) - { - fileName = InputFileName.text; - if(fileName == null || fileName == "") - fileName = DateTime.Now.ToString("yyyy-MMdd-HHmmss"); - - SetMediaType(mediaTypeDrop.value); - SetAudioType(audioTypeDrop.value); - int width; - int height; - if (Int32.TryParse(InputWidth.text, out width) && Int32.TryParse(InputHeight.text, out height)) - { - cameraCapture.SetResolution(width, height); - } - } - recording = true; - cameraCapture._codec = _codec; - audioListenerRecord.saveAudioType = saveAudioType; - cameraCapture.StartCapture("Tempmovie" + fileName); - audioListenerRecord.StartRecord("Tempaudio" + fileName); - StartRecordTime = Time.time; - } - - public void StopRecord() - { - if (!recording) - return; - CountRecordTime(); - cameraCapture.StopCapture(); - audioListenerRecord.StopRecord(); - StartCoroutine(StartCombine()); - recording = false; - } - - public void SetMediaType(int i) - { - _codec = (FFmpegPipe.Codec)i; - } - public void SetAudioType(int i) - { - saveAudioType = (SaveAudio.Savetype)i; - } - - IEnumerator StartCombine() - { - yield return new WaitForSeconds(0.5f); - - string Arguments = "-i " + "Tempmovie" + fileName + FFmpegPipe.GetSuffix(_codec) + - " -i " + "Tempaudio" + fileName + "." + audioListenerRecord.saveAudioType.ToString() + - " -c copy -map 0:0 -map 1:0 -ar " + audioListenerRecord.outputRate.ToString() + " " + fileName + FFmpegPipe.GetSuffix(_codec); - if (_codec == FFmpegPipe.Codec.H264 && audioListenerRecord.saveAudioType == SaveAudio.Savetype.wav) - Arguments = "-i " + "Tempmovie" + fileName + FFmpegPipe.GetSuffix(_codec) + - " -i " + "Tempaudio" + fileName + "." + audioListenerRecord.saveAudioType.ToString() + - " -c copy -map 0:0 -map 1:0 -acodec mp3 -vcodec copy -ar " + audioListenerRecord.outputRate.ToString() + " " + fileName + FFmpegPipe.GetSuffix(_codec); - - yield return ExcuteProcess(FFmpegConfig.BinaryPath, Arguments, (s, e) => print(e.Data)); - - if (!reservedOriginal) - { - File.Delete(Application.dataPath + "/../Tempmovie" + fileName + FFmpegPipe.GetSuffix(_codec)); - File.Delete(Application.dataPath + "/../Tempaudio" + fileName + "." +audioListenerRecord.saveAudioType.ToString()); - } - - if (FinishedEvent != null) - FinishedEvent(); - } - - void ShowReocrdTime() - { - print("RecordTime:" + RecordTime); - } - - - IEnumerator ExcuteProcess(string fileName, string arg, DataReceivedEventHandler output) - { - Thread WriteThread = new Thread(() => _ExcuteProcess(fileName, arg, output)); - WriteThread.Start(); - - while (WriteThread.IsAlive) - yield return null; - - } - - void _ExcuteProcess(string fileName, string arg, DataReceivedEventHandler output) - { - - using (var p = new Process()) - { - p.StartInfo.FileName = fileName; - p.StartInfo.Arguments = arg; - p.StartInfo.UseShellExecute = false; - p.StartInfo.CreateNoWindow = true; - p.StartInfo.RedirectStandardError = true; - p.StartInfo.RedirectStandardOutput = true; - p.OutputDataReceived += output; - p.ErrorDataReceived += output; - p.Start(); - p.BeginOutputReadLine(); - p.BeginErrorReadLine(); - p.WaitForExit(); - } - } -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/MovieRecorder.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/MovieRecorder.cs.meta deleted file mode 100644 index 485c20e..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/MovieRecorder.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 1095e77e7b31753499738fac0dea2610 -timeCreated: 1492055352 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/Plugins.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/Plugins.meta deleted file mode 100644 index 38661ea..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/Plugins.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 14119dbedcc9e5c448c8146a15a0e88b -folderAsset: yes -timeCreated: 1492513047 -licenseType: Pro -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/Plugins/NAudio.dll b/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/Plugins/NAudio.dll deleted file mode 100644 index 0a81726..0000000 Binary files a/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/Plugins/NAudio.dll and /dev/null differ diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/Plugins/NAudio.dll.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/Plugins/NAudio.dll.meta deleted file mode 100644 index 6d3d2be..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/Plugins/NAudio.dll.meta +++ /dev/null @@ -1,25 +0,0 @@ -fileFormatVersion: 2 -guid: 61d3af59fa9054046bd93bbf9bfeaa32 -timeCreated: 1492513047 -licenseType: Pro -PluginImporter: - serializedVersion: 1 - iconMap: {} - executionOrder: {} - isPreloaded: 0 - isOverridable: 0 - platformData: - Any: - enabled: 1 - settings: {} - Editor: - enabled: 0 - settings: - DefaultValueInitialized: true - WindowsStoreApps: - enabled: 0 - settings: - CPU: AnyCPU - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/RecordCanvas.prefab b/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/RecordCanvas.prefab deleted file mode 100644 index 53cb9b0..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/RecordCanvas.prefab +++ /dev/null @@ -1,4097 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!1001 &100100000 -Prefab: - m_ObjectHideFlags: 1 - serializedVersion: 2 - m_Modification: - m_TransformParent: {fileID: 0} - m_Modifications: [] - m_RemovedComponents: [] - m_ParentPrefab: {fileID: 0} - m_RootGameObject: {fileID: 1683477860202484} - m_IsPrefabParent: 1 ---- !u!1 &1046534023872206 -GameObject: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 - m_Component: - - component: {fileID: 224978212606780970} - m_Layer: 5 - m_Name: Content - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!1 &1053867868926598 -GameObject: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 - m_Component: - - component: {fileID: 224430133987540698} - - component: {fileID: 222593529661460496} - - component: {fileID: 114255338424412804} - m_Layer: 5 - m_Name: Handle - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!1 &1071273511658648 -GameObject: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 - m_Component: - - component: {fileID: 224136708758155110} - - component: {fileID: 222119216146662160} - - component: {fileID: 114641345758052252} - m_Layer: 5 - m_Name: Label - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!1 &1114891166118942 -GameObject: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 - m_Component: - - component: {fileID: 224917986537322898} - - component: {fileID: 222082099825021604} - - component: {fileID: 114389815384225456} - m_Layer: 5 - m_Name: Text - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!1 &1116272002658940 -GameObject: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 - m_Component: - - component: {fileID: 224309315879895698} - - component: {fileID: 222398817325617946} - - component: {fileID: 114798403468417846} - m_Layer: 5 - m_Name: Time - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!1 &1122039539439108 -GameObject: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 - m_Component: - - component: {fileID: 224877248440474384} - - component: {fileID: 114876977076085766} - m_Layer: 5 - m_Name: Item - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!1 &1136734350191716 -GameObject: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 - m_Component: - - component: {fileID: 224367983987252490} - - component: {fileID: 222006487930088898} - - component: {fileID: 114182606875202126} - m_Layer: 5 - m_Name: Item Label - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!1 &1146655228816972 -GameObject: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 - m_Component: - - component: {fileID: 224661951961207604} - - component: {fileID: 222169746277937314} - - component: {fileID: 114748431494947150} - - component: {fileID: 114708852883859586} - m_Layer: 5 - m_Name: AudioTypeDropdown - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!1 &1156037266301788 -GameObject: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 - m_Component: - - component: {fileID: 224978000126982346} - - component: {fileID: 222469912823031248} - - component: {fileID: 114868221367244812} - - component: {fileID: 114742734366898342} - m_Layer: 5 - m_Name: InputField - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!1 &1171495933492936 -GameObject: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 - m_Component: - - component: {fileID: 224695010266021502} - - component: {fileID: 222686890273848612} - - component: {fileID: 114281223114531426} - - component: {fileID: 114077748150725256} - m_Layer: 5 - m_Name: StopRecordButton - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!1 &1194326070545732 -GameObject: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 - m_Component: - - component: {fileID: 224371158476086740} - - component: {fileID: 222915711469505324} - - component: {fileID: 114095325106489608} - m_Layer: 5 - m_Name: Text - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!1 &1194742888077830 -GameObject: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 - m_Component: - - component: {fileID: 224036386431653190} - - component: {fileID: 114170680294214238} - - component: {fileID: 222007706455120890} - - component: {fileID: 114405193141465864} - m_Layer: 5 - m_Name: Viewport - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!1 &1205198839392206 -GameObject: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 - m_Component: - - component: {fileID: 224535940185612886} - - component: {fileID: 222189462641508826} - - component: {fileID: 114226574336161986} - m_Layer: 5 - m_Name: width - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!1 &1205454069064386 -GameObject: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 - m_Component: - - component: {fileID: 224343337714323566} - - component: {fileID: 222915937853727880} - - component: {fileID: 114056955898377254} - m_Layer: 5 - m_Name: Item Background - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!1 &1208655999314524 -GameObject: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 - m_Component: - - component: {fileID: 224351146500051142} - m_Layer: 5 - m_Name: Sliding Area - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!1 &1209999200843122 -GameObject: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 - m_Component: - - component: {fileID: 224559175407133318} - - component: {fileID: 222020243885190668} - - component: {fileID: 114099107854363026} - - component: {fileID: 114825707329808734} - m_Layer: 5 - m_Name: Scrollbar - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!1 &1222729158489494 -GameObject: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 - m_Component: - - component: {fileID: 224633500127940814} - - component: {fileID: 222458881194464196} - - component: {fileID: 114410523750902432} - m_Layer: 5 - m_Name: FileName - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!1 &1223388733743224 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 - m_Component: - - component: {fileID: 224424652463235604} - - component: {fileID: 222809320756377766} - - component: {fileID: 114379628466674502} - m_Layer: 5 - m_Name: Panel - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!1 &1273470284527834 -GameObject: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 - m_Component: - - component: {fileID: 224356018411462194} - - component: {fileID: 222260356022017046} - - component: {fileID: 114647166756314526} - m_Layer: 5 - m_Name: Label - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!1 &1278681269429138 -GameObject: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 - m_Component: - - component: {fileID: 224010710242658290} - - component: {fileID: 222939621825280210} - - component: {fileID: 114147529689934280} - m_Layer: 5 - m_Name: Item Label - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!1 &1285287974518114 -GameObject: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 - m_Component: - - component: {fileID: 224822666437801044} - - component: {fileID: 222773038544021408} - - component: {fileID: 114033847467111682} - m_Layer: 5 - m_Name: Item Checkmark - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!1 &1319008405611144 -GameObject: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 - m_Component: - - component: {fileID: 224083160386940978} - - component: {fileID: 222809068333485684} - - component: {fileID: 114601883818866216} - m_Layer: 5 - m_Name: Checkmark - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!1 &1335145532329742 -GameObject: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 - m_Component: - - component: {fileID: 224569522200057044} - - component: {fileID: 222612771672125310} - - component: {fileID: 114788812521373876} - m_Layer: 5 - m_Name: Label - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!1 &1346866193198636 -GameObject: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 - m_Component: - - component: {fileID: 224378216432443654} - - component: {fileID: 222288253473505990} - - component: {fileID: 114779654440848942} - - component: {fileID: 114950229178183774} - m_Layer: 5 - m_Name: Template - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 0 ---- !u!1 &1365424548565418 -GameObject: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 - m_Component: - - component: {fileID: 224657730803200132} - - component: {fileID: 114485887214570058} - m_Layer: 5 - m_Name: RecordToggle - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!1 &1378521199301692 -GameObject: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 - m_Component: - - component: {fileID: 224135309993760688} - - component: {fileID: 114528902097037526} - - component: {fileID: 222398322778389224} - - component: {fileID: 114338185181858346} - m_Layer: 5 - m_Name: Viewport - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!1 &1410875726181524 -GameObject: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 - m_Component: - - component: {fileID: 224519098732573966} - - component: {fileID: 222138609473104568} - - component: {fileID: 114530496058363768} - m_Layer: 5 - m_Name: Placeholder - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!1 &1425559644864892 -GameObject: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 - m_Component: - - component: {fileID: 224225807032217706} - - component: {fileID: 222654125856886610} - - component: {fileID: 114750242749669068} - m_Layer: 5 - m_Name: RecordTime - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!1 &1466704086478742 -GameObject: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 - m_Component: - - component: {fileID: 224612726749948988} - - component: {fileID: 222695757404378718} - - component: {fileID: 114048967036655052} - - component: {fileID: 114377830397789518} - m_Layer: 5 - m_Name: InputField - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!1 &1504838929722686 -GameObject: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 - m_Component: - - component: {fileID: 224532209984060890} - m_Layer: 5 - m_Name: Content - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!1 &1611535003885486 -GameObject: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 - m_Component: - - component: {fileID: 224397989296713888} - - component: {fileID: 222935324305847694} - - component: {fileID: 114082787451867642} - m_Layer: 5 - m_Name: Item Checkmark - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!1 &1615151888271038 -GameObject: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 - m_Component: - - component: {fileID: 224831829199822854} - - component: {fileID: 222163541359230918} - - component: {fileID: 114002951280555424} - m_Layer: 5 - m_Name: Placeholder - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!1 &1615722501258778 -GameObject: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 - m_Component: - - component: {fileID: 224478214273470164} - - component: {fileID: 222167218666973228} - - component: {fileID: 114865360280230468} - m_Layer: 5 - m_Name: Text - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!1 &1622947744469346 -GameObject: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 - m_Component: - - component: {fileID: 224359279674534530} - - component: {fileID: 222336695259681702} - - component: {fileID: 114986231427705664} - - component: {fileID: 114273955731409796} - m_Layer: 5 - m_Name: StartRecordButton - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!1 &1674267795944008 -GameObject: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 - m_Component: - - component: {fileID: 224430135249139118} - - component: {fileID: 222623196383362590} - - component: {fileID: 114459953521014792} - m_Layer: 5 - m_Name: Text - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!1 &1683477860202484 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 - m_Component: - - component: {fileID: 224750055890552824} - - component: {fileID: 223970326773643042} - - component: {fileID: 114111608230438732} - - component: {fileID: 114027664712898318} - m_Layer: 5 - m_Name: RecordCanvas - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!1 &1718043064140678 -GameObject: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 - m_Component: - - component: {fileID: 224551972182140916} - - component: {fileID: 222090939836976090} - - component: {fileID: 114835062998051974} - - component: {fileID: 114111054370847366} - m_Layer: 5 - m_Name: Scrollbar - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!1 &1760730277115454 -GameObject: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 - m_Component: - - component: {fileID: 224183436407461898} - - component: {fileID: 222228502861741496} - - component: {fileID: 114219195812757004} - m_Layer: 5 - m_Name: Item Background - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!1 &1769716961495558 -GameObject: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 - m_Component: - - component: {fileID: 224822186409420238} - m_Layer: 5 - m_Name: Sliding Area - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!1 &1776728768293572 -GameObject: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 - m_Component: - - component: {fileID: 224337937757169404} - - component: {fileID: 222265661091479948} - - component: {fileID: 114543447033558644} - m_Layer: 5 - m_Name: height - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!1 &1784270305019782 -GameObject: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 - m_Component: - - component: {fileID: 224911600951096290} - - component: {fileID: 222134767074369460} - - component: {fileID: 114375349523997916} - m_Layer: 5 - m_Name: Handle - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!1 &1802008369016630 -GameObject: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 - m_Component: - - component: {fileID: 224196978540988810} - - component: {fileID: 222193590101676760} - - component: {fileID: 114779313305812770} - m_Layer: 5 - m_Name: Placeholder - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!1 &1810481247901286 -GameObject: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 - m_Component: - - component: {fileID: 224031360883251300} - - component: {fileID: 222078791621233214} - - component: {fileID: 114752592194767684} - - component: {fileID: 114150924681350426} - m_Layer: 5 - m_Name: Template - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 0 ---- !u!1 &1817284180948944 -GameObject: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 - m_Component: - - component: {fileID: 224931089488041446} - - component: {fileID: 114573729227398342} - m_Layer: 5 - m_Name: Item - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!1 &1880930781788236 -GameObject: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 - m_Component: - - component: {fileID: 224553521047720506} - - component: {fileID: 222784346158662992} - - component: {fileID: 114754743962836890} - m_Layer: 5 - m_Name: Arrow - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!1 &1903726991522894 -GameObject: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 - m_Component: - - component: {fileID: 224865001473672088} - - component: {fileID: 222357358074655402} - - component: {fileID: 114912743825833776} - - component: {fileID: 114700176064776414} - m_Layer: 5 - m_Name: MediaTypeDropdown - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!1 &1925776657366602 -GameObject: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 - m_Component: - - component: {fileID: 224067296964856838} - - component: {fileID: 222010682622104680} - - component: {fileID: 114691590056592400} - - component: {fileID: 114543735504840940} - m_Layer: 5 - m_Name: InputField - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!1 &1945272145171886 -GameObject: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 - m_Component: - - component: {fileID: 224694046305952830} - - component: {fileID: 222204470525604338} - - component: {fileID: 114521704197507828} - m_Layer: 5 - m_Name: Background - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!1 &1972300622373212 -GameObject: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 - m_Component: - - component: {fileID: 224972726501859066} - - component: {fileID: 222945716171019446} - - component: {fileID: 114593714273659410} - m_Layer: 5 - m_Name: Arrow - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!1 &1984940123108112 -GameObject: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 - m_Component: - - component: {fileID: 224103957803610084} - - component: {fileID: 222518131569563116} - - component: {fileID: 114147838277581374} - m_Layer: 5 - m_Name: Text - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &114002951280555424 -MonoBehaviour: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1615151888271038} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 0.5} - m_RaycastTarget: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - m_FontData: - m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} - m_FontSize: 14 - m_FontStyle: 2 - m_BestFit: 0 - m_MinSize: 10 - m_MaxSize: 40 - m_Alignment: 0 - m_AlignByGeometry: 0 - m_RichText: 1 - m_HorizontalOverflow: 0 - m_VerticalOverflow: 0 - m_LineSpacing: 1 - m_Text: Enter text... ---- !u!114 &114027664712898318 -MonoBehaviour: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1683477860202484} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 1301386320, guid: f70555f144d8491a825f0804e09c671c, type: 3} - m_Name: - m_EditorClassIdentifier: - m_IgnoreReversedGraphics: 1 - m_BlockingObjects: 0 - m_BlockingMask: - serializedVersion: 2 - m_Bits: 4294967295 ---- !u!114 &114033847467111682 -MonoBehaviour: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1285287974518114} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_RaycastTarget: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - m_Sprite: {fileID: 10901, guid: 0000000000000000f000000000000000, type: 0} - m_Type: 0 - m_PreserveAspect: 0 - m_FillCenter: 1 - m_FillMethod: 4 - m_FillAmount: 1 - m_FillClockwise: 1 - m_FillOrigin: 0 ---- !u!114 &114048967036655052 -MonoBehaviour: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1466704086478742} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_RaycastTarget: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - m_Sprite: {fileID: 10911, guid: 0000000000000000f000000000000000, type: 0} - m_Type: 1 - m_PreserveAspect: 0 - m_FillCenter: 1 - m_FillMethod: 4 - m_FillAmount: 1 - m_FillClockwise: 1 - m_FillOrigin: 0 ---- !u!114 &114056955898377254 -MonoBehaviour: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1205454069064386} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} - m_RaycastTarget: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - m_Sprite: {fileID: 0} - m_Type: 0 - m_PreserveAspect: 0 - m_FillCenter: 1 - m_FillMethod: 4 - m_FillAmount: 1 - m_FillClockwise: 1 - m_FillOrigin: 0 ---- !u!114 &114077748150725256 -MonoBehaviour: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1171495933492936} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 1392445389, guid: f70555f144d8491a825f0804e09c671c, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Navigation: - m_Mode: 3 - m_SelectOnUp: {fileID: 0} - m_SelectOnDown: {fileID: 0} - m_SelectOnLeft: {fileID: 0} - m_SelectOnRight: {fileID: 0} - m_Transition: 1 - m_Colors: - m_NormalColor: {r: 1, g: 1, b: 1, a: 1} - m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} - m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} - m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} - m_ColorMultiplier: 1 - m_FadeDuration: 0.1 - m_SpriteState: - m_HighlightedSprite: {fileID: 0} - m_PressedSprite: {fileID: 0} - m_DisabledSprite: {fileID: 0} - m_AnimationTriggers: - m_NormalTrigger: Normal - m_HighlightedTrigger: Highlighted - m_PressedTrigger: Pressed - m_DisabledTrigger: Disabled - m_Interactable: 1 - m_TargetGraphic: {fileID: 114281223114531426} - m_OnClick: - m_PersistentCalls: - m_Calls: - - m_Target: {fileID: 0} - m_MethodName: StopRecord - m_Mode: 1 - m_Arguments: - m_ObjectArgument: {fileID: 0} - m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine - m_IntArgument: 0 - m_FloatArgument: 0 - m_StringArgument: - m_BoolArgument: 0 - m_CallState: 2 - m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, - Culture=neutral, PublicKeyToken=null ---- !u!114 &114082787451867642 -MonoBehaviour: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1611535003885486} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_RaycastTarget: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - m_Sprite: {fileID: 10901, guid: 0000000000000000f000000000000000, type: 0} - m_Type: 0 - m_PreserveAspect: 0 - m_FillCenter: 1 - m_FillMethod: 4 - m_FillAmount: 1 - m_FillClockwise: 1 - m_FillOrigin: 0 ---- !u!114 &114095325106489608 -MonoBehaviour: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1194326070545732} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} - m_RaycastTarget: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - m_FontData: - m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} - m_FontSize: 14 - m_FontStyle: 0 - m_BestFit: 0 - m_MinSize: 10 - m_MaxSize: 40 - m_Alignment: 0 - m_AlignByGeometry: 0 - m_RichText: 0 - m_HorizontalOverflow: 0 - m_VerticalOverflow: 0 - m_LineSpacing: 1 - m_Text: ---- !u!114 &114099107854363026 -MonoBehaviour: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1209999200843122} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_RaycastTarget: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - m_Sprite: {fileID: 10907, guid: 0000000000000000f000000000000000, type: 0} - m_Type: 1 - m_PreserveAspect: 0 - m_FillCenter: 1 - m_FillMethod: 4 - m_FillAmount: 1 - m_FillClockwise: 1 - m_FillOrigin: 0 ---- !u!114 &114111054370847366 -MonoBehaviour: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1718043064140678} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: -2061169968, guid: f70555f144d8491a825f0804e09c671c, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Navigation: - m_Mode: 3 - m_SelectOnUp: {fileID: 0} - m_SelectOnDown: {fileID: 0} - m_SelectOnLeft: {fileID: 0} - m_SelectOnRight: {fileID: 0} - m_Transition: 1 - m_Colors: - m_NormalColor: {r: 1, g: 1, b: 1, a: 1} - m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} - m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} - m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} - m_ColorMultiplier: 1 - m_FadeDuration: 0.1 - m_SpriteState: - m_HighlightedSprite: {fileID: 0} - m_PressedSprite: {fileID: 0} - m_DisabledSprite: {fileID: 0} - m_AnimationTriggers: - m_NormalTrigger: Normal - m_HighlightedTrigger: Highlighted - m_PressedTrigger: Pressed - m_DisabledTrigger: Disabled - m_Interactable: 1 - m_TargetGraphic: {fileID: 114255338424412804} - m_HandleRect: {fileID: 224430133987540698} - m_Direction: 2 - m_Value: 0 - m_Size: 0.2 - m_NumberOfSteps: 0 - m_OnValueChanged: - m_PersistentCalls: - m_Calls: [] - m_TypeName: UnityEngine.UI.Scrollbar+ScrollEvent, UnityEngine.UI, Version=1.0.0.0, - Culture=neutral, PublicKeyToken=null ---- !u!114 &114111608230438732 -MonoBehaviour: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1683477860202484} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 1980459831, guid: f70555f144d8491a825f0804e09c671c, type: 3} - m_Name: - m_EditorClassIdentifier: - m_UiScaleMode: 0 - m_ReferencePixelsPerUnit: 100 - m_ScaleFactor: 1 - m_ReferenceResolution: {x: 800, y: 600} - m_ScreenMatchMode: 0 - m_MatchWidthOrHeight: 0 - m_PhysicalUnit: 3 - m_FallbackScreenDPI: 96 - m_DefaultSpriteDPI: 96 - m_DynamicPixelsPerUnit: 1 ---- !u!114 &114147529689934280 -MonoBehaviour: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1278681269429138} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} - m_RaycastTarget: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - m_FontData: - m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} - m_FontSize: 14 - m_FontStyle: 0 - m_BestFit: 0 - m_MinSize: 10 - m_MaxSize: 40 - m_Alignment: 3 - m_AlignByGeometry: 0 - m_RichText: 1 - m_HorizontalOverflow: 0 - m_VerticalOverflow: 0 - m_LineSpacing: 1 - m_Text: Option A ---- !u!114 &114147838277581374 -MonoBehaviour: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1984940123108112} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} - m_RaycastTarget: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - m_FontData: - m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} - m_FontSize: 14 - m_FontStyle: 0 - m_BestFit: 0 - m_MinSize: 10 - m_MaxSize: 40 - m_Alignment: 0 - m_AlignByGeometry: 0 - m_RichText: 0 - m_HorizontalOverflow: 0 - m_VerticalOverflow: 0 - m_LineSpacing: 1 - m_Text: ---- !u!114 &114150924681350426 -MonoBehaviour: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1810481247901286} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 1367256648, guid: f70555f144d8491a825f0804e09c671c, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Content: {fileID: 224532209984060890} - m_Horizontal: 0 - m_Vertical: 1 - m_MovementType: 2 - m_Elasticity: 0.1 - m_Inertia: 1 - m_DecelerationRate: 0.135 - m_ScrollSensitivity: 1 - m_Viewport: {fileID: 224036386431653190} - m_HorizontalScrollbar: {fileID: 0} - m_VerticalScrollbar: {fileID: 114825707329808734} - m_HorizontalScrollbarVisibility: 0 - m_VerticalScrollbarVisibility: 2 - m_HorizontalScrollbarSpacing: 0 - m_VerticalScrollbarSpacing: -3 - m_OnValueChanged: - m_PersistentCalls: - m_Calls: [] - m_TypeName: UnityEngine.UI.ScrollRect+ScrollRectEvent, UnityEngine.UI, Version=1.0.0.0, - Culture=neutral, PublicKeyToken=null ---- !u!114 &114170680294214238 -MonoBehaviour: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1194742888077830} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: -1200242548, guid: f70555f144d8491a825f0804e09c671c, type: 3} - m_Name: - m_EditorClassIdentifier: - m_ShowMaskGraphic: 0 ---- !u!114 &114182606875202126 -MonoBehaviour: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1136734350191716} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} - m_RaycastTarget: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - m_FontData: - m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} - m_FontSize: 14 - m_FontStyle: 0 - m_BestFit: 0 - m_MinSize: 10 - m_MaxSize: 40 - m_Alignment: 3 - m_AlignByGeometry: 0 - m_RichText: 1 - m_HorizontalOverflow: 0 - m_VerticalOverflow: 0 - m_LineSpacing: 1 - m_Text: Option A ---- !u!114 &114219195812757004 -MonoBehaviour: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1760730277115454} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} - m_RaycastTarget: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - m_Sprite: {fileID: 0} - m_Type: 0 - m_PreserveAspect: 0 - m_FillCenter: 1 - m_FillMethod: 4 - m_FillAmount: 1 - m_FillClockwise: 1 - m_FillOrigin: 0 ---- !u!114 &114226574336161986 -MonoBehaviour: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1205198839392206} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 0, g: 0, b: 0, a: 1} - m_RaycastTarget: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - m_FontData: - m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} - m_FontSize: 14 - m_FontStyle: 0 - m_BestFit: 0 - m_MinSize: 10 - m_MaxSize: 40 - m_Alignment: 0 - m_AlignByGeometry: 0 - m_RichText: 1 - m_HorizontalOverflow: 0 - m_VerticalOverflow: 0 - m_LineSpacing: 1 - m_Text: 'width: - -' ---- !u!114 &114255338424412804 -MonoBehaviour: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1053867868926598} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_RaycastTarget: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} - m_Type: 1 - m_PreserveAspect: 0 - m_FillCenter: 1 - m_FillMethod: 4 - m_FillAmount: 1 - m_FillClockwise: 1 - m_FillOrigin: 0 ---- !u!114 &114273955731409796 -MonoBehaviour: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1622947744469346} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 1392445389, guid: f70555f144d8491a825f0804e09c671c, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Navigation: - m_Mode: 3 - m_SelectOnUp: {fileID: 0} - m_SelectOnDown: {fileID: 0} - m_SelectOnLeft: {fileID: 0} - m_SelectOnRight: {fileID: 0} - m_Transition: 1 - m_Colors: - m_NormalColor: {r: 1, g: 1, b: 1, a: 1} - m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} - m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} - m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} - m_ColorMultiplier: 1 - m_FadeDuration: 0.1 - m_SpriteState: - m_HighlightedSprite: {fileID: 0} - m_PressedSprite: {fileID: 0} - m_DisabledSprite: {fileID: 0} - m_AnimationTriggers: - m_NormalTrigger: Normal - m_HighlightedTrigger: Highlighted - m_PressedTrigger: Pressed - m_DisabledTrigger: Disabled - m_Interactable: 1 - m_TargetGraphic: {fileID: 114986231427705664} - m_OnClick: - m_PersistentCalls: - m_Calls: - - m_Target: {fileID: 0} - m_MethodName: StartRecord - m_Mode: 5 - m_Arguments: - m_ObjectArgument: {fileID: 0} - m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine - m_IntArgument: 0 - m_FloatArgument: 0 - m_StringArgument: - m_BoolArgument: 0 - m_CallState: 2 - m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, - Culture=neutral, PublicKeyToken=null ---- !u!114 &114281223114531426 -MonoBehaviour: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1171495933492936} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_RaycastTarget: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} - m_Type: 1 - m_PreserveAspect: 0 - m_FillCenter: 1 - m_FillMethod: 4 - m_FillAmount: 1 - m_FillClockwise: 1 - m_FillOrigin: 0 ---- !u!114 &114338185181858346 -MonoBehaviour: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1378521199301692} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_RaycastTarget: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - m_Sprite: {fileID: 10917, guid: 0000000000000000f000000000000000, type: 0} - m_Type: 1 - m_PreserveAspect: 0 - m_FillCenter: 1 - m_FillMethod: 4 - m_FillAmount: 1 - m_FillClockwise: 1 - m_FillOrigin: 0 ---- !u!114 &114375349523997916 -MonoBehaviour: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1784270305019782} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_RaycastTarget: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} - m_Type: 1 - m_PreserveAspect: 0 - m_FillCenter: 1 - m_FillMethod: 4 - m_FillAmount: 1 - m_FillClockwise: 1 - m_FillOrigin: 0 ---- !u!114 &114377830397789518 -MonoBehaviour: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1466704086478742} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 575553740, guid: f70555f144d8491a825f0804e09c671c, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Navigation: - m_Mode: 3 - m_SelectOnUp: {fileID: 0} - m_SelectOnDown: {fileID: 0} - m_SelectOnLeft: {fileID: 0} - m_SelectOnRight: {fileID: 0} - m_Transition: 1 - m_Colors: - m_NormalColor: {r: 1, g: 1, b: 1, a: 1} - m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} - m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} - m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} - m_ColorMultiplier: 1 - m_FadeDuration: 0.1 - m_SpriteState: - m_HighlightedSprite: {fileID: 0} - m_PressedSprite: {fileID: 0} - m_DisabledSprite: {fileID: 0} - m_AnimationTriggers: - m_NormalTrigger: Normal - m_HighlightedTrigger: Highlighted - m_PressedTrigger: Pressed - m_DisabledTrigger: Disabled - m_Interactable: 1 - m_TargetGraphic: {fileID: 114048967036655052} - m_TextComponent: {fileID: 114459953521014792} - m_Placeholder: {fileID: 114002951280555424} - m_ContentType: 0 - m_InputType: 0 - m_AsteriskChar: 42 - m_KeyboardType: 0 - m_LineType: 0 - m_HideMobileInput: 0 - m_CharacterValidation: 0 - m_CharacterLimit: 0 - m_OnEndEdit: - m_PersistentCalls: - m_Calls: [] - m_TypeName: UnityEngine.UI.InputField+SubmitEvent, UnityEngine.UI, Version=1.0.0.0, - Culture=neutral, PublicKeyToken=null - m_OnValueChanged: - m_PersistentCalls: - m_Calls: [] - m_TypeName: UnityEngine.UI.InputField+OnChangeEvent, UnityEngine.UI, Version=1.0.0.0, - Culture=neutral, PublicKeyToken=null - m_CaretColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} - m_CustomCaretColor: 0 - m_SelectionColor: {r: 0.65882355, g: 0.80784315, b: 1, a: 0.7529412} - m_Text: - m_CaretBlinkRate: 0.85 - m_CaretWidth: 1 - m_ReadOnly: 0 ---- !u!114 &114379628466674502 -MonoBehaviour: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1223388733743224} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 0.378} - m_RaycastTarget: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - m_Sprite: {fileID: 10907, guid: 0000000000000000f000000000000000, type: 0} - m_Type: 1 - m_PreserveAspect: 0 - m_FillCenter: 1 - m_FillMethod: 4 - m_FillAmount: 1 - m_FillClockwise: 1 - m_FillOrigin: 0 ---- !u!114 &114389815384225456 -MonoBehaviour: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1114891166118942} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} - m_RaycastTarget: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - m_FontData: - m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} - m_FontSize: 14 - m_FontStyle: 0 - m_BestFit: 0 - m_MinSize: 10 - m_MaxSize: 40 - m_Alignment: 4 - m_AlignByGeometry: 0 - m_RichText: 1 - m_HorizontalOverflow: 0 - m_VerticalOverflow: 0 - m_LineSpacing: 1 - m_Text: 'StopRecord - - -' ---- !u!114 &114405193141465864 -MonoBehaviour: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1194742888077830} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_RaycastTarget: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - m_Sprite: {fileID: 10917, guid: 0000000000000000f000000000000000, type: 0} - m_Type: 1 - m_PreserveAspect: 0 - m_FillCenter: 1 - m_FillMethod: 4 - m_FillAmount: 1 - m_FillClockwise: 1 - m_FillOrigin: 0 ---- !u!114 &114410523750902432 -MonoBehaviour: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1222729158489494} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 0, g: 0, b: 0, a: 1} - m_RaycastTarget: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - m_FontData: - m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} - m_FontSize: 14 - m_FontStyle: 0 - m_BestFit: 0 - m_MinSize: 10 - m_MaxSize: 40 - m_Alignment: 0 - m_AlignByGeometry: 0 - m_RichText: 1 - m_HorizontalOverflow: 0 - m_VerticalOverflow: 0 - m_LineSpacing: 1 - m_Text: 'FileName: - -' ---- !u!114 &114459953521014792 -MonoBehaviour: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1674267795944008} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} - m_RaycastTarget: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - m_FontData: - m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} - m_FontSize: 14 - m_FontStyle: 0 - m_BestFit: 0 - m_MinSize: 10 - m_MaxSize: 40 - m_Alignment: 0 - m_AlignByGeometry: 0 - m_RichText: 0 - m_HorizontalOverflow: 0 - m_VerticalOverflow: 0 - m_LineSpacing: 1 - m_Text: ---- !u!114 &114485887214570058 -MonoBehaviour: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1365424548565418} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 2109663825, guid: f70555f144d8491a825f0804e09c671c, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Navigation: - m_Mode: 3 - m_SelectOnUp: {fileID: 0} - m_SelectOnDown: {fileID: 0} - m_SelectOnLeft: {fileID: 0} - m_SelectOnRight: {fileID: 0} - m_Transition: 1 - m_Colors: - m_NormalColor: {r: 1, g: 1, b: 1, a: 1} - m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} - m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} - m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} - m_ColorMultiplier: 1 - m_FadeDuration: 0.1 - m_SpriteState: - m_HighlightedSprite: {fileID: 0} - m_PressedSprite: {fileID: 0} - m_DisabledSprite: {fileID: 0} - m_AnimationTriggers: - m_NormalTrigger: Normal - m_HighlightedTrigger: Highlighted - m_PressedTrigger: Pressed - m_DisabledTrigger: Disabled - m_Interactable: 1 - m_TargetGraphic: {fileID: 114521704197507828} - toggleTransition: 1 - graphic: {fileID: 114601883818866216} - m_Group: {fileID: 0} - onValueChanged: - m_PersistentCalls: - m_Calls: [] - m_TypeName: UnityEngine.UI.Toggle+ToggleEvent, UnityEngine.UI, Version=1.0.0.0, - Culture=neutral, PublicKeyToken=null - m_IsOn: 0 ---- !u!114 &114521704197507828 -MonoBehaviour: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1945272145171886} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_RaycastTarget: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} - m_Type: 1 - m_PreserveAspect: 0 - m_FillCenter: 1 - m_FillMethod: 4 - m_FillAmount: 1 - m_FillClockwise: 1 - m_FillOrigin: 0 ---- !u!114 &114528902097037526 -MonoBehaviour: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1378521199301692} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: -1200242548, guid: f70555f144d8491a825f0804e09c671c, type: 3} - m_Name: - m_EditorClassIdentifier: - m_ShowMaskGraphic: 0 ---- !u!114 &114530496058363768 -MonoBehaviour: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1410875726181524} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 0.5} - m_RaycastTarget: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - m_FontData: - m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} - m_FontSize: 14 - m_FontStyle: 2 - m_BestFit: 0 - m_MinSize: 10 - m_MaxSize: 40 - m_Alignment: 0 - m_AlignByGeometry: 0 - m_RichText: 1 - m_HorizontalOverflow: 0 - m_VerticalOverflow: 0 - m_LineSpacing: 1 - m_Text: Enter text... ---- !u!114 &114543447033558644 -MonoBehaviour: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1776728768293572} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 0, g: 0, b: 0, a: 1} - m_RaycastTarget: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - m_FontData: - m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} - m_FontSize: 14 - m_FontStyle: 0 - m_BestFit: 0 - m_MinSize: 10 - m_MaxSize: 40 - m_Alignment: 0 - m_AlignByGeometry: 0 - m_RichText: 1 - m_HorizontalOverflow: 0 - m_VerticalOverflow: 0 - m_LineSpacing: 1 - m_Text: 'height: - -' ---- !u!114 &114543735504840940 -MonoBehaviour: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1925776657366602} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 575553740, guid: f70555f144d8491a825f0804e09c671c, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Navigation: - m_Mode: 3 - m_SelectOnUp: {fileID: 0} - m_SelectOnDown: {fileID: 0} - m_SelectOnLeft: {fileID: 0} - m_SelectOnRight: {fileID: 0} - m_Transition: 1 - m_Colors: - m_NormalColor: {r: 1, g: 1, b: 1, a: 1} - m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} - m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} - m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} - m_ColorMultiplier: 1 - m_FadeDuration: 0.1 - m_SpriteState: - m_HighlightedSprite: {fileID: 0} - m_PressedSprite: {fileID: 0} - m_DisabledSprite: {fileID: 0} - m_AnimationTriggers: - m_NormalTrigger: Normal - m_HighlightedTrigger: Highlighted - m_PressedTrigger: Pressed - m_DisabledTrigger: Disabled - m_Interactable: 1 - m_TargetGraphic: {fileID: 114691590056592400} - m_TextComponent: {fileID: 114095325106489608} - m_Placeholder: {fileID: 114530496058363768} - m_ContentType: 0 - m_InputType: 0 - m_AsteriskChar: 42 - m_KeyboardType: 0 - m_LineType: 0 - m_HideMobileInput: 0 - m_CharacterValidation: 0 - m_CharacterLimit: 0 - m_OnEndEdit: - m_PersistentCalls: - m_Calls: [] - m_TypeName: UnityEngine.UI.InputField+SubmitEvent, UnityEngine.UI, Version=1.0.0.0, - Culture=neutral, PublicKeyToken=null - m_OnValueChanged: - m_PersistentCalls: - m_Calls: [] - m_TypeName: UnityEngine.UI.InputField+OnChangeEvent, UnityEngine.UI, Version=1.0.0.0, - Culture=neutral, PublicKeyToken=null - m_CaretColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} - m_CustomCaretColor: 0 - m_SelectionColor: {r: 0.65882355, g: 0.80784315, b: 1, a: 0.7529412} - m_Text: - m_CaretBlinkRate: 0.85 - m_CaretWidth: 1 - m_ReadOnly: 0 ---- !u!114 &114573729227398342 -MonoBehaviour: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1817284180948944} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 2109663825, guid: f70555f144d8491a825f0804e09c671c, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Navigation: - m_Mode: 3 - m_SelectOnUp: {fileID: 0} - m_SelectOnDown: {fileID: 0} - m_SelectOnLeft: {fileID: 0} - m_SelectOnRight: {fileID: 0} - m_Transition: 1 - m_Colors: - m_NormalColor: {r: 1, g: 1, b: 1, a: 1} - m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} - m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} - m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} - m_ColorMultiplier: 1 - m_FadeDuration: 0.1 - m_SpriteState: - m_HighlightedSprite: {fileID: 0} - m_PressedSprite: {fileID: 0} - m_DisabledSprite: {fileID: 0} - m_AnimationTriggers: - m_NormalTrigger: Normal - m_HighlightedTrigger: Highlighted - m_PressedTrigger: Pressed - m_DisabledTrigger: Disabled - m_Interactable: 1 - m_TargetGraphic: {fileID: 114219195812757004} - toggleTransition: 1 - graphic: {fileID: 114033847467111682} - m_Group: {fileID: 0} - onValueChanged: - m_PersistentCalls: - m_Calls: [] - m_TypeName: UnityEngine.UI.Toggle+ToggleEvent, UnityEngine.UI, Version=1.0.0.0, - Culture=neutral, PublicKeyToken=null - m_IsOn: 1 ---- !u!114 &114593714273659410 -MonoBehaviour: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1972300622373212} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_RaycastTarget: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - m_Sprite: {fileID: 10915, guid: 0000000000000000f000000000000000, type: 0} - m_Type: 0 - m_PreserveAspect: 0 - m_FillCenter: 1 - m_FillMethod: 4 - m_FillAmount: 1 - m_FillClockwise: 1 - m_FillOrigin: 0 ---- !u!114 &114601883818866216 -MonoBehaviour: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1319008405611144} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 1, g: 0, b: 0, a: 1} - m_RaycastTarget: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - m_Sprite: {fileID: 10911, guid: 0000000000000000f000000000000000, type: 0} - m_Type: 1 - m_PreserveAspect: 0 - m_FillCenter: 1 - m_FillMethod: 4 - m_FillAmount: 1 - m_FillClockwise: 1 - m_FillOrigin: 0 ---- !u!114 &114641345758052252 -MonoBehaviour: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1071273511658648} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} - m_RaycastTarget: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - m_FontData: - m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} - m_FontSize: 14 - m_FontStyle: 0 - m_BestFit: 0 - m_MinSize: 10 - m_MaxSize: 40 - m_Alignment: 3 - m_AlignByGeometry: 0 - m_RichText: 1 - m_HorizontalOverflow: 0 - m_VerticalOverflow: 0 - m_LineSpacing: 1 - m_Text: ---- !u!114 &114647166756314526 -MonoBehaviour: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1273470284527834} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} - m_RaycastTarget: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - m_FontData: - m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} - m_FontSize: 14 - m_FontStyle: 0 - m_BestFit: 0 - m_MinSize: 10 - m_MaxSize: 40 - m_Alignment: 0 - m_AlignByGeometry: 0 - m_RichText: 1 - m_HorizontalOverflow: 0 - m_VerticalOverflow: 0 - m_LineSpacing: 1 - m_Text: 'RecordState - -' ---- !u!114 &114691590056592400 -MonoBehaviour: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1925776657366602} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_RaycastTarget: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - m_Sprite: {fileID: 10911, guid: 0000000000000000f000000000000000, type: 0} - m_Type: 1 - m_PreserveAspect: 0 - m_FillCenter: 1 - m_FillMethod: 4 - m_FillAmount: 1 - m_FillClockwise: 1 - m_FillOrigin: 0 ---- !u!114 &114700176064776414 -MonoBehaviour: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1903726991522894} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 853051423, guid: f70555f144d8491a825f0804e09c671c, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Navigation: - m_Mode: 3 - m_SelectOnUp: {fileID: 0} - m_SelectOnDown: {fileID: 0} - m_SelectOnLeft: {fileID: 0} - m_SelectOnRight: {fileID: 0} - m_Transition: 1 - m_Colors: - m_NormalColor: {r: 1, g: 1, b: 1, a: 1} - m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} - m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} - m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} - m_ColorMultiplier: 1 - m_FadeDuration: 0.1 - m_SpriteState: - m_HighlightedSprite: {fileID: 0} - m_PressedSprite: {fileID: 0} - m_DisabledSprite: {fileID: 0} - m_AnimationTriggers: - m_NormalTrigger: Normal - m_HighlightedTrigger: Highlighted - m_PressedTrigger: Pressed - m_DisabledTrigger: Disabled - m_Interactable: 1 - m_TargetGraphic: {fileID: 114912743825833776} - m_Template: {fileID: 224378216432443654} - m_CaptionText: {fileID: 114641345758052252} - m_CaptionImage: {fileID: 0} - m_ItemText: {fileID: 114147529689934280} - m_ItemImage: {fileID: 0} - m_Value: 0 - m_Options: - m_Options: [] - m_OnValueChanged: - m_PersistentCalls: - m_Calls: - - m_Target: {fileID: 0} - m_MethodName: - m_Mode: 1 - m_Arguments: - m_ObjectArgument: {fileID: 0} - m_ObjectArgumentAssemblyTypeName: - m_IntArgument: 0 - m_FloatArgument: 0 - m_StringArgument: - m_BoolArgument: 0 - m_CallState: 2 - m_TypeName: UnityEngine.UI.Dropdown+DropdownEvent, UnityEngine.UI, Version=1.0.0.0, - Culture=neutral, PublicKeyToken=null ---- !u!114 &114708852883859586 -MonoBehaviour: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1146655228816972} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 853051423, guid: f70555f144d8491a825f0804e09c671c, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Navigation: - m_Mode: 3 - m_SelectOnUp: {fileID: 0} - m_SelectOnDown: {fileID: 0} - m_SelectOnLeft: {fileID: 0} - m_SelectOnRight: {fileID: 0} - m_Transition: 1 - m_Colors: - m_NormalColor: {r: 1, g: 1, b: 1, a: 1} - m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} - m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} - m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} - m_ColorMultiplier: 1 - m_FadeDuration: 0.1 - m_SpriteState: - m_HighlightedSprite: {fileID: 0} - m_PressedSprite: {fileID: 0} - m_DisabledSprite: {fileID: 0} - m_AnimationTriggers: - m_NormalTrigger: Normal - m_HighlightedTrigger: Highlighted - m_PressedTrigger: Pressed - m_DisabledTrigger: Disabled - m_Interactable: 1 - m_TargetGraphic: {fileID: 114748431494947150} - m_Template: {fileID: 224031360883251300} - m_CaptionText: {fileID: 114788812521373876} - m_CaptionImage: {fileID: 0} - m_ItemText: {fileID: 114182606875202126} - m_ItemImage: {fileID: 0} - m_Value: 0 - m_Options: - m_Options: [] - m_OnValueChanged: - m_PersistentCalls: - m_Calls: [] - m_TypeName: UnityEngine.UI.Dropdown+DropdownEvent, UnityEngine.UI, Version=1.0.0.0, - Culture=neutral, PublicKeyToken=null ---- !u!114 &114742734366898342 -MonoBehaviour: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1156037266301788} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 575553740, guid: f70555f144d8491a825f0804e09c671c, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Navigation: - m_Mode: 3 - m_SelectOnUp: {fileID: 0} - m_SelectOnDown: {fileID: 0} - m_SelectOnLeft: {fileID: 0} - m_SelectOnRight: {fileID: 0} - m_Transition: 1 - m_Colors: - m_NormalColor: {r: 1, g: 1, b: 1, a: 1} - m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} - m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} - m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} - m_ColorMultiplier: 1 - m_FadeDuration: 0.1 - m_SpriteState: - m_HighlightedSprite: {fileID: 0} - m_PressedSprite: {fileID: 0} - m_DisabledSprite: {fileID: 0} - m_AnimationTriggers: - m_NormalTrigger: Normal - m_HighlightedTrigger: Highlighted - m_PressedTrigger: Pressed - m_DisabledTrigger: Disabled - m_Interactable: 1 - m_TargetGraphic: {fileID: 114868221367244812} - m_TextComponent: {fileID: 114147838277581374} - m_Placeholder: {fileID: 114779313305812770} - m_ContentType: 0 - m_InputType: 0 - m_AsteriskChar: 42 - m_KeyboardType: 0 - m_LineType: 0 - m_HideMobileInput: 0 - m_CharacterValidation: 0 - m_CharacterLimit: 0 - m_OnEndEdit: - m_PersistentCalls: - m_Calls: [] - m_TypeName: UnityEngine.UI.InputField+SubmitEvent, UnityEngine.UI, Version=1.0.0.0, - Culture=neutral, PublicKeyToken=null - m_OnValueChanged: - m_PersistentCalls: - m_Calls: [] - m_TypeName: UnityEngine.UI.InputField+OnChangeEvent, UnityEngine.UI, Version=1.0.0.0, - Culture=neutral, PublicKeyToken=null - m_CaretColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} - m_CustomCaretColor: 0 - m_SelectionColor: {r: 0.65882355, g: 0.80784315, b: 1, a: 0.7529412} - m_Text: - m_CaretBlinkRate: 0.85 - m_CaretWidth: 1 - m_ReadOnly: 0 ---- !u!114 &114748431494947150 -MonoBehaviour: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1146655228816972} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_RaycastTarget: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} - m_Type: 1 - m_PreserveAspect: 0 - m_FillCenter: 1 - m_FillMethod: 4 - m_FillAmount: 1 - m_FillClockwise: 1 - m_FillOrigin: 0 ---- !u!114 &114750242749669068 -MonoBehaviour: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1425559644864892} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 0, g: 0, b: 0, a: 1} - m_RaycastTarget: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - m_FontData: - m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} - m_FontSize: 14 - m_FontStyle: 0 - m_BestFit: 0 - m_MinSize: 10 - m_MaxSize: 40 - m_Alignment: 0 - m_AlignByGeometry: 0 - m_RichText: 1 - m_HorizontalOverflow: 0 - m_VerticalOverflow: 0 - m_LineSpacing: 1 - m_Text: 'RecordTime: - -' ---- !u!114 &114752592194767684 -MonoBehaviour: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1810481247901286} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_RaycastTarget: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} - m_Type: 1 - m_PreserveAspect: 0 - m_FillCenter: 1 - m_FillMethod: 4 - m_FillAmount: 1 - m_FillClockwise: 1 - m_FillOrigin: 0 ---- !u!114 &114754743962836890 -MonoBehaviour: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1880930781788236} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_RaycastTarget: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - m_Sprite: {fileID: 10915, guid: 0000000000000000f000000000000000, type: 0} - m_Type: 0 - m_PreserveAspect: 0 - m_FillCenter: 1 - m_FillMethod: 4 - m_FillAmount: 1 - m_FillClockwise: 1 - m_FillOrigin: 0 ---- !u!114 &114779313305812770 -MonoBehaviour: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1802008369016630} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 0.5} - m_RaycastTarget: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - m_FontData: - m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} - m_FontSize: 14 - m_FontStyle: 2 - m_BestFit: 0 - m_MinSize: 10 - m_MaxSize: 40 - m_Alignment: 0 - m_AlignByGeometry: 0 - m_RichText: 1 - m_HorizontalOverflow: 0 - m_VerticalOverflow: 0 - m_LineSpacing: 1 - m_Text: Enter text... ---- !u!114 &114779654440848942 -MonoBehaviour: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1346866193198636} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_RaycastTarget: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} - m_Type: 1 - m_PreserveAspect: 0 - m_FillCenter: 1 - m_FillMethod: 4 - m_FillAmount: 1 - m_FillClockwise: 1 - m_FillOrigin: 0 ---- !u!114 &114788812521373876 -MonoBehaviour: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1335145532329742} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} - m_RaycastTarget: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - m_FontData: - m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} - m_FontSize: 14 - m_FontStyle: 0 - m_BestFit: 0 - m_MinSize: 10 - m_MaxSize: 40 - m_Alignment: 3 - m_AlignByGeometry: 0 - m_RichText: 1 - m_HorizontalOverflow: 0 - m_VerticalOverflow: 0 - m_LineSpacing: 1 - m_Text: ---- !u!114 &114798403468417846 -MonoBehaviour: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1116272002658940} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} - m_RaycastTarget: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - m_FontData: - m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} - m_FontSize: 14 - m_FontStyle: 0 - m_BestFit: 0 - m_MinSize: 10 - m_MaxSize: 40 - m_Alignment: 0 - m_AlignByGeometry: 0 - m_RichText: 1 - m_HorizontalOverflow: 0 - m_VerticalOverflow: 0 - m_LineSpacing: 1 - m_Text: '0 - -' ---- !u!114 &114825707329808734 -MonoBehaviour: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1209999200843122} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: -2061169968, guid: f70555f144d8491a825f0804e09c671c, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Navigation: - m_Mode: 3 - m_SelectOnUp: {fileID: 0} - m_SelectOnDown: {fileID: 0} - m_SelectOnLeft: {fileID: 0} - m_SelectOnRight: {fileID: 0} - m_Transition: 1 - m_Colors: - m_NormalColor: {r: 1, g: 1, b: 1, a: 1} - m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} - m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} - m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} - m_ColorMultiplier: 1 - m_FadeDuration: 0.1 - m_SpriteState: - m_HighlightedSprite: {fileID: 0} - m_PressedSprite: {fileID: 0} - m_DisabledSprite: {fileID: 0} - m_AnimationTriggers: - m_NormalTrigger: Normal - m_HighlightedTrigger: Highlighted - m_PressedTrigger: Pressed - m_DisabledTrigger: Disabled - m_Interactable: 1 - m_TargetGraphic: {fileID: 114375349523997916} - m_HandleRect: {fileID: 224911600951096290} - m_Direction: 2 - m_Value: 0 - m_Size: 0.2 - m_NumberOfSteps: 0 - m_OnValueChanged: - m_PersistentCalls: - m_Calls: [] - m_TypeName: UnityEngine.UI.Scrollbar+ScrollEvent, UnityEngine.UI, Version=1.0.0.0, - Culture=neutral, PublicKeyToken=null ---- !u!114 &114835062998051974 -MonoBehaviour: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1718043064140678} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_RaycastTarget: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - m_Sprite: {fileID: 10907, guid: 0000000000000000f000000000000000, type: 0} - m_Type: 1 - m_PreserveAspect: 0 - m_FillCenter: 1 - m_FillMethod: 4 - m_FillAmount: 1 - m_FillClockwise: 1 - m_FillOrigin: 0 ---- !u!114 &114865360280230468 -MonoBehaviour: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1615722501258778} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} - m_RaycastTarget: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - m_FontData: - m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} - m_FontSize: 14 - m_FontStyle: 0 - m_BestFit: 0 - m_MinSize: 10 - m_MaxSize: 40 - m_Alignment: 4 - m_AlignByGeometry: 0 - m_RichText: 1 - m_HorizontalOverflow: 0 - m_VerticalOverflow: 0 - m_LineSpacing: 1 - m_Text: 'StartRecord - -' ---- !u!114 &114868221367244812 -MonoBehaviour: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1156037266301788} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_RaycastTarget: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - m_Sprite: {fileID: 10911, guid: 0000000000000000f000000000000000, type: 0} - m_Type: 1 - m_PreserveAspect: 0 - m_FillCenter: 1 - m_FillMethod: 4 - m_FillAmount: 1 - m_FillClockwise: 1 - m_FillOrigin: 0 ---- !u!114 &114876977076085766 -MonoBehaviour: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1122039539439108} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 2109663825, guid: f70555f144d8491a825f0804e09c671c, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Navigation: - m_Mode: 3 - m_SelectOnUp: {fileID: 0} - m_SelectOnDown: {fileID: 0} - m_SelectOnLeft: {fileID: 0} - m_SelectOnRight: {fileID: 0} - m_Transition: 1 - m_Colors: - m_NormalColor: {r: 1, g: 1, b: 1, a: 1} - m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} - m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} - m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} - m_ColorMultiplier: 1 - m_FadeDuration: 0.1 - m_SpriteState: - m_HighlightedSprite: {fileID: 0} - m_PressedSprite: {fileID: 0} - m_DisabledSprite: {fileID: 0} - m_AnimationTriggers: - m_NormalTrigger: Normal - m_HighlightedTrigger: Highlighted - m_PressedTrigger: Pressed - m_DisabledTrigger: Disabled - m_Interactable: 1 - m_TargetGraphic: {fileID: 114056955898377254} - toggleTransition: 1 - graphic: {fileID: 114082787451867642} - m_Group: {fileID: 0} - onValueChanged: - m_PersistentCalls: - m_Calls: [] - m_TypeName: UnityEngine.UI.Toggle+ToggleEvent, UnityEngine.UI, Version=1.0.0.0, - Culture=neutral, PublicKeyToken=null - m_IsOn: 1 ---- !u!114 &114912743825833776 -MonoBehaviour: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1903726991522894} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_RaycastTarget: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} - m_Type: 1 - m_PreserveAspect: 0 - m_FillCenter: 1 - m_FillMethod: 4 - m_FillAmount: 1 - m_FillClockwise: 1 - m_FillOrigin: 0 ---- !u!114 &114950229178183774 -MonoBehaviour: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1346866193198636} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 1367256648, guid: f70555f144d8491a825f0804e09c671c, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Content: {fileID: 224978212606780970} - m_Horizontal: 0 - m_Vertical: 1 - m_MovementType: 2 - m_Elasticity: 0.1 - m_Inertia: 1 - m_DecelerationRate: 0.135 - m_ScrollSensitivity: 1 - m_Viewport: {fileID: 224135309993760688} - m_HorizontalScrollbar: {fileID: 0} - m_VerticalScrollbar: {fileID: 114111054370847366} - m_HorizontalScrollbarVisibility: 0 - m_VerticalScrollbarVisibility: 2 - m_HorizontalScrollbarSpacing: 0 - m_VerticalScrollbarSpacing: -3 - m_OnValueChanged: - m_PersistentCalls: - m_Calls: [] - m_TypeName: UnityEngine.UI.ScrollRect+ScrollRectEvent, UnityEngine.UI, Version=1.0.0.0, - Culture=neutral, PublicKeyToken=null ---- !u!114 &114986231427705664 -MonoBehaviour: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1622947744469346} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_RaycastTarget: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} - m_Type: 1 - m_PreserveAspect: 0 - m_FillCenter: 1 - m_FillMethod: 4 - m_FillAmount: 1 - m_FillClockwise: 1 - m_FillOrigin: 0 ---- !u!222 &222006487930088898 -CanvasRenderer: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1136734350191716} ---- !u!222 &222007706455120890 -CanvasRenderer: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1194742888077830} ---- !u!222 &222010682622104680 -CanvasRenderer: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1925776657366602} ---- !u!222 &222020243885190668 -CanvasRenderer: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1209999200843122} ---- !u!222 &222078791621233214 -CanvasRenderer: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1810481247901286} ---- !u!222 &222082099825021604 -CanvasRenderer: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1114891166118942} ---- !u!222 &222090939836976090 -CanvasRenderer: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1718043064140678} ---- !u!222 &222119216146662160 -CanvasRenderer: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1071273511658648} ---- !u!222 &222134767074369460 -CanvasRenderer: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1784270305019782} ---- !u!222 &222138609473104568 -CanvasRenderer: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1410875726181524} ---- !u!222 &222163541359230918 -CanvasRenderer: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1615151888271038} ---- !u!222 &222167218666973228 -CanvasRenderer: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1615722501258778} ---- !u!222 &222169746277937314 -CanvasRenderer: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1146655228816972} ---- !u!222 &222189462641508826 -CanvasRenderer: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1205198839392206} ---- !u!222 &222193590101676760 -CanvasRenderer: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1802008369016630} ---- !u!222 &222204470525604338 -CanvasRenderer: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1945272145171886} ---- !u!222 &222228502861741496 -CanvasRenderer: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1760730277115454} ---- !u!222 &222260356022017046 -CanvasRenderer: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1273470284527834} ---- !u!222 &222265661091479948 -CanvasRenderer: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1776728768293572} ---- !u!222 &222288253473505990 -CanvasRenderer: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1346866193198636} ---- !u!222 &222336695259681702 -CanvasRenderer: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1622947744469346} ---- !u!222 &222357358074655402 -CanvasRenderer: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1903726991522894} ---- !u!222 &222398322778389224 -CanvasRenderer: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1378521199301692} ---- !u!222 &222398817325617946 -CanvasRenderer: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1116272002658940} ---- !u!222 &222458881194464196 -CanvasRenderer: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1222729158489494} ---- !u!222 &222469912823031248 -CanvasRenderer: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1156037266301788} ---- !u!222 &222518131569563116 -CanvasRenderer: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1984940123108112} ---- !u!222 &222593529661460496 -CanvasRenderer: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1053867868926598} ---- !u!222 &222612771672125310 -CanvasRenderer: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1335145532329742} ---- !u!222 &222623196383362590 -CanvasRenderer: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1674267795944008} ---- !u!222 &222654125856886610 -CanvasRenderer: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1425559644864892} ---- !u!222 &222686890273848612 -CanvasRenderer: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1171495933492936} ---- !u!222 &222695757404378718 -CanvasRenderer: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1466704086478742} ---- !u!222 &222773038544021408 -CanvasRenderer: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1285287974518114} ---- !u!222 &222784346158662992 -CanvasRenderer: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1880930781788236} ---- !u!222 &222809068333485684 -CanvasRenderer: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1319008405611144} ---- !u!222 &222809320756377766 -CanvasRenderer: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1223388733743224} ---- !u!222 &222915711469505324 -CanvasRenderer: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1194326070545732} ---- !u!222 &222915937853727880 -CanvasRenderer: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1205454069064386} ---- !u!222 &222935324305847694 -CanvasRenderer: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1611535003885486} ---- !u!222 &222939621825280210 -CanvasRenderer: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1278681269429138} ---- !u!222 &222945716171019446 -CanvasRenderer: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1972300622373212} ---- !u!223 &223970326773643042 -Canvas: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1683477860202484} - m_Enabled: 1 - serializedVersion: 2 - m_RenderMode: 0 - m_Camera: {fileID: 0} - m_PlaneDistance: 100 - m_PixelPerfect: 0 - m_ReceivesEvents: 1 - m_OverrideSorting: 0 - m_OverridePixelPerfect: 0 - m_SortingBucketNormalizedSize: 0 - m_SortingLayerID: 0 - m_SortingOrder: 0 - m_TargetDisplay: 0 ---- !u!224 &224010710242658290 -RectTransform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1278681269429138} - 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: [] - m_Father: {fileID: 224877248440474384} - m_RootOrder: 2 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 5, y: -0.5} - m_SizeDelta: {x: -30, y: -3} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!224 &224031360883251300 -RectTransform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1810481247901286} - 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: 224036386431653190} - - {fileID: 224559175407133318} - m_Father: {fileID: 224661951961207604} - m_RootOrder: 2 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 1, y: 0} - m_AnchoredPosition: {x: 0, y: 2} - m_SizeDelta: {x: 0, y: 150} - m_Pivot: {x: 0.5, y: 1} ---- !u!224 &224036386431653190 -RectTransform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1194742888077830} - 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: 224532209984060890} - m_Father: {fileID: 224031360883251300} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: -18, y: 0} - m_Pivot: {x: 0, y: 1} ---- !u!224 &224067296964856838 -RectTransform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1925776657366602} - 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: 224519098732573966} - - {fileID: 224371158476086740} - m_Father: {fileID: 224337937757169404} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0.5, y: 0.5} - m_AnchorMax: {x: 0.5, y: 0.5} - m_AnchoredPosition: {x: 4.4, y: 7.2} - m_SizeDelta: {x: 100, y: 30} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!224 &224083160386940978 -RectTransform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1319008405611144} - 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: [] - m_Father: {fileID: 224694046305952830} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0.5, y: 0.5} - m_AnchorMax: {x: 0.5, y: 0.5} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 20, y: 20} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!224 &224103957803610084 -RectTransform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1984940123108112} - 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: [] - m_Father: {fileID: 224978000126982346} - m_RootOrder: 1 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 0, y: -0.5} - m_SizeDelta: {x: -20, y: -13} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!224 &224135309993760688 -RectTransform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1378521199301692} - 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: 224978212606780970} - m_Father: {fileID: 224378216432443654} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: -18, y: 0} - m_Pivot: {x: 0, y: 1} ---- !u!224 &224136708758155110 -RectTransform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1071273511658648} - 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: [] - m_Father: {fileID: 224865001473672088} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: -7.5, y: -0.5} - m_SizeDelta: {x: -35, y: -13} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!224 &224183436407461898 -RectTransform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1760730277115454} - 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: [] - m_Father: {fileID: 224931089488041446} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 0} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!224 &224196978540988810 -RectTransform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1802008369016630} - 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: [] - m_Father: {fileID: 224978000126982346} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 0, y: -0.5} - m_SizeDelta: {x: -20, y: -13} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!224 &224225807032217706 -RectTransform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1425559644864892} - 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: 224309315879895698} - m_Father: {fileID: 224424652463235604} - m_RootOrder: 5 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0.5, y: 0.5} - m_AnchorMax: {x: 0.5, y: 0.5} - m_AnchoredPosition: {x: 92.2, y: -186.5} - m_SizeDelta: {x: 160, y: 30} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!224 &224309315879895698 -RectTransform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1116272002658940} - 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: [] - m_Father: {fileID: 224225807032217706} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0.5, y: 0.5} - m_AnchorMax: {x: 0.5, y: 0.5} - m_AnchoredPosition: {x: 85.75, y: 0} - m_SizeDelta: {x: 160, y: 30} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!224 &224337937757169404 -RectTransform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1776728768293572} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1.0000306, y: 1.0000306, z: 1.0000306} - m_Children: - - {fileID: 224067296964856838} - m_Father: {fileID: 224424652463235604} - m_RootOrder: 8 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 583.11, y: -355.8} - m_SizeDelta: {x: 180, y: 30} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!224 &224343337714323566 -RectTransform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1205454069064386} - 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: [] - m_Father: {fileID: 224877248440474384} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 0} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!224 &224351146500051142 -RectTransform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1208655999314524} - 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: 224430133987540698} - m_Father: {fileID: 224551972182140916} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: -20, y: -20} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!224 &224356018411462194 -RectTransform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1273470284527834} - 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: [] - m_Father: {fileID: 224657730803200132} - m_RootOrder: 1 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 9, y: -0.5} - m_SizeDelta: {x: -28, y: -3} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!224 &224359279674534530 -RectTransform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1622947744469346} - 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: 224478214273470164} - m_Father: {fileID: 224424652463235604} - m_RootOrder: 3 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0.5, y: 0.5} - m_AnchorMax: {x: 0.5, y: 0.5} - m_AnchoredPosition: {x: 85.7, y: -145} - m_SizeDelta: {x: 150, y: 30} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!224 &224367983987252490 -RectTransform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1136734350191716} - 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: [] - m_Father: {fileID: 224931089488041446} - m_RootOrder: 2 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 5, y: -0.5} - m_SizeDelta: {x: -30, y: -3} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!224 &224371158476086740 -RectTransform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1194326070545732} - 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: [] - m_Father: {fileID: 224067296964856838} - m_RootOrder: 1 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 0, y: -0.5} - m_SizeDelta: {x: -20, y: -13} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!224 &224378216432443654 -RectTransform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1346866193198636} - 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: 224135309993760688} - - {fileID: 224551972182140916} - m_Father: {fileID: 224865001473672088} - m_RootOrder: 2 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 1, y: 0} - m_AnchoredPosition: {x: 0, y: 2} - m_SizeDelta: {x: 0, y: 150} - m_Pivot: {x: 0.5, y: 1} ---- !u!224 &224397989296713888 -RectTransform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1611535003885486} - 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: [] - m_Father: {fileID: 224877248440474384} - m_RootOrder: 1 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0.5} - m_AnchorMax: {x: 0, y: 0.5} - m_AnchoredPosition: {x: 10, y: 0} - m_SizeDelta: {x: 20, y: 20} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!224 &224424652463235604 -RectTransform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1223388733743224} - 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: 224633500127940814} - - {fileID: 224865001473672088} - - {fileID: 224661951961207604} - - {fileID: 224359279674534530} - - {fileID: 224695010266021502} - - {fileID: 224225807032217706} - - {fileID: 224657730803200132} - - {fileID: 224535940185612886} - - {fileID: 224337937757169404} - m_Father: {fileID: 224750055890552824} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 640, y: 480} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!224 &224430133987540698 -RectTransform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1053867868926598} - 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: [] - m_Father: {fileID: 224351146500051142} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 1, y: 0.2} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 20, y: 20} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!224 &224430135249139118 -RectTransform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1674267795944008} - 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: [] - m_Father: {fileID: 224612726749948988} - m_RootOrder: 1 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 0, y: -0.5} - m_SizeDelta: {x: -20, y: -13} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!224 &224478214273470164 -RectTransform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1615722501258778} - 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: [] - m_Father: {fileID: 224359279674534530} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 0} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!224 &224519098732573966 -RectTransform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1410875726181524} - 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: [] - m_Father: {fileID: 224067296964856838} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 0, y: -0.5} - m_SizeDelta: {x: -20, y: -13} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!224 &224532209984060890 -RectTransform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1504838929722686} - 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: 224931089488041446} - m_Father: {fileID: 224036386431653190} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 28} - m_Pivot: {x: 0.5, y: 1} ---- !u!224 &224535940185612886 -RectTransform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1205198839392206} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1.0000306, y: 1.0000306, z: 1.0000306} - m_Children: - - {fileID: 224612726749948988} - m_Father: {fileID: 224424652463235604} - m_RootOrder: 7 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 583.5, y: -321.4} - m_SizeDelta: {x: 180, y: 30} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!224 &224551972182140916 -RectTransform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1718043064140678} - 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: 224351146500051142} - m_Father: {fileID: 224378216432443654} - m_RootOrder: 1 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 1, y: 0} - m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 20, y: 0} - m_Pivot: {x: 1, y: 1} ---- !u!224 &224553521047720506 -RectTransform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1880930781788236} - 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: [] - m_Father: {fileID: 224865001473672088} - m_RootOrder: 1 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 1, y: 0.5} - m_AnchorMax: {x: 1, y: 0.5} - m_AnchoredPosition: {x: -15, y: 0} - m_SizeDelta: {x: 20, y: 20} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!224 &224559175407133318 -RectTransform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1209999200843122} - 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: 224822186409420238} - m_Father: {fileID: 224031360883251300} - m_RootOrder: 1 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 1, y: 0} - m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 20, y: 0} - m_Pivot: {x: 1, y: 1} ---- !u!224 &224569522200057044 -RectTransform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1335145532329742} - 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: [] - m_Father: {fileID: 224661951961207604} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: -7.5, y: -0.5} - m_SizeDelta: {x: -35, y: -13} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!224 &224612726749948988 -RectTransform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1466704086478742} - 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: 224831829199822854} - - {fileID: 224430135249139118} - m_Father: {fileID: 224535940185612886} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0.5, y: 0.5} - m_AnchorMax: {x: 0.5, y: 0.5} - m_AnchoredPosition: {x: 4.31, y: 7.2} - m_SizeDelta: {x: 100, y: 30} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!224 &224633500127940814 -RectTransform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1222729158489494} - 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: 224978000126982346} - m_Father: {fileID: 224424652463235604} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 413, y: -288.3} - m_SizeDelta: {x: 160, y: 30} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!224 &224657730803200132 -RectTransform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1365424548565418} - 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: 224694046305952830} - - {fileID: 224356018411462194} - m_Father: {fileID: 224424652463235604} - m_RootOrder: 6 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0.5, y: 0.5} - m_AnchorMax: {x: 0.5, y: 0.5} - m_AnchoredPosition: {x: 90.5, y: -205.7} - m_SizeDelta: {x: 160, y: 20} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!224 &224661951961207604 -RectTransform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1146655228816972} - 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: 224569522200057044} - - {fileID: 224972726501859066} - - {fileID: 224031360883251300} - m_Father: {fileID: 224424652463235604} - m_RootOrder: 2 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0.5, y: 0.5} - m_AnchorMax: {x: 0.5, y: 0.5} - m_AnchoredPosition: {x: 88.21002, y: -109.2} - m_SizeDelta: {x: 160, y: 30} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!224 &224694046305952830 -RectTransform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1945272145171886} - 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: 224083160386940978} - m_Father: {fileID: 224657730803200132} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 10, y: -10} - m_SizeDelta: {x: 20, y: 20} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!224 &224695010266021502 -RectTransform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1171495933492936} - 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: 224917986537322898} - m_Father: {fileID: 224424652463235604} - m_RootOrder: 4 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0.5, y: 0.5} - m_AnchorMax: {x: 0.5, y: 0.5} - m_AnchoredPosition: {x: 237.6, y: -145} - m_SizeDelta: {x: 150, y: 30} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!224 &224750055890552824 -RectTransform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1683477860202484} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 0, y: 0, z: 0} - m_Children: - - {fileID: 224424652463235604} - m_Father: {fileID: 0} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 0} - m_Pivot: {x: 0, y: 0} ---- !u!224 &224822186409420238 -RectTransform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1769716961495558} - 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: 224911600951096290} - m_Father: {fileID: 224559175407133318} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: -20, y: -20} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!224 &224822666437801044 -RectTransform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1285287974518114} - 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: [] - m_Father: {fileID: 224931089488041446} - m_RootOrder: 1 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0.5} - m_AnchorMax: {x: 0, y: 0.5} - m_AnchoredPosition: {x: 10, y: 0} - m_SizeDelta: {x: 20, y: 20} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!224 &224831829199822854 -RectTransform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1615151888271038} - 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: [] - m_Father: {fileID: 224612726749948988} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 0, y: -0.5} - m_SizeDelta: {x: -20, y: -13} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!224 &224865001473672088 -RectTransform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1903726991522894} - 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: 224136708758155110} - - {fileID: 224553521047720506} - - {fileID: 224378216432443654} - m_Father: {fileID: 224424652463235604} - m_RootOrder: 1 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0.5, y: 0.5} - m_AnchorMax: {x: 0.5, y: 0.5} - m_AnchoredPosition: {x: 88.21, y: -75.2} - m_SizeDelta: {x: 160, y: 30} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!224 &224877248440474384 -RectTransform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1122039539439108} - 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: 224343337714323566} - - {fileID: 224397989296713888} - - {fileID: 224010710242658290} - m_Father: {fileID: 224978212606780970} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0.5} - m_AnchorMax: {x: 1, y: 0.5} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 20} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!224 &224911600951096290 -RectTransform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1784270305019782} - 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: [] - m_Father: {fileID: 224822186409420238} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 1, y: 0.2} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 20, y: 20} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!224 &224917986537322898 -RectTransform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1114891166118942} - 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: [] - m_Father: {fileID: 224695010266021502} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 0} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!224 &224931089488041446 -RectTransform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1817284180948944} - 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: 224183436407461898} - - {fileID: 224822666437801044} - - {fileID: 224367983987252490} - m_Father: {fileID: 224532209984060890} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0.5} - m_AnchorMax: {x: 1, y: 0.5} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 20} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!224 &224972726501859066 -RectTransform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1972300622373212} - 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: [] - m_Father: {fileID: 224661951961207604} - m_RootOrder: 1 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 1, y: 0.5} - m_AnchorMax: {x: 1, y: 0.5} - m_AnchoredPosition: {x: -15, y: 0} - m_SizeDelta: {x: 20, y: 20} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!224 &224978000126982346 -RectTransform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1156037266301788} - 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: 224196978540988810} - - {fileID: 224103957803610084} - m_Father: {fileID: 224633500127940814} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0.5, y: 0.5} - m_AnchorMax: {x: 0.5, y: 0.5} - m_AnchoredPosition: {x: 88.4, y: 7.2} - m_SizeDelta: {x: 200, y: 30} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!224 &224978212606780970 -RectTransform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1046534023872206} - 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: 224877248440474384} - m_Father: {fileID: 224135309993760688} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 28} - m_Pivot: {x: 0.5, y: 1} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/RecordCanvas.prefab.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/RecordCanvas.prefab.meta deleted file mode 100644 index 0f4fb42..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/RecordCanvas.prefab.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 0b3e5ac109e03494e9b724109ea7c2ff -timeCreated: 1492409533 -licenseType: Pro -NativeFormatImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/RecordMic.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/RecordMic.cs deleted file mode 100644 index c745299..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/RecordMic.cs +++ /dev/null @@ -1,31 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -public class RecordMic : MonoBehaviour { - - AudioClip myAudioClip; - - void OnGUI() - { - if (GUI.Button(new Rect(10, 10, 60, 50), "Record")) - { - myAudioClip = Microphone.Start(null, false, 10, 44100); - } - - if (GUI.Button(new Rect(10, 70, 60, 50), "Save")) - { - - for (int i = 1; ; i++) - if (System.IO.File.Exists("myfile")) - { - SaveAudio.Save("myfile" + i, myAudioClip); - } - else - { - SaveAudio.Save("myfile", myAudioClip); - // audio.Play(); - } - } - } -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/RecordMic.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/RecordMic.cs.meta deleted file mode 100644 index e627f53..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/RecordMic.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: e592d334bb7598e4392c5c82db8d04e9 -timeCreated: 1491978737 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/SaveAudio.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/SaveAudio.cs deleted file mode 100644 index 00d1a8e..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/SaveAudio.cs +++ /dev/null @@ -1,310 +0,0 @@ -using System; -using System.IO; -using UnityEngine; -using System.Collections.Generic; -using NAudio.Wave; -using NAudio.Lame; - -public static class SaveAudio { - - public enum Savetype - { - wav, - mp3 - } - - //static int normalBitrate = 128; - //static int GoodBitrate = 320; - - static int HEADER_SIZE = 44; - //static int outputRate = 44100; - static int outputRate = 48000; - public static bool Save(string filename, AudioClip clip) - { - if (!filename.ToLower().EndsWith(".wav")) - { - filename += ".wav"; - } - - var filepath = Path.Combine(Application.persistentDataPath, filename); - - Debug.Log(filepath); - - // Make sure directory exists if user is saving to sub dir. - Directory.CreateDirectory(Path.GetDirectoryName(filepath)); - - using (var fileStream = CreateEmpty(filepath)) - { - - ConvertAndWrite(fileStream, clip); - - WriteHeader(fileStream, clip); - } - - return true; // TODO: return false if there's a failure saving the file - } - - public static AudioClip TrimSilence(AudioClip clip, float min) - { - var samples = new float[clip.samples]; - - clip.GetData(samples, 0); - - return TrimSilence(new List(samples), min, clip.channels, clip.frequency); - } - - public static AudioClip TrimSilence(List samples, float min, int channels, int hz) - { - return TrimSilence(samples, min, channels, hz, false, false); - } - - public static AudioClip TrimSilence(List samples, float min, int channels, int hz, bool _3D, bool stream) - { - int i; - - for (i = 0; i < samples.Count; i++) - { - if (Mathf.Abs(samples[i]) > min) - { - break; - } - } - - samples.RemoveRange(0, i); - - for (i = samples.Count - 1; i > 0; i--) - { - if (Mathf.Abs(samples[i]) > min) - { - break; - } - } - - samples.RemoveRange(i, samples.Count - i); - - var clip = AudioClip.Create("TempClip", samples.Count, channels, hz, stream); - - clip.SetData(samples.ToArray(), 0); - - return clip; - } - - public static FileStream CreateEmpty(string filepath) - { - var fileStream = new FileStream(filepath, FileMode.Create); - byte emptyByte = new byte(); - - for (int i = 0; i < HEADER_SIZE; i++) //preparing the header - { - fileStream.WriteByte(emptyByte); - } - - return fileStream; - } - - public static void ConvertAndWrite(FileStream fileStream, AudioClip clip) - { - - var samples = new float[clip.samples]; - - clip.GetData(samples, 0); - - Int16[] intData = new Int16[samples.Length]; - //converting in 2 float[] steps to Int16[], //then Int16[] to Byte[] - - Byte[] bytesData = new Byte[samples.Length * 2]; - //bytesData array is twice the size of - //dataSource array because a float converted in Int16 is 2 bytes. - - int rescaleFactor = 32767; //to convert float to Int16 - - for (int i = 0; i < samples.Length; i++) - { - intData[i] = (short)(samples[i] * rescaleFactor); - Byte[] byteArr = new Byte[2]; - byteArr = BitConverter.GetBytes(intData[i]); - byteArr.CopyTo(bytesData, i * 2); - } - - fileStream.Write(bytesData, 0, bytesData.Length); - } - - public static void ConvertAndWrite(FileStream fileStream,float[] dataSource ,Savetype type) - { - - Int16[] intData = new Int16[dataSource.Length]; - - Byte[] bytesData = new Byte[dataSource.Length * 2]; - - int rescaleFactor = 32767; - - for (int i = 0; i < dataSource.Length; i++) - { - intData[i] = (short)(dataSource[i] * rescaleFactor); - Byte[] byteArr = new Byte[2]; - byteArr = BitConverter.GetBytes(intData[i]); - byteArr.CopyTo(bytesData, i * 2); - } - - switch(type) - { - case Savetype.wav: - fileStream.Write(bytesData, 0, bytesData.Length); - break; - case Savetype.mp3: - if (lameMP3temp == null) - lameMP3temp = new LameMP3FileWriter(fileStream, new WaveFormat(), 128); - if (lameMP3temp !=null) - lameMP3temp.Write(bytesData, 0, bytesData.Length); - break; - default: - //fileStream.Write(bytesData, 0, bytesData.Length); - break; - } - } - private static LameMP3FileWriter lameMP3temp; - - public static void WriteHeader(FileStream fileStream, AudioClip clip) - { - - var hz = clip.frequency; - var channels = clip.channels; - var samples = clip.samples; - - fileStream.Seek(0, SeekOrigin.Begin); - - Byte[] riff = System.Text.Encoding.UTF8.GetBytes("RIFF"); - fileStream.Write(riff, 0, 4); - - Byte[] chunkSize = BitConverter.GetBytes(fileStream.Length - 8); - fileStream.Write(chunkSize, 0, 4); - - Byte[] wave = System.Text.Encoding.UTF8.GetBytes("WAVE"); - fileStream.Write(wave, 0, 4); - - Byte[] fmt = System.Text.Encoding.UTF8.GetBytes("fmt "); - fileStream.Write(fmt, 0, 4); - - Byte[] subChunk1 = BitConverter.GetBytes(16); - fileStream.Write(subChunk1, 0, 4); - - //UInt16 two = 2; - UInt16 one = 1; - - Byte[] audioFormat = BitConverter.GetBytes(one); - fileStream.Write(audioFormat, 0, 2); - - Byte[] numChannels = BitConverter.GetBytes(channels); - fileStream.Write(numChannels, 0, 2); - - Byte[] sampleRate = BitConverter.GetBytes(hz); - fileStream.Write(sampleRate, 0, 4); - - Byte[] byteRate = BitConverter.GetBytes(hz * channels * 2); // sampleRate * bytesPerSample*number of channels, here 44100*2*2 - fileStream.Write(byteRate, 0, 4); - - UInt16 blockAlign = (ushort)(channels * 2); - fileStream.Write(BitConverter.GetBytes(blockAlign), 0, 2); - - UInt16 bps = 16; - Byte[] bitsPerSample = BitConverter.GetBytes(bps); - fileStream.Write(bitsPerSample, 0, 2); - - Byte[] datastring = System.Text.Encoding.UTF8.GetBytes("data"); - fileStream.Write(datastring, 0, 4); - - Byte[] subChunk2 = BitConverter.GetBytes(samples * channels * 2); - fileStream.Write(subChunk2, 0, 4); - - // fileStream.Close(); - } - - public static void WriteHeader(FileStream fileStream, Savetype audiotype) - { - if(audiotype == Savetype.mp3) - { - lameMP3temp.Flush(); - lameMP3temp.Dispose(); - lameMP3temp.Close(); - fileStream.Close(); - lameMP3temp = null; - return; - } - - fileStream.Seek(0, SeekOrigin.Begin); - - Byte[] riff = System.Text.Encoding.UTF8.GetBytes("RIFF"); - fileStream.Write(riff, 0, 4); - - Byte[] chunkSize = BitConverter.GetBytes(fileStream.Length - 8); - fileStream.Write(chunkSize, 0, 4); - - Byte[] wave = System.Text.Encoding.UTF8.GetBytes("WAVE"); - fileStream.Write(wave, 0, 4); - - Byte[] fmt = System.Text.Encoding.UTF8.GetBytes("fmt "); - fileStream.Write(fmt, 0, 4); - - Byte[] subChunk1 = BitConverter.GetBytes(16); - fileStream.Write(subChunk1, 0, 4); - - UInt16 two = 2; - UInt16 one = 1; - - Byte[] audioFormat = BitConverter.GetBytes(one); - fileStream.Write(audioFormat, 0, 2); - - Byte[] numChannels = BitConverter.GetBytes(two); - fileStream.Write(numChannels, 0, 2); - outputRate = AudioSettings.GetConfiguration().sampleRate; - Byte[] sampleRate = BitConverter.GetBytes(outputRate); - fileStream.Write(sampleRate, 0, 4); - - Byte[] byteRate = BitConverter.GetBytes(outputRate * 4); - // sampleRate * bytesPerSample*number of channels, here 44100*2*2 - - fileStream.Write(byteRate, 0, 4); - - UInt16 four = 4; - Byte[] blockAlign = BitConverter.GetBytes(four); - fileStream.Write(blockAlign, 0, 2); - - UInt16 sixteen = 16; - Byte[] bitsPerSample = BitConverter.GetBytes(sixteen); - fileStream.Write(bitsPerSample, 0, 2); - - Byte[] dataString = System.Text.Encoding.UTF8.GetBytes("data"); - fileStream.Write(dataString, 0, 4); - - Byte[] subChunk2 = BitConverter.GetBytes(fileStream.Length - HEADER_SIZE); - - fileStream.Write(subChunk2, 0, 4); - - fileStream.Close(); - } - - /* - private static void ConvertAndWrite (AudioClip clip, string path, int bitRate, FileStream fileStream) - { - var samples = new float[fileStream.Length - HEADER_SIZE]; - - Int16[] intData = new Int16[samples.Length]; - //converting in 2 float[] steps to Int16[], //then Int16[] to Byte[] - - Byte[] bytesData = new Byte[samples.Length * 2]; - //bytesData array is twice the size of - //dataSource array because a float converted in Int16 is 2 bytes. - - float rescaleFactor = 32767; //to convert float to Int16 - - for (int i = 0; i < samples.Length; i++) { - intData [i] = (short)(samples [i] * rescaleFactor); - Byte[] byteArr = new Byte[2]; - byteArr = BitConverter.GetBytes (intData [i]); - byteArr.CopyTo (bytesData, i * 2); - } - - File.WriteAllBytes (path, ConvertWavToMp3 (bytesData,bitRate)); - } - */ -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/SaveAudio.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/SaveAudio.cs.meta deleted file mode 100644 index 4ab3524..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/Recorder/SaveAudio.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: ca80891a9df5a424fb61750ce464456e -timeCreated: 1491978927 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/Singleton.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/Singleton.cs deleted file mode 100644 index 7d14588..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/Singleton.cs +++ /dev/null @@ -1,44 +0,0 @@ -using System.Collections.Generic; -using UnityEngine; - -public class Singleton : MonoBehaviour where Instance : Singleton -{ - public bool isPersistant = true; - - public virtual void Awake() - { - if (instances == null) - instances = new Dictionary(); - - string scene_name = gameObject.scene.name; - - if (isPersistant) - { - if (instances.Count == 0) - { - instances.Add("", this as Instance); - DontDestroyOnLoad(gameObject); - } - else - { - DestroyObject(gameObject); - } - } - else - { - if (instances.ContainsKey(scene_name) == false) - instances.Add(scene_name, this as Instance); - } - } - - static Dictionary instances; - - /// - ///name = gameObject.scene.name - /// - public static Instance GetInstance(string name = "") - { - string key = instances.ContainsKey(name) ? name : ""; - return instances.ContainsKey(name) ? instances[key] : null; - } -} diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/Singleton.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/Singleton.cs.meta deleted file mode 100644 index 8b008eb..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/Singleton.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 69dbab72da8940640a4ff2694874e81f -timeCreated: 1490325187 -licenseType: Free -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/UltraControls.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/UltraControls.meta deleted file mode 100644 index 23bc4be..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/UltraControls.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 595073269dd096c4b84c48b6d39ad419 -folderAsset: yes -timeCreated: 1493781850 -licenseType: Pro -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/UltraControls/Editor.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/UltraControls/Editor.meta deleted file mode 100644 index d94ffcb..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/UltraControls/Editor.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 20964c15791526f42a8d6c5d8cddd918 -folderAsset: yes -timeCreated: 1493105094 -licenseType: Pro -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/UltraControls/Editor/UltraGetterEditor.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/UltraControls/Editor/UltraGetterEditor.cs deleted file mode 100644 index b36127c..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/UltraControls/Editor/UltraGetterEditor.cs +++ /dev/null @@ -1,71 +0,0 @@ -using UnityEngine; -using UnityEditor; -using System; -using UnityEditor.SceneManagement; - -namespace UltraControls -{ - [CustomEditor(typeof(UltraGetter))] - [CanEditMultipleObjects] - [Serializable] - public class UltraGetterEditor : Editor - { - private UltraGetter m_master; - public SerializedProperty m_property_is_started; - public SerializedProperty m_property_name; - public SerializedProperty m_property_identifierInFile; - public SerializedProperty m_property_auto_load; - - void OnEnable() - { - if (m_master == null) - { - m_master = target as UltraGetter; - } - - m_property_is_started = serializedObject.FindProperty("m_is_started"); - m_property_name = serializedObject.FindProperty("m_name"); - //m_property_identifierInFile = serializedObject.FindProperty("m_identifierInFile"); - //m_property_auto_load = serializedObject.FindProperty("m_auto_load_after_finding_getter"); - } - - void OnDisable() - { - - } - - public override void OnInspectorGUI() - { - serializedObject.Update(); - - EditorGUILayout.PropertyField(m_property_is_started, new UnityEngine.GUIContent("Start")); - - - EditorGUI.BeginDisabledGroup(m_property_is_started.boolValue); - { - EditorGUILayout.PropertyField(m_property_name, new UnityEngine.GUIContent("Name")); - } - EditorGUI.EndDisabledGroup(); - - serializedObject.ApplyModifiedProperties(); - - m_master.is_start = m_property_is_started.boolValue; - - if (!m_master.is_start) - { - m_master.ultracontros_name = m_property_name.stringValue; - return; - } - - EditorGUILayout.Separator(); - - if (!Application.isPlaying) - { - m_master.UpdateByUltraGetterEditor(); - } - - }//OnInspectorGUI() - - }//UltraGetterEditor - -}//namespace UltraControls \ No newline at end of file diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/UltraControls/Editor/UltraGetterEditor.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/UltraControls/Editor/UltraGetterEditor.cs.meta deleted file mode 100644 index 110a85e..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/UltraControls/Editor/UltraGetterEditor.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 66c9ef823e7d29e40b2f5a8bb9f30157 -timeCreated: 1494838478 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/UltraControls/Editor/UltraSetterEditor.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/UltraControls/Editor/UltraSetterEditor.cs deleted file mode 100644 index 981eaf0..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/UltraControls/Editor/UltraSetterEditor.cs +++ /dev/null @@ -1,160 +0,0 @@ -using UnityEngine; -using UnityEditor; -using System; -using UnityEditor.SceneManagement; - -namespace UltraControls -{ - [CustomEditor(typeof(UltraSetter))] - [CanEditMultipleObjects] - [Serializable] - public class UltraSetterEditor : Editor - { - private UltraSetter m_master; - public SerializedProperty m_property_is_started; - public SerializedProperty m_property_name; - public SerializedProperty m_property_identifierInFile; - public SerializedProperty m_property_auto_load; - - void OnEnable() - { - if (m_master == null) - { - m_master = target as UltraSetter; - } - - m_property_is_started = serializedObject.FindProperty("m_is_started"); - m_property_name = serializedObject.FindProperty("m_name"); - m_property_identifierInFile = serializedObject.FindProperty("m_identifierInFile"); - m_property_auto_load = serializedObject.FindProperty("m_auto_load_after_finding_getter"); - } - - void OnDisable() - { - - } - - public override void OnInspectorGUI() - { - bool is_modified = m_master.UpdateIdentifierInFile(); - if (is_modified) - { - EditorSceneManager.SaveScene(EditorSceneManager.GetActiveScene()); - } - - serializedObject.Update(); - - EditorGUI.BeginDisabledGroup(true); - EditorGUILayout.TextArea(m_master.filepath_settings); - EditorGUILayout.PropertyField(m_property_identifierInFile, new UnityEngine.GUIContent("IdentifierInFile")); - EditorGUI.EndDisabledGroup(); - - EditorGUILayout.PropertyField(m_property_is_started, new UnityEngine.GUIContent("Start")); - - - EditorGUI.BeginDisabledGroup(m_property_is_started.boolValue); - { - EditorGUILayout.PropertyField(m_property_name, new UnityEngine.GUIContent("Name")); - EditorGUILayout.PropertyField(m_property_auto_load, new UnityEngine.GUIContent("Auto Load")); - } - EditorGUI.EndDisabledGroup(); - - serializedObject.ApplyModifiedProperties(); - - m_master.is_start = m_property_is_started.boolValue; - - if (!m_master.is_start) - { - m_master.ultracontros_name = m_property_name.stringValue; - return; - } - - EditorGUILayout.Separator(); - - if (!Application.isPlaying) - { - m_master.UpdateByUltraSetterEditor(); - } - - Control[] controls = m_master.controls; - if (controls == null) - { - return; - } - - bool yes = EditorGUILayout.ToggleLeft("Save Settings", false); - if (yes) - { - m_master.SaveSettings(); - } - - yes = EditorGUILayout.ToggleLeft("Load Settings", false); - if (yes) - { - m_master.LoadSettings(); - } - - EditorGUILayout.Separator(); - - foreach (Control ctrl in controls) - { - switch(ctrl.ctrlType) - { - case CtrlType.Bool: - ctrl.valBool = EditorGUILayout.Toggle(ctrl.name, ctrl.valBool); - break; - - case CtrlType.Text: - ctrl.text = EditorGUILayout.TextField(ctrl.name, ctrl.text); - break; - - case CtrlType.Float: - if (ctrl.hasRange) - { - ctrl.valFloat = EditorGUILayout.Slider(ctrl.name, ctrl.valFloat, ctrl.minFloat, ctrl.maxFloat); - } - else - { - ctrl.valFloat = EditorGUILayout.FloatField(ctrl.name, ctrl.valFloat); - } - break; - - case CtrlType.Int: - if (ctrl.hasRange) - { - ctrl.valInt = (int)EditorGUILayout.Slider(ctrl.name, ctrl.valInt, ctrl.minInt, ctrl.maxInt); - } - else - { - ctrl.valInt = EditorGUILayout.IntField(ctrl.name, ctrl.valInt); - } - break; - - case CtrlType.Vec2F: - ctrl.valVector2 = EditorGUILayout.Vector2Field(ctrl.name, ctrl.valVector2); - break; - - case CtrlType.Vec3F: - ctrl.valVector3 = EditorGUILayout.Vector3Field(ctrl.name, ctrl.valVector3); - break; - - case CtrlType.Vec4F: - ctrl.valVector4 = EditorGUILayout.Vector4Field(ctrl.name, ctrl.valVector4); - break; - - case CtrlType.ColorF: - ctrl.valColor = EditorGUILayout.ColorField(ctrl.name, ctrl.valColor); - break; - - case CtrlType.Color: - ctrl.valColor32 = EditorGUILayout.ColorField(ctrl.name, ctrl.valColor32); - break; - - default: - break; - } - } - } - } - -}//namespace UltraControls \ No newline at end of file diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/UltraControls/Editor/UltraSetterEditor.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/UltraControls/Editor/UltraSetterEditor.cs.meta deleted file mode 100644 index 004a4be..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/UltraControls/Editor/UltraSetterEditor.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 96b46e9b87a1f2b4782649d4e9c559d5 -timeCreated: 1493105169 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/UltraControls/NativeUltraControlsWrap.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/UltraControls/NativeUltraControlsWrap.cs deleted file mode 100644 index b3c2ec4..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/UltraControls/NativeUltraControlsWrap.cs +++ /dev/null @@ -1,934 +0,0 @@ - -using System; -using System.Runtime.InteropServices; -using System.Reflection; - -namespace UltraControls -{ - public class ControlInfo - { - internal bool m_has_range; - internal Type m_type; - internal string m_name; - internal object m_value_default; - internal object m_value_min; - internal object m_value_max; - } - - public class Factroy - { - public static ControlInfo CreateInfo< T > (string name, T value) - { - Type type = typeof(T); - if (!Utils.IsSupport(type)) - { - return null; - } - - ControlInfo info = new ControlInfo(); - info.m_value_default = value; - info.m_type = type; - info.m_has_range = false; - info.m_name = name; - return info; - } - - public static ControlInfo CreateInfo(string name, T value, T min, T max) - { - Type type = typeof(T); - if (!Utils.IsSupport(type)) - { - return null; - } - - ControlInfo info = new ControlInfo(); - info.m_value_default = value; - info.m_type = type; - info.m_value_min = min; - info.m_value_max = max; - info.m_has_range = true; - info.m_name = name; - return info; - } - - } - - - - public class ParameterBase - { - internal Control m_ctrl; - internal PropertyInfo m_prop; - - public object val - { - set - { - m_prop.SetValue(m_ctrl, value, null); - } - - get - { - return m_prop.GetValue(m_ctrl, null); - } - } - } - - public class Parameter < T > : ParameterBase - { - internal Parameter(Control ctrl) - { - m_ctrl = ctrl; - string name_prop = ""; - Type type = typeof(T); - if (type != ctrl.realType) - { - throw new Exception("Control[" + ctrl.name + "]: ParamControl<" + type.ToString() + "> is not fit the type : " + ctrl.realType.ToString() + "."); - } - - if (type == typeof(string)) - { - name_prop = "text"; - } - else if (type == typeof(bool)) - { - name_prop = "valBool"; - } - else if (type == typeof(int)) - { - name_prop = "valInt"; - } - else if (type == typeof(float)) - { - name_prop = "valFloat"; - } - else if (type == typeof(UnityEngine.Vector2)) - { - name_prop = "valVector2"; - } - else if (type == typeof(UnityEngine.Vector3)) - { - name_prop = "valVector3"; - } - else if (type == typeof(UnityEngine.Vector4)) - { - name_prop = "valVector4"; - } - else if (type == typeof(UnityEngine.Color)) - { - name_prop = "valColor"; - } - else if (type == typeof(UnityEngine.Color32)) - { - name_prop = "valColor32"; - } - - if (name_prop == "") - { - throw new Exception("Control[" + ctrl.name + "]: ParamControl<" + type.ToString() + "> is not support."); - } - - m_prop = typeof(Control).GetProperty(name_prop); - if (m_prop == null) - { - throw new Exception("Control[" + ctrl.name + "]: The property[" + name_prop + "] of Control is not exist."); - } - } - } - - public class ParamSetter< T > - { - private Parameter m_param; - internal ParamSetter(Parameter param) - { - m_param = param; - } - - public T val - { - set - { - m_param.val = value; - } - } - } - - public class ParamGetter - { - private Parameter m_param; - internal ParamGetter(Parameter param) - { - m_param = param; - } - - public T val - { - get - { - return (T)m_param.val; - } - } - } - - public enum CtrlType: uint - { - Bool = 0, - Event = 1, - Float = 10, - Text = 100, - Int = 200, - Vec2F = 500, - Vec3F = 510, - Vec4F = 520, - Color = 600, - ColorF = 610, - Mat33F = 900, - Mat44F = 950, - Unknown = 0xDEADBEEF - } - - [StructLayout(LayoutKind.Sequential)] - public struct RawCtrl - { - [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 16)] - public string name; - public uint type; - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 236)] - public byte[] data; - } - - [StructLayout(LayoutKind.Sequential)] - public sealed class CtrlValues - { - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 16)] - public float[] val; - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 16)] - public float[] min; - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 16)] - public float[] max; - } - - public sealed class Control - { - [Flags] - enum DirtyFlag - { - None = 0x00, - Data = 0x01, - Values = 0x02, - All = Data | Values, - } - - [Flags] - enum FeatureFlag - { - None = 0x00, - HasRange = 0x01, - IsAlive = 0x02, - } - - private string m_name; - private CtrlType m_type; - private byte[] m_data; - private CtrlValues m_values; - private string m_text; - private DirtyFlag m_dirty; - private FeatureFlag m_feature; - private Type m_realType; - - internal Control(ref RawCtrl raw_ctrl) - { - m_name = raw_ctrl.name; - m_type = (CtrlType)raw_ctrl.type; - m_data = raw_ctrl.data; - m_feature = FeatureFlag.IsAlive; - if (m_type == CtrlType.Text) - { - int count = 0; - while (m_data[count] != 0) - { - ++count; - } - - m_text = System.Text.Encoding.UTF8.GetString(m_data, 0, count); - m_realType = typeof(string); - } - else - { - m_values = Utils.BytesToStructure(m_data); - bool has_range = !(m_values.min[0] == 0.0f && m_values.min[1] == 0.0f && m_values.min[2] == 0.0f && m_values.min[3] == 0.0f && - m_values.max[0] == 0.0f && m_values.max[1] == 0.0f && m_values.max[2] == 0.0f && m_values.max[3] == 0.0f); - - if (has_range) - { - m_feature |= FeatureFlag.HasRange; - } - - switch (m_type) - { - case CtrlType.Bool: m_realType = typeof(bool); break; - case CtrlType.Float: m_realType = typeof(float); break; - case CtrlType.Int: m_realType = typeof(int); break; - case CtrlType.Vec2F: m_realType = typeof(UnityEngine.Vector2); break; - case CtrlType.Vec3F: m_realType = typeof(UnityEngine.Vector3); break; - case CtrlType.Vec4F: m_realType = typeof(UnityEngine.Vector4); break; - case CtrlType.Color: m_realType = typeof(UnityEngine.Color32); break; - case CtrlType.ColorF: m_realType = typeof(UnityEngine.Color); break; - - default: - UnityEngine.Debug.LogError("The type is not support"); - break; - } - } - - m_dirty = DirtyFlag.None; - } - - public void Die() - { - m_feature &= ~FeatureFlag.IsAlive; - } - - public bool IsValue() { return m_values != null; } - public bool IsBool() { return m_type == CtrlType.Bool; } - public bool IsFloat() { return m_type == CtrlType.Float; } - public bool IsString() { return m_type == CtrlType.Text; } - public bool IsInt() { return m_type == CtrlType.Int; } - public bool IsVector2() { return m_type == CtrlType.Vec2F; } - public bool IsVector3() { return m_type == CtrlType.Vec3F; } - public bool IsVector4() { return m_type == CtrlType.Vec4F; } - public bool IsColor32() { return m_type == CtrlType.Color; } - public bool IsColor() { return m_type == CtrlType.ColorF; } - //public bool IsEvent() { return m_type == CtrlType.Event; } - //public bool IsMatrix4x4() { return m_type == CtrlType.Mat44F; } - - public ParamSetter CreateParamSetter() - { - Parameter param = mf_CreateParam(); - if (param == null) - { - return null; - } - - return new ParamSetter(param); - } - - public ParamGetter CreateParamGetter() - { - Parameter param = mf_CreateParam(); - if (param == null) - { - return null; - } - - return new ParamGetter(param); - } - - public void UpdateDirty() - { - //if (m_dirty == DirtyFlag.None) - //{ - // return; - //} - // - if (IsValue()) - { - if ((m_dirty & DirtyFlag.Values) != 0) - { - Utils.StructureToBytes(m_values, m_data); - } - } - else - { - Array.Clear(m_data, 0, m_data.Length); - byte[] bytes = System.Text.Encoding.ASCII.GetBytes(m_text); - Buffer.BlockCopy(bytes, 0, m_data, 0, Math.Min(bytes.Length, m_data.Length)); - m_data[m_data.Length - 1] = 0; - } - - m_dirty = DirtyFlag.None; - } - - public CtrlType ctrlType - { - get { return m_type; } - } - - public Type realType - { - get { return m_realType; } - } - - public bool isDirty - { - get - { - return m_dirty != DirtyFlag.None; - } - } - - public bool isAlive - { - get - { - return (m_feature & FeatureFlag.IsAlive) != 0; - } - } - - public bool hasRange - { - get - { - return (m_feature & FeatureFlag.HasRange) != 0; - } - } - - - public string name - { - get - { - return m_name; - } - } - - public bool valBool - { - set - { - if (!IsValue()) - { - mf_TraceWarning("set valBool - is not value!!!"); - return; - } - - m_values.val[0] = value? 1.0f: 0.0f; - m_dirty |= DirtyFlag.All; - } - - get - { - if (!IsValue()) - { - mf_TraceWarning("get valBool - is not value!!!"); - return false; - } - - return m_values.val[0] > 0.0f? true: false; - } - } - - public string text - { - set - { - if (!IsString()) - { - mf_TraceWarning("set text - is not string!!!"); - return; - } - - m_text = value; - m_dirty |= DirtyFlag.Data; - } - - get - { - if (!IsString()) - { - mf_TraceWarning("get text - is not string!!!"); - return ""; - } - - return m_text; - } - } - - public float valFloat - { - set - { - if (!IsValue()) - { - mf_TraceWarning("set valFloat - is not value!!!"); - return; - } - - m_values.val[0] = value; - m_dirty |= DirtyFlag.All; - } - - get - { - if (!IsValue()) - { - mf_TraceWarning("get valFloat - is not value!!!"); - return 0.0f; - } - - return m_values.val[0]; - } - } - - public float minFloat - { - set - { - if (!IsValue()) - { - mf_TraceWarning("set minFloat - is not value!!!"); - return; - } - - m_values.min[0] = value; - m_dirty |= DirtyFlag.All; - } - - get - { - if (!IsValue()) - { - mf_TraceWarning("get minFloat - is not value!!!"); - return 0.0f; - } - - return m_values.min[0]; - } - } - - public float maxFloat - { - set - { - if (!IsValue()) - { - mf_TraceWarning("set maxFloat - is not value!!!"); - return; - } - - m_values.min[0] = value; - m_dirty |= DirtyFlag.All; - } - - get - { - if (!IsValue()) - { - mf_TraceWarning("get maxFloat - is not value!!!"); - return 0.0f; - } - - return m_values.max[0]; - } - } - - public int valInt - { - set - { - if (!IsValue()) - { - mf_TraceWarning("set valInt - is not value!!!"); - return; - } - - m_values.val[0] = value; - m_dirty |= DirtyFlag.All; - } - - get - { - if (!IsValue()) - { - mf_TraceWarning("get valInt - is not value!!!"); - return 0; - } - - return (int)m_values.val[0]; - } - } - - public int minInt - { - set - { - if (!IsValue()) - { - mf_TraceWarning("set minInt - is not value!!!"); - return; - } - - m_values.min[0] = value; - m_dirty |= DirtyFlag.All; - } - - get - { - if (!IsValue()) - { - mf_TraceWarning("get minInt - is not value!!!"); - return 0; - } - - return (int)m_values.min[0]; - } - } - - public int maxInt - { - set - { - if (!IsValue()) - { - mf_TraceWarning("set maxInt - is not value!!!"); - return; - } - - m_values.min[0] = value; - m_dirty |= DirtyFlag.All; - } - - get - { - if (!IsValue()) - { - mf_TraceWarning("get maxFloat - is not value!!!"); - return 0; - } - - return (int)m_values.max[0]; - } - } - - public UnityEngine.Vector2 valVector2 - { - set - { - if (!IsValue()) - { - return; - } - - mf_SetVec2(value, m_values.val); - } - - get - { - return IsValue() ? mf_GetVec2(m_values.val) : UnityEngine.Vector2.zero; - } - } - - public UnityEngine.Vector2 minVector2 - { - set - { - if (!IsValue()) - { - return; - } - - mf_SetVec2(value, m_values.min); - } - - get - { - return IsValue() ? mf_GetVec2(m_values.min) : UnityEngine.Vector2.zero; - } - } - - public UnityEngine.Vector2 maxVector2 - { - set - { - if (!IsValue()) - { - return; - } - - mf_SetVec2(value, m_values.max); - } - - get - { - return IsValue() ? mf_GetVec2(m_values.max) : UnityEngine.Vector2.zero; - } - } - - public UnityEngine.Vector3 valVector3 - { - set - { - if (!IsValue()) - { - return; - } - - mf_SetVec3(value, m_values.val); - } - - get - { - return IsValue() ? mf_GetVec3(m_values.val) : UnityEngine.Vector3.zero; - } - } - - public UnityEngine.Vector3 minVector3 - { - set - { - if (!IsValue()) - { - return; - } - - mf_SetVec3(value, m_values.min); - } - - get - { - return IsValue() ? mf_GetVec3(m_values.min) : UnityEngine.Vector3.zero; - } - } - - public UnityEngine.Vector3 maxVector3 - { - set - { - if (!IsValue()) - { - return; - } - - mf_SetVec3(value, m_values.max); - } - - get - { - return IsValue() ? mf_GetVec3(m_values.max) : UnityEngine.Vector3.zero; - } - } - - public UnityEngine.Vector4 valVector4 - { - set - { - if (!IsValue()) - { - return; - } - - mf_SetVec4(value, m_values.val); - } - - get - { - return IsValue() ? mf_GetVec4(m_values.val) : UnityEngine.Vector4.zero; - } - } - - public UnityEngine.Vector4 minVector4 - { - set - { - if (!IsValue()) - { - return; - } - - mf_SetVec4(value, m_values.min); - } - - get - { - return IsValue() ? mf_GetVec4(m_values.min) : UnityEngine.Vector4.zero; - } - } - - public UnityEngine.Vector4 maxVector4 - { - set - { - if (!IsValue()) - { - return; - } - - mf_SetVec4(value, m_values.max); - } - - get - { - return IsValue() ? mf_GetVec4(m_values.max): UnityEngine.Vector4.zero; - } - } - - public UnityEngine.Color valColor - { - set - { - if (!IsValue()) - { - return; - } - - mf_SetColor(value, m_values.val); - } - - get - { - return IsValue() ? mf_GetColor(m_values.val) : UnityEngine.Color.black; - } - } - - public UnityEngine.Color32 valColor32 - { - set - { - if (!IsValue()) - { - return; - } - - mf_SetColor32(value); - } - - get - { - if (IsValue()) - { - return new UnityEngine.Color32(m_data[0], m_data[1], m_data[2], m_data[3]); - } - else - { - return new UnityEngine.Color32(0, 0, 0, 0); - } - } - } - - public byte[] data - { - set - { - m_data = value; - if (m_type == CtrlType.Text) - { - int count = 0; - while (m_data[count] != 0) - { - ++count; - } - - m_text = System.Text.Encoding.UTF8.GetString(m_data, 0, count); - } - else - { - m_values = Utils.BytesToStructure(m_data); - } - } - - get - { - UpdateDirty(); - return m_data; - } - } - - private void mf_SetVec2(UnityEngine.Vector2 vec2, float[] ary_f) - { - Utils.SetVec2(vec2, ary_f); - m_dirty |= DirtyFlag.All; - } - - private void mf_SetVec3(UnityEngine.Vector3 vec3, float[] ary_f) - { - Utils.SetVec3(vec3, ary_f); - m_dirty |= DirtyFlag.All; - } - - private void mf_SetVec4(UnityEngine.Vector4 vec4, float[] ary_f) - { - Utils.SetVec4(vec4, ary_f); - m_dirty |= DirtyFlag.All; - } - - private void mf_SetColor(UnityEngine.Color clr, float[] ary_f) - { - Utils.SetColor(clr, ary_f); - m_dirty |= DirtyFlag.All; - } - - private void mf_SetColor32(UnityEngine.Color32 clr32) - { - Utils.SetColor32(clr32, m_data); - m_dirty |= DirtyFlag.Data; - } - - private UnityEngine.Vector2 mf_GetVec2(float[] ary_f) { return new UnityEngine.Vector2(ary_f[0], ary_f[1]); } - private UnityEngine.Vector3 mf_GetVec3(float[] ary_f) { return new UnityEngine.Vector3(ary_f[0], ary_f[1], ary_f[2]); } - private UnityEngine.Vector4 mf_GetVec4(float[] ary_f) { return new UnityEngine.Vector4(ary_f[0], ary_f[1], ary_f[2], ary_f[3]); } - private UnityEngine.Color mf_GetColor(float[] ary_f) { return new UnityEngine.Color(ary_f[0], ary_f[1], ary_f[2], ary_f[3]); } - - private void mf_TraceWarning(string msg) - { - UnityEngine.Debug.LogWarning("[WARNING] UltraControls::Control name = " + m_name + " : " + msg); - } - - private Parameter mf_CreateParam() - { - Parameter param; - try - { - param = new Parameter(this); - } - catch (Exception ex) - { - UnityEngine.Debug.LogError("UltraControls::Control[" + m_name + "] CreateParam(): " + ex.Message); - param = null; - } - return param; - } - } - - public sealed class NativeLib - { - //Imports - [DllImport("NativeUltraControlsPluginD", EntryPoint = "nucpInitLib")] - //[DllImport("NativeUltraControlsPlugin", EntryPoint = "nucpInitLib")] - public static extern int Init(); - - [DllImport("NativeUltraControlsPluginD", EntryPoint = "nucpTermLib")] - //[DllImport("NativeUltraControlsPlugin", EntryPoint = "nucpTermLib")] - public static extern void Term(); - - [DllImport("NativeUltraControlsPluginD", EntryPoint = "nucpCreateHandle")] - //[DllImport("NativeUltraControlsPlugin", EntryPoint = "nucpCreateHandle")] - public static extern int CreateHandle([In] string in_name, [In] uint in_max_num_ctrls, [Out] out uint out_handle); - - [DllImport("NativeUltraControlsPluginD", EntryPoint = "nucpDestroyHandle")] - //[DllImport("NativeUltraControlsPlugin", EntryPoint = "nucpCreateHandle")] - public static extern int DestroyHandle([In] uint in_handle); - - //[Setter]/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - [DllImport("NativeUltraControlsPluginD", EntryPoint = "nucpFindGetter")] - //[DllImport("NativeUltraControlsPlugin", EntryPoint = "nucpFindGetter")] - public static extern int FindGetter([In] uint in_handle, [In, Out] RawCtrl[] out_p_ary, [In] uint in_max_cnt, [Out] out uint out_p_cnt); - - [DllImport("NativeUltraControlsPluginD", EntryPoint = "nucpSetControls")] - //[DllImport("NativeUltraControlsPlugin", EntryPoint = "nucpSetControls")] - public static extern int SetControls([In] uint in_handle, [In, Out] RawCtrl[] in_p_ary, [In] uint in_max_cnt); - - //[Getter]/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - - [DllImport("NativeUltraControlsPluginD", EntryPoint = "nucpCreateGetter")] - //[DllImport("NativeUltraControlsPlugin", EntryPoint = "nucpCreateGetter")] - public static extern int CreateGetter([In] uint in_handle, [In] RawCtrl[] out_p_ary, [In] uint in_max_cnt); - - [DllImport("NativeUltraControlsPluginD", EntryPoint = "nucpGetControls")] - //[DllImport("NativeUltraControlsPlugin", EntryPoint = "nucpGetControls")] - public static extern int GetControls([In] uint in_handle, [In, Out] RawCtrl[] out_p_ary, [In] uint in_max_cnt, [Out] out uint out_p_cnt); - - [DllImport("NativeUltraControlsPluginD", EntryPoint = "nucpCheckControls")] - //[DllImport("NativeUltraControlsPlugin", EntryPoint = "nucpCheckControls")] - public static extern int CheckControls([In] uint in_handle, [In, Out] RawCtrl[] out_p_ary, [In] uint in_max_cnt, [Out] out uint out_p_cnt); - } -} \ No newline at end of file diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/UltraControls/NativeUltraControlsWrap.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/UltraControls/NativeUltraControlsWrap.cs.meta deleted file mode 100644 index bc5f8c8..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/UltraControls/NativeUltraControlsWrap.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 8e51281bc6aeda64fad625cfe018ab34 -timeCreated: 1490168671 -licenseType: Free -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/UltraControls/Plugins.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/UltraControls/Plugins.meta deleted file mode 100644 index 8e7d22d..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/UltraControls/Plugins.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: a416a850e42292340b4e363b9e119ccb -folderAsset: yes -timeCreated: 1493781850 -licenseType: Pro -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/UltraControls/Plugins/x86.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/UltraControls/Plugins/x86.meta deleted file mode 100644 index 870b685..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/UltraControls/Plugins/x86.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 275ec448152a76742abc1ae9a8f5775a -folderAsset: yes -timeCreated: 1490168671 -licenseType: Free -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/UltraControls/Plugins/x86/NativeUltraControlsPlugin.dll b/Unity-19050-05-BallPool/Assets/UnityUtils/UltraControls/Plugins/x86/NativeUltraControlsPlugin.dll deleted file mode 100644 index 025728e..0000000 Binary files a/Unity-19050-05-BallPool/Assets/UnityUtils/UltraControls/Plugins/x86/NativeUltraControlsPlugin.dll and /dev/null differ diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/UltraControls/Plugins/x86/NativeUltraControlsPlugin.dll.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/UltraControls/Plugins/x86/NativeUltraControlsPlugin.dll.meta deleted file mode 100644 index e044ade..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/UltraControls/Plugins/x86/NativeUltraControlsPlugin.dll.meta +++ /dev/null @@ -1,79 +0,0 @@ -fileFormatVersion: 2 -guid: 54b792c3d756ad840bb54a07314bb516 -timeCreated: 1490168675 -licenseType: Free -PluginImporter: - serializedVersion: 1 - iconMap: {} - executionOrder: {} - isPreloaded: 0 - isOverridable: 0 - platformData: - Android: - enabled: 0 - settings: - CPU: ARMv7 - Any: - enabled: 0 - settings: - Exclude Android: 1 - Exclude Editor: 0 - Exclude Linux: 0 - Exclude Linux64: 0 - Exclude LinuxUniversal: 0 - Exclude OSXIntel: 0 - Exclude OSXIntel64: 0 - Exclude OSXUniversal: 0 - Exclude WebGL: 1 - Exclude Win: 0 - Exclude Win64: 1 - Exclude iOS: 1 - Editor: - enabled: 1 - settings: - CPU: x86 - DefaultValueInitialized: true - OS: Windows - Linux: - enabled: 1 - settings: - CPU: x86 - Linux64: - enabled: 1 - settings: - CPU: x86_64 - LinuxUniversal: - enabled: 1 - settings: - CPU: AnyCPU - OSXIntel: - enabled: 1 - settings: - CPU: AnyCPU - OSXIntel64: - enabled: 1 - settings: - CPU: AnyCPU - OSXUniversal: - enabled: 1 - settings: - CPU: AnyCPU - WebGL: - enabled: 0 - settings: {} - Win: - enabled: 1 - settings: - CPU: AnyCPU - Win64: - enabled: 0 - settings: - CPU: None - iOS: - enabled: 0 - settings: - CompileFlags: - FrameworkDependencies: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/UltraControls/Plugins/x86/NativeUltraControlsPluginD.dll b/Unity-19050-05-BallPool/Assets/UnityUtils/UltraControls/Plugins/x86/NativeUltraControlsPluginD.dll deleted file mode 100644 index 0d60425..0000000 Binary files a/Unity-19050-05-BallPool/Assets/UnityUtils/UltraControls/Plugins/x86/NativeUltraControlsPluginD.dll and /dev/null differ diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/UltraControls/Plugins/x86/NativeUltraControlsPluginD.dll.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/UltraControls/Plugins/x86/NativeUltraControlsPluginD.dll.meta deleted file mode 100644 index c2fa725..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/UltraControls/Plugins/x86/NativeUltraControlsPluginD.dll.meta +++ /dev/null @@ -1,79 +0,0 @@ -fileFormatVersion: 2 -guid: c8cd0c3ab43278948b0490aff7de38f7 -timeCreated: 1490168698 -licenseType: Free -PluginImporter: - serializedVersion: 1 - iconMap: {} - executionOrder: {} - isPreloaded: 0 - isOverridable: 0 - platformData: - Android: - enabled: 0 - settings: - CPU: ARMv7 - Any: - enabled: 0 - settings: - Exclude Android: 1 - Exclude Editor: 0 - Exclude Linux: 0 - Exclude Linux64: 0 - Exclude LinuxUniversal: 0 - Exclude OSXIntel: 0 - Exclude OSXIntel64: 0 - Exclude OSXUniversal: 0 - Exclude WebGL: 1 - Exclude Win: 0 - Exclude Win64: 1 - Exclude iOS: 1 - Editor: - enabled: 1 - settings: - CPU: x86 - DefaultValueInitialized: true - OS: Windows - Linux: - enabled: 1 - settings: - CPU: x86 - Linux64: - enabled: 1 - settings: - CPU: x86_64 - LinuxUniversal: - enabled: 1 - settings: - CPU: AnyCPU - OSXIntel: - enabled: 1 - settings: - CPU: AnyCPU - OSXIntel64: - enabled: 1 - settings: - CPU: AnyCPU - OSXUniversal: - enabled: 1 - settings: - CPU: AnyCPU - WebGL: - enabled: 0 - settings: {} - Win: - enabled: 1 - settings: - CPU: AnyCPU - Win64: - enabled: 0 - settings: - CPU: None - iOS: - enabled: 0 - settings: - CompileFlags: - FrameworkDependencies: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/UltraControls/Plugins/x86_64.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/UltraControls/Plugins/x86_64.meta deleted file mode 100644 index ad65e99..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/UltraControls/Plugins/x86_64.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 29a8e98e532e4bc49a6256d9a93608e2 -folderAsset: yes -timeCreated: 1490168671 -licenseType: Free -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/UltraControls/Plugins/x86_64/NativeUltraControlsPlugin.dll b/Unity-19050-05-BallPool/Assets/UnityUtils/UltraControls/Plugins/x86_64/NativeUltraControlsPlugin.dll deleted file mode 100644 index 0bb326c..0000000 Binary files a/Unity-19050-05-BallPool/Assets/UnityUtils/UltraControls/Plugins/x86_64/NativeUltraControlsPlugin.dll and /dev/null differ diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/UltraControls/Plugins/x86_64/NativeUltraControlsPlugin.dll.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/UltraControls/Plugins/x86_64/NativeUltraControlsPlugin.dll.meta deleted file mode 100644 index 3cc1cfc..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/UltraControls/Plugins/x86_64/NativeUltraControlsPlugin.dll.meta +++ /dev/null @@ -1,76 +0,0 @@ -fileFormatVersion: 2 -guid: 16109f1d0eae43b4faeca3548066e341 -timeCreated: 1490168675 -licenseType: Free -PluginImporter: - serializedVersion: 1 - iconMap: {} - executionOrder: {} - isPreloaded: 0 - isOverridable: 0 - platformData: - Android: - enabled: 0 - settings: - CPU: ARMv7 - Any: - enabled: 0 - settings: - Exclude Android: 1 - Exclude Editor: 0 - Exclude Linux: 0 - Exclude Linux64: 0 - Exclude LinuxUniversal: 0 - Exclude OSXIntel: 0 - Exclude OSXIntel64: 0 - Exclude OSXUniversal: 0 - Exclude WebGL: 1 - Exclude Win: 1 - Exclude Win64: 0 - Exclude iOS: 1 - Editor: - enabled: 1 - settings: - CPU: x86_64 - DefaultValueInitialized: true - OS: Windows - Linux: - enabled: 1 - settings: - CPU: x86 - Linux64: - enabled: 1 - settings: - CPU: x86_64 - LinuxUniversal: - enabled: 1 - settings: - CPU: AnyCPU - OSXIntel: - enabled: 1 - settings: - CPU: AnyCPU - OSXIntel64: - enabled: 1 - settings: - CPU: AnyCPU - OSXUniversal: - enabled: 1 - settings: - CPU: AnyCPU - Win: - enabled: 0 - settings: - CPU: None - Win64: - enabled: 1 - settings: - CPU: AnyCPU - iOS: - enabled: 0 - settings: - CompileFlags: - FrameworkDependencies: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/UltraControls/Plugins/x86_64/NativeUltraControlsPluginD.dll b/Unity-19050-05-BallPool/Assets/UnityUtils/UltraControls/Plugins/x86_64/NativeUltraControlsPluginD.dll deleted file mode 100644 index 9e26acd..0000000 Binary files a/Unity-19050-05-BallPool/Assets/UnityUtils/UltraControls/Plugins/x86_64/NativeUltraControlsPluginD.dll and /dev/null differ diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/UltraControls/Plugins/x86_64/NativeUltraControlsPluginD.dll.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/UltraControls/Plugins/x86_64/NativeUltraControlsPluginD.dll.meta deleted file mode 100644 index 5ebb55f..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/UltraControls/Plugins/x86_64/NativeUltraControlsPluginD.dll.meta +++ /dev/null @@ -1,76 +0,0 @@ -fileFormatVersion: 2 -guid: 0486b2cee0559e943b52491a86dc35b8 -timeCreated: 1490168675 -licenseType: Free -PluginImporter: - serializedVersion: 1 - iconMap: {} - executionOrder: {} - isPreloaded: 0 - isOverridable: 0 - platformData: - Android: - enabled: 0 - settings: - CPU: ARMv7 - Any: - enabled: 0 - settings: - Exclude Android: 1 - Exclude Editor: 0 - Exclude Linux: 0 - Exclude Linux64: 0 - Exclude LinuxUniversal: 0 - Exclude OSXIntel: 0 - Exclude OSXIntel64: 0 - Exclude OSXUniversal: 0 - Exclude WebGL: 1 - Exclude Win: 1 - Exclude Win64: 0 - Exclude iOS: 1 - Editor: - enabled: 1 - settings: - CPU: x86_64 - DefaultValueInitialized: true - OS: Windows - Linux: - enabled: 1 - settings: - CPU: x86 - Linux64: - enabled: 1 - settings: - CPU: x86_64 - LinuxUniversal: - enabled: 1 - settings: - CPU: AnyCPU - OSXIntel: - enabled: 1 - settings: - CPU: AnyCPU - OSXIntel64: - enabled: 1 - settings: - CPU: AnyCPU - OSXUniversal: - enabled: 1 - settings: - CPU: AnyCPU - Win: - enabled: 0 - settings: - CPU: None - Win64: - enabled: 1 - settings: - CPU: AnyCPU - iOS: - enabled: 0 - settings: - CompileFlags: - FrameworkDependencies: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/UltraControls/UltraControls.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/UltraControls/UltraControls.cs deleted file mode 100644 index cb36acc..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/UltraControls/UltraControls.cs +++ /dev/null @@ -1,423 +0,0 @@ -using UnityEngine; -using System.Collections.Generic; - -namespace UltraControls -{ - [ExecuteInEditMode] - public class Handler : MonoBehaviour - { - public static uint InvalidHandle = 0; - - public static bool is_singleton_lived - { - get { return s_instance != null; } - } - - public static Handler singleton - { - get - { - if (s_instance != null) - { - return s_instance; - } - - - s_instance = GameObject.FindObjectOfType(); - if (s_instance != null) - { - return s_instance; - } - - GameObject obj = new GameObject("UltraControls::Handler"); - obj.hideFlags = HideFlags.DontSave; - s_instance = obj.AddComponent(); - - return s_instance; - } - } - - void Awake() - { - //Debug.Log("UltraControls.Handler.Awake()"); - - if (s_instance != null && s_instance != this) - { -#if UNITY_EDITOR - DestroyImmediate(this.gameObject); -#else - Destroy(this.gameObject); -#endif - return; - } - - s_instance = this; - if (Application.isPlaying) - { - DontDestroyOnLoad(this); - } - } - - void OnEnable() - { - //Debug.Log("UltraControls.Handler.OnEnable()"); - - if (m_is_enable) - { - return; - } - - NativeLib.Init(); - m_map_info = new Dictionary(); - m_is_enable = true; - } - - void Start() - { - //Debug.Log("UltraControls.Handler.Start()"); - } - - void Update() - { - - } - - void OnDisable() - { - //Debug.Log("UltraControls.Handler.OnDisable()"); - - m_is_enable = false; - s_instance = null; - NativeLib.Term(); - } - - public bool IsExisted(uint handle) - { - if (!m_is_enable) - return false; - - return m_map_info.ContainsKey(handle); - } - - public uint Create(string name, uint max_ctrls) - { - if (!m_is_enable) - return InvalidHandle; - - uint handle; - int ret = NativeLib.CreateHandle(name, max_ctrls, out handle); - if (ret < 0) - { - return InvalidHandle; - } - - UltraInfo info; - if (ret == 1 && m_map_info.TryGetValue(handle, out info)) - { - ++info.ref_count; - return handle; - } - - info = new UltraInfo(); - info.raw_ctrls = Utils.AllocAryRawCtrl(max_ctrls); - info.ref_count = 1; - m_map_info.Add(handle, info); - return handle; - } - - public void Destroy(uint handle) - { - if (!m_is_enable) - return; - - if (handle == InvalidHandle) - { - return; - } - - UltraInfo info; - if (m_map_info.TryGetValue(handle, out info)) - { - if (--info.ref_count > 0) - { - return; - } - - if (info.controls != null) - { - foreach (Control ctrl in info.controls) - { - ctrl.Die(); - } - } - - m_map_info.Remove(handle); - NativeLib.DestroyHandle(handle); - } - } - - - public Control[] FindGetter(uint handle) - { - if (!m_is_enable) - return null; - - UltraInfo info; - if (!m_map_info.TryGetValue(handle, out info)) - { - return null; - } - - if (info.controls != null) - { - return info.controls; - } - - uint count = 0; - int ret = NativeLib.FindGetter(handle, info.raw_ctrls, (uint)info.raw_ctrls.Length, out count); - if (ret != 1) - { - return null; - } - - info.controls = new Control[count]; - - for (uint i = 0; i < count; ++i) - { - info.controls[i] = new Control(ref info.raw_ctrls[i]); - } - - return info.controls; - } - - public void SetControls(uint handle) - { - if (!m_is_enable) - return; - - UltraInfo info; - if (!m_map_info.TryGetValue(handle, out info)) - { - return; - } - - if (info.controls == null) - { - return; - } - - for (uint i = 0; i < info.controls.Length; ++i) - { - Control ctrl = info.controls[i]; - if (ctrl.isDirty) - { - info.is_dirty = true; - info.raw_ctrls[i].data = ctrl.data; - } - } - - if (!info.is_dirty) - { - return; - } - - info.is_internal_dirty = true; - int ret = NativeLib.SetControls(handle, info.raw_ctrls, (uint)info.raw_ctrls.Length); - if (ret == 1) - { - info.is_dirty = false; - } - } - - public Control[] SetupGetter(uint handle, List list) - { - if (!m_is_enable) - return null; - - UltraInfo info; - if (!m_map_info.TryGetValue(handle, out info)) - { - return null; - } - - int max_count = System.Math.Min(list.Count, info.raw_ctrls.Length); - uint ok_count = 0; - - for (int i = 0; i < max_count; ++i) - { - bool yes = mf_SetupRawCtrl(list[i], ref info.raw_ctrls[ok_count]); - if (!yes) - { - continue; - } - - ++ok_count; - } - - int ret = NativeLib.CreateGetter(handle, info.raw_ctrls, ok_count); - if (ret < 0) - { - return null; - } - - info.controls = new Control[ok_count]; - - for (uint i = 0; i < ok_count; ++i) - { - info.controls[i] = new Control(ref info.raw_ctrls[i]); - } - - return info.controls; - } - - public bool CheckControls(uint handle) - { - if (!m_is_enable) - return false; - - UltraInfo info; - if (!m_map_info.TryGetValue(handle, out info)) - { - return false; - } - - if (info.controls == null) - { - return false; - } - - if (info.is_internal_dirty) - { - info.is_internal_dirty = false; - return true; - } - - uint count = 0; - int ret = NativeLib.CheckControls(handle, info.raw_ctrls, (uint)info.raw_ctrls.Length, out count); - if (ret <= 0) - { - return false; - } - - count = System.Math.Min(count, (uint)info.controls.Length); - - for (uint i = 0; i < count; ++i) - { - info.controls[i].data = info.raw_ctrls[i].data; - } - - return true; - } - - private class UltraInfo - { - public RawCtrl[] raw_ctrls; - public Control[] controls; - public uint ref_count; - public bool is_dirty; - public bool is_internal_dirty; - } - - //[SerializeField] - private static Handler s_instance; - - private Dictionary m_map_info; - private bool m_is_enable; - - private bool mf_SetupRawCtrl(ControlInfo info, ref RawCtrl raw_ctrl) - { - CtrlType type = CtrlType.Unknown; - if (info.m_type == typeof(string)) - { - type = CtrlType.Text; - System.Array.Clear(raw_ctrl.data, 0, raw_ctrl.data.Length); - byte[] bytes = System.Text.Encoding.ASCII.GetBytes((string)info.m_value_default); - System.Buffer.BlockCopy(bytes, 0, raw_ctrl.data, 0, System.Math.Min(bytes.Length, raw_ctrl.data.Length)); - raw_ctrl.data[raw_ctrl.data.Length - 1] = 0; - } - else if (info.m_type == typeof(Color32)) - { - type = CtrlType.Color; - Utils.SetColor32((Color32)info.m_value_default, raw_ctrl.data);; - } - else - { - CtrlValues values = Utils.AllocCtrlVaules(); - - if (info.m_type == typeof(bool)) - { - type = CtrlType.Bool; - values.val[0] = ((bool)info.m_value_default)? 1.0f: 0.0f; - } - else if (info.m_type == typeof(float)) - { - type = CtrlType.Float; - values.val[0] = (float)info.m_value_default; - if (info.m_has_range) - { - values.min[0] = (float)info.m_value_min; - values.max[0] = (float)info.m_value_max; - } - } - else if (info.m_type == typeof(int)) - { - type = CtrlType.Int; - values.val[0] = (int)info.m_value_default; - if (info.m_has_range) - { - values.min[0] = (int)info.m_value_min; - values.max[0] = (int)info.m_value_max; - } - } - else if (info.m_type == typeof(Vector2)) - { - type = CtrlType.Vec2F; - Utils.SetVec2((Vector2)info.m_value_default, values.val); - if (info.m_has_range) - { - Utils.SetVec2((Vector2)info.m_value_min, values.min); - Utils.SetVec2((Vector2)info.m_value_max, values.max); - } - } - else if (info.m_type == typeof(Vector3)) - { - type = CtrlType.Vec3F; - Utils.SetVec3((Vector3)info.m_value_default, values.val); - if (info.m_has_range) - { - Utils.SetVec3((Vector3)info.m_value_min, values.min); - Utils.SetVec3((Vector3)info.m_value_max, values.max); - } - } - else if (info.m_type == typeof(Vector4)) - { - type = CtrlType.Vec4F; - Utils.SetVec4((Vector4)info.m_value_default, values.val); - if (info.m_has_range) - { - Utils.SetVec4((Vector4)info.m_value_min, values.min); - Utils.SetVec4((Vector4)info.m_value_max, values.max); - } - } - else if (info.m_type == typeof(Color)) - { - type = CtrlType.ColorF; - Utils.SetColor((Color)info.m_value_default, values.val); - } - else - { - return false; - } - - Utils.StructureToBytes(values, raw_ctrl.data); - } - - raw_ctrl.name = info.m_name; - raw_ctrl.type = (uint)type; - return true; - } - - - }//Handler - -}//Namespace UltraControls diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/UltraControls/UltraControls.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/UltraControls/UltraControls.cs.meta deleted file mode 100644 index dea649d..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/UltraControls/UltraControls.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: b53175ac29429e74696f538d423ae2c5 -timeCreated: 1490168672 -licenseType: Free -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/UltraControls/UltraControlsAttribute.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/UltraControls/UltraControlsAttribute.cs deleted file mode 100644 index 8613684..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/UltraControls/UltraControlsAttribute.cs +++ /dev/null @@ -1,37 +0,0 @@ - -[System.AttributeUsage(System.AttributeTargets.All)] -public class UltraControlsAttribute : System.Attribute -{ - public enum BindingFlag - { - Getter, - } - - public UltraControlsAttribute(BindingFlag flag, string ultractrls_name, string ctrl_name) - { - m_flag = flag; - m_ultracontrols_name = ultractrls_name; - m_control_name = ctrl_name; - } - - public UltraControlsAttribute(string ultractrls_name, string ctrl_name) - : this(BindingFlag.Getter, ultractrls_name, ctrl_name) - { - - } - - public UltraControlsAttribute(string ultractrls_name) - : this(BindingFlag.Getter, ultractrls_name, "") - { - - } - - public string ultracontrols_name { get { return m_ultracontrols_name; } } - public string control_name { get { return m_control_name; } } - public BindingFlag binding_flag { get { return m_flag; } } - - private string m_ultracontrols_name; - private string m_control_name; - private BindingFlag m_flag; - -} \ No newline at end of file diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/UltraControls/UltraControlsAttribute.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/UltraControls/UltraControlsAttribute.cs.meta deleted file mode 100644 index 0b1556b..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/UltraControls/UltraControlsAttribute.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 08b0b6bdf7bcd5d46bd7a5fca0ea0329 -timeCreated: 1494834955 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/UltraControls/UltraGetter.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/UltraControls/UltraGetter.cs deleted file mode 100644 index 7ac5221..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/UltraControls/UltraGetter.cs +++ /dev/null @@ -1,533 +0,0 @@ -using UnityEngine; -using System.Collections.Generic; -using System.Reflection; -using System; - -namespace UltraControls -{ - using MapCtrlInfo = Dictionary; - using MapCtrl = Dictionary; - - public class UltraGetter : MonoBehaviour - { - public delegate void OnCompletedSetupGetter(UltraGetter getter); - public event OnCompletedSetupGetter EventComplemtedSetupGetter; - - public bool is_start - { - get { return m_is_started; } - set - { - m_is_started = value; - if (!m_is_started && m_handle != Handler.InvalidHandle) - { - mf_Destroy(); - } - - } - } - - public string ultracontros_name - { - get { return m_name; } - set - { - if (m_is_started && m_handle != Handler.InvalidHandle) - { - mf_Destroy(); - } - - m_name = value; - //m_relative_filepath_settings_default = Path.Combine(Utils.GetRelativeDefaultDir(), mf_PleaseCallMyRealName() + ".json"); - } - } - - public bool AddControlInfo< T > (string name, T val, T min, T max) - { - if (is_start) - { - m_need_restart = true; - } - - if (m_map_ctrl_info.ContainsKey(name)) - { - return false; - } - - m_map_ctrl_info.Add(name, Factroy.CreateInfo(name, val, min, max) ); - return true; - } - - public bool AddControlInfo(string name, T val) - { - if (is_start) - { - m_need_restart = true; - } - - if (m_map_ctrl_info.ContainsKey(name)) - { - return false; - } - - m_map_ctrl_info.Add(name, Factroy.CreateInfo(name, val)); - return true; - } - - public void RemoveControlInfo(string name) - { - if (is_start) - { - m_need_restart = true; - } - - m_map_ctrl_info.Remove(name); - } - - public ParamGetter GetParamGetter(string name) - { - Control ctrl; - if (!m_map_ctrl.TryGetValue(name, out ctrl)) - { - return null; - } - - return ctrl.CreateParamGetter(); - } - - void Start() - { - - } - - void Update() - { - mf_Update(); - } - -#if UNITY_EDITOR - public void UpdateByUltraGetterEditor() - { - mf_Update(); - } - -#endif - //=============================================================== - //Private member or function - //=============================================================== - private uint m_handle = Handler.InvalidHandle; - - [SerializeField] - private string m_name = "UnityGetter"; - - [SerializeField] - private bool m_is_started; - - private bool m_need_restart; - - private MapCtrlInfo m_map_info; - private MapCtrl m_map; - private Control[] m_controls; - private IDelegatable[] m_delegates; - - interface IDelegatable - { - bool Setup(Control[] ctrls); - void Invoke(); - } - - public class DelegateFieldSetValue< T >: IDelegatable - { - public DelegateFieldSetValue(object mono, FieldInfo field, string name) - { - m_method = typeof(FieldInfo).GetMethod("SetValue", new[] { typeof(object), typeof(object) }); - m_instance = field; - m_mono = mono; - m_name = name; - } - - public bool Setup(Control[] ctrls) - { - foreach(Control ctrl in ctrls) - { - if (ctrl.name == m_name) - { - m_param_getter = ctrl.CreateParamGetter< T >(); - return true; - } - } - - return false; - } - - public void Invoke() - { - //m_dele.DynamicInvoke(new object[] { m_mono, m_param_getter.val}); - m_method.Invoke(m_instance, new object[] { m_mono, m_param_getter.val }); - } - - private string m_name; - private MethodInfo m_method; - private object m_instance; - private object m_mono; - private ParamGetter< T > m_param_getter; - } - - private MapCtrlInfo m_map_ctrl_info - { - get - { - if (m_map_info == null) - { - m_map_info = new MapCtrlInfo(); - } - - return m_map_info; - - } - } - - private MapCtrl m_map_ctrl - { - get - { - if (m_map == null) - { - m_map = new MapCtrl(); - } - - return m_map; - } - } - - private bool mf_HasHandle() - { - return m_handle != Handler.InvalidHandle && Handler.singleton.IsExisted(m_handle); - } - - private void mf_Restart() - { - is_start = false; - is_start = true; - - m_need_restart = false; - } - - private void mf_Update() - { - if (m_need_restart) - { - mf_Restart(); - } - - if (!m_is_started) - { - return; - } - - if (!mf_HasHandle()) - { - m_handle = Handler.singleton.Create(m_name, 32); - return; - } - - if (m_controls == null) - { - List lst_info = new List(); - List lst_dele = new List(); - - mf_FindAttribues2(lst_info, lst_dele); - - lst_info.AddRange(m_map_ctrl_info.Values); - - m_controls = Handler.singleton.SetupGetter(m_handle, lst_info); - if (m_controls != null) - { - foreach(IDelegatable dele in lst_dele) - { - if(!dele.Setup(m_controls)) - { - lst_dele.Remove(dele); - } - } - - if (lst_dele.Count > 0) - { - m_delegates = lst_dele.ToArray(); - } - - foreach (Control ctrl in m_controls) - { - m_map_ctrl.Add(ctrl.name, ctrl); - } - - if (EventComplemtedSetupGetter != null) - { - EventComplemtedSetupGetter(this); - } - } - - return; - } - - bool yes = Handler.singleton.CheckControls(m_handle); - if (!yes) - { - return; - } - - if (m_delegates == null) - { - return; - } - - foreach(IDelegatable dele in m_delegates) - { - dele.Invoke(); - } - } - - private void mf_Destroy() - { - if (Handler.is_singleton_lived) - { - Handler.singleton.Destroy(m_handle); - } - - m_handle = Handler.InvalidHandle; - m_controls = null; - m_delegates = null; - - if (m_map != null) - { - m_map.Clear(); - } - } - - /* - private void mf_FindAttribuesFromBehavior(List lst_info, List lst_delegate, object behavior, BindingFlags bingingFlag) - { - foreach (FieldInfo field in (behavior.GetType().GetFields(bingingFlag))) - { - UltraControlsAttribute attr_ultracontrols = null; - RangeAttribute attr_range = null; - - foreach (object attribute in field.GetCustomAttributes(true)) - { - { - var attr = attribute as UltraControlsAttribute; - if (attr != null && attr.binding_flag == UltraControlsAttribute.BindingFlag.Getter) - { - attr_ultracontrols = attr; - continue; - } - } - - { - var attr = attribute as RangeAttribute; - if (attr != null) - { - attr_range = attr; - } - } - - }//attributes - - if (attr_ultracontrols == null) - { - continue; - } - - ControlInfo info = null; - IDelegatable dele = null; - { - string name = (attr_ultracontrols.control_name == "") ? field.Name : attr_ultracontrols.control_name; - if (field.FieldType == typeof(string)) - { - info = Factroy.CreateInfo(name, (string)field.GetValue(behavior)); - dele = new DelegateFieldSetValue(behavior, field, name); - } - else if (field.FieldType == typeof(float)) - { - if (attr_range == null) - { - info = Factroy.CreateInfo(name, (float)field.GetValue(behavior)); - } - else - { - info = Factroy.CreateInfo(name, (float)field.GetValue(behavior), attr_range.min, attr_range.max); - } - - dele = new DelegateFieldSetValue(behavior, field, name); - } - else if (field.FieldType == typeof(int)) - { - if (attr_range == null) - { - info = Factroy.CreateInfo(name, (int)field.GetValue(behavior)); - } - else - { - info = Factroy.CreateInfo(name, (int)field.GetValue(behavior), (int)attr_range.min, (int)attr_range.max); - } - - dele = new DelegateFieldSetValue(behavior, field, name); - } - else if (field.FieldType == typeof(Vector2)) - { - info = Factroy.CreateInfo(name, (Vector2)field.GetValue(behavior)); - dele = new DelegateFieldSetValue(behavior, field, name); - } - else if (field.FieldType == typeof(Vector3)) - { - info = Factroy.CreateInfo(name, (Vector3)field.GetValue(behavior)); - dele = new DelegateFieldSetValue(behavior, field, name); - } - else if (field.FieldType == typeof(Vector4)) - { - info = Factroy.CreateInfo(name, (Vector4)field.GetValue(behavior)); - dele = new DelegateFieldSetValue(behavior, field, name); - } - else if (field.FieldType == typeof(Color)) - { - info = Factroy.CreateInfo(name, (Color)field.GetValue(behavior)); - dele = new DelegateFieldSetValue(behavior, field, name); - } - else if (field.FieldType == typeof(Color32)) - { - info = Factroy.CreateInfo(name, (Color32)field.GetValue(behavior)); - dele = new DelegateFieldSetValue(behavior, field, name); - } - - if (info != null) - { - lst_info.Add(info); - lst_delegate.Add(dele); - } - - } - - }//fields - } - */ - - /* - private void mf_FindAttribuesFromComponent< Component > (List lst_info, List lst_delegate, BindingFlags bingingFlag) - { - var components = gameObject.GetComponentsInChildren< Component >(true); - - foreach (Component component in components) - { - if (component == null) - continue; - - mf_FindAttribuesFromBehavior(lst_info, lst_delegate, component, bingingFlag); - - }//monos - } - */ - - private void mf_FindAttribues2(List lst_info, List lst_delegate) - { - Utils.FindUltraControlsAttribues(this, UltraControlsAttribute.BindingFlag.Getter, - (object sender, object behavior, FieldInfo field, UltraControlsAttribute attr_ultracontrols, RangeAttribute attr_range) => - { - ControlInfo info = null; - IDelegatable dele = null; - { - string name = (attr_ultracontrols.control_name == "") ? field.Name : attr_ultracontrols.control_name; - if (field.FieldType == typeof(string)) - { - info = Factroy.CreateInfo(name, (string)field.GetValue(behavior)); - dele = new DelegateFieldSetValue(behavior, field, name); - } - else if (field.FieldType == typeof(float)) - { - if (attr_range == null) - { - info = Factroy.CreateInfo(name, (float)field.GetValue(behavior)); - } - else - { - info = Factroy.CreateInfo(name, (float)field.GetValue(behavior), attr_range.min, attr_range.max); - } - - dele = new DelegateFieldSetValue(behavior, field, name); - } - else if (field.FieldType == typeof(int)) - { - if (attr_range == null) - { - info = Factroy.CreateInfo(name, (int)field.GetValue(behavior)); - } - else - { - info = Factroy.CreateInfo(name, (int)field.GetValue(behavior), (int)attr_range.min, (int)attr_range.max); - } - - dele = new DelegateFieldSetValue(behavior, field, name); - } - else if (field.FieldType == typeof(Vector2)) - { - info = Factroy.CreateInfo(name, (Vector2)field.GetValue(behavior)); - dele = new DelegateFieldSetValue(behavior, field, name); - } - else if (field.FieldType == typeof(Vector3)) - { - info = Factroy.CreateInfo(name, (Vector3)field.GetValue(behavior)); - dele = new DelegateFieldSetValue(behavior, field, name); - } - else if (field.FieldType == typeof(Vector4)) - { - info = Factroy.CreateInfo(name, (Vector4)field.GetValue(behavior)); - dele = new DelegateFieldSetValue(behavior, field, name); - } - else if (field.FieldType == typeof(Color)) - { - info = Factroy.CreateInfo(name, (Color)field.GetValue(behavior)); - dele = new DelegateFieldSetValue(behavior, field, name); - } - else if (field.FieldType == typeof(Color32)) - { - info = Factroy.CreateInfo(name, (Color32)field.GetValue(behavior)); - dele = new DelegateFieldSetValue(behavior, field, name); - } - - if (info != null) - { - lst_info.Add(info); - lst_delegate.Add(dele); - } - } - - }); - - //Utils.FindUltraControlsAttribues< > - } - - /* - private void mf_FindAttribues(List lst_info, List lst_delegate) - { - BindingFlags bingingFlag = BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Public; - mf_FindAttribuesFromComponent< MonoBehaviour >(lst_info, lst_delegate, bingingFlag); - - var animators = gameObject.GetComponentsInChildren(true); - foreach (Animator animator in animators) - { - if (animator == null) - continue; - - var behaviours = animator.GetBehaviours(); - foreach(StateMachineBehaviour behaviour in behaviours) - { - mf_FindAttribuesFromBehavior(lst_info, lst_delegate, behaviour, bingingFlag); - - }//behaviours - - }//animators - - }// mf_FindAttribues() - */ - } -} - diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/UltraControls/UltraGetter.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/UltraControls/UltraGetter.cs.meta deleted file mode 100644 index d760d6a..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/UltraControls/UltraGetter.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: a91ed773abd22c44baaa91141e056d45 -timeCreated: 1490168671 -licenseType: Free -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/UltraControls/UltraSetter.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/UltraControls/UltraSetter.cs deleted file mode 100644 index 62df808..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/UltraControls/UltraSetter.cs +++ /dev/null @@ -1,315 +0,0 @@ -using UnityEngine; -using System.Collections.Generic; -using System; -using System.IO; - -namespace UltraControls -{ - using MapCtrl = Dictionary; - - [ExecuteInEditMode] - [Serializable] - public class UltraSetter : MonoBehaviour/*, ISerializationCallbackReceiver*/ - { - public delegate void OnFoundGetter(UltraSetter sender); - public event OnFoundGetter EventFoundGetter; - - public Control[] controls - { - get - { - return m_controls; - } - } - - public bool is_start - { - get { return m_is_started; } - set - { - m_is_started = value; - if (!m_is_started && m_handle != Handler.InvalidHandle) - { - mf_Destroy(); - } - - } - } - - public string ultracontros_name - { - get { return m_name; } - set - { - if (m_is_started && m_handle != Handler.InvalidHandle) - { - mf_Destroy(); - } - - m_name = value; - m_relative_filepath_settings_default = Path.Combine(Utils.GetRelativeDefaultDir(), mf_PleaseCallMyRealName() + ".json"); - } - } - - public string filepath_settings - { - get - { - if (m_filepath_settings == "") - { - return Path.Combine(Directory.GetParent(Application.dataPath).FullName, m_relative_filepath_settings_default); - } - - return m_filepath_settings; - } - - set - { - m_filepath_settings = value; - } - } - - - //=============================================================== - //MonoBehaviour - //=============================================================== - void Awake() - { - m_map = new MapCtrl(); - } - - void Start() - { - - } - - void Update() - { - mf_Update(); - } - - void OnDisable() - { - mf_Destroy(); - } - - //void OnGUI() - //{ - // Transform trans = gameObject.GetComponent(); - // Camera cam = Camera.current; - // if (cam == null) - // { - // return; - // } - // - // Vector3 pos = cam.WorldToScreenPoint(trans.position); - // GUI.Label(new Rect(pos.x, pos.y, 100, 20), "id=" + m_identifierInFile); - //} - - void OnTransformParentChanged() - { - m_relative_filepath_settings_default = Path.Combine(Utils.GetRelativeDefaultDir(), mf_PleaseCallMyRealName() + ".json"); - } - - //=============================================================== - //ISerializationCallbackReceiver - //=============================================================== - //public void OnBeforeSerialize() - //{ - // - //} - // - //public void OnAfterDeserialize() - //{ - // - //} - - //=============================================================== - //Other - //=============================================================== - - public bool SaveSettings() - { - string json_text = Utils.ToJson(m_controls); - File.WriteAllText(filepath_settings, json_text); - return true; - } - - public bool LoadSettings() - { - if (!File.Exists(filepath_settings)) - { - return false; - } - - var sr = File.OpenText(filepath_settings); - var json = sr.ReadToEnd(); - Utils.FromJson(json, m_controls); - return true; - } - - public ParamSetter< T > GetParamSetter< T > (string name) - { - Control ctrl; - if (!m_map_ctrl.TryGetValue(name, out ctrl)) - { - return null; - } - - return ctrl.CreateParamSetter(); - } - - -#if UNITY_EDITOR - public bool UpdateIdentifierInFile() - { - if (m_identifierInFile > 0) - { - return false; - } - - long identifierInFile = Utils.GetLocalIdentifierInFileForObject(this); - if (identifierInFile != m_identifierInFile) - { - m_identifierInFile = identifierInFile; - if (m_identifierInFile > 0 && m_relative_filepath_settings_default == "") - { - m_relative_filepath_settings_default = Path.Combine(Utils.GetRelativeDefaultDir(), mf_PleaseCallMyRealName() + ".json"); - } - return true; - } - - return false; - } - - public void UpdateByUltraSetterEditor() - { - mf_Update(); - } - -#endif - - //=============================================================== - //Private member or function - //=============================================================== - - private uint m_handle = Handler.InvalidHandle; - private Control[] m_controls; - private MapCtrl m_map; - - [SerializeField] - private string m_name = "ResolumeArena"; - - [SerializeField] - private bool m_is_started = false; - - [SerializeField] - private bool m_auto_load_after_finding_getter = true; - - [SerializeField] - private long m_identifierInFile = -1; - - [SerializeField] - private string m_filepath_settings = ""; - - [SerializeField] - private string m_relative_filepath_settings_default = ""; - - private string mf_PleaseCallMyRealName() - { - string real_name = "UltraSetter"; - - Transform trans = this.transform; - - while (trans != null) - { - real_name = trans.gameObject.name + "-" + real_name; - trans = trans.parent; - } - - real_name = "[" + m_name + "]" + real_name; - if (m_identifierInFile >= 0) - { - real_name += "-" + m_identifierInFile; - } - return real_name; - } - - private bool mf_HasHandle() - { - return m_handle != Handler.InvalidHandle && Handler.singleton.IsExisted(m_handle); - } - - private void mf_Destroy() - { - if (Handler.is_singleton_lived) - { - Handler.singleton.Destroy(m_handle); - } - - m_handle = Handler.InvalidHandle; - m_controls = null; - - if (m_map != null) - { - m_map.Clear(); - } - } - - private MapCtrl m_map_ctrl - { - get - { - if (m_map == null) - { - m_map = new MapCtrl(); - } - - return m_map; - } - } - - private void mf_Update() - { - if (!m_is_started) - { - return; - } - - if (!mf_HasHandle()) - { - m_handle = Handler.singleton.Create(m_name, 32); - return; - } - - if (m_controls == null) - { - m_controls = Handler.singleton.FindGetter(m_handle); - if (m_controls != null) - { - if (m_auto_load_after_finding_getter) - { - LoadSettings(); - } - - foreach(Control ctrl in m_controls) - { - m_map_ctrl.Add(ctrl.name, ctrl); - } - - if (EventFoundGetter != null) - { - EventFoundGetter(this); - } - } - - return; - } - - Handler.singleton.SetControls(m_handle); - } - } -} - - - diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/UltraControls/UltraSetter.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/UltraControls/UltraSetter.cs.meta deleted file mode 100644 index ea99aa9..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/UltraControls/UltraSetter.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 6abc65dc40f983043b48a65131b2df8c -timeCreated: 1490168671 -licenseType: Free -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/UltraControls/UltraUtils.cs b/Unity-19050-05-BallPool/Assets/UnityUtils/UltraControls/UltraUtils.cs deleted file mode 100644 index c317099..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/UltraControls/UltraUtils.cs +++ /dev/null @@ -1,603 +0,0 @@ -#define UNITY_5_PLUS -#if UNITY_4_5 || UNITY_4_6 || UNITY_4_7 || UNITY_4_8 || UNITY_4_9 -#undef UNITY_5_PLUS -#endif - -using System; -using System.Runtime.InteropServices; -//using UnityEditor; -using System.Reflection; -using UnityEngine; -using System.Collections.Generic; -using Newtonsoft.Json; - -namespace UltraControls -{ - public class JsonVector2 - { - public CtrlType type; - public float x; - public float y; - - public JsonVector2(Vector2 vec2) - { - x = vec2.x; - y = vec2.y; - type = CtrlType.Vec2F; - } - - public Vector2 To() - { - return new Vector2(x, y); - } - } - - public class JsonVector3 - { - public CtrlType type; - public float x; - public float y; - public float z; - - public JsonVector3(Vector3 vec3) - { - x = vec3.x; - y = vec3.y; - z = vec3.z; - type = CtrlType.Vec3F; - } - - public Vector3 To() - { - return new Vector3(x, y, z); - } - } - - public class JsonVector4 - { - public CtrlType type; - public float x; - public float y; - public float z; - public float w; - - public JsonVector4(Vector4 vec4) - { - x = vec4.x; - y = vec4.y; - z = vec4.z; - w = vec4.w; - type = CtrlType.Vec4F; - } - - public Vector4 To() - { - return new Vector4(x, y, z, w); - } - } - - public class JsonColor - { - public CtrlType type; - public float r; - public float g; - public float b; - public float a; - - public JsonColor(Color color) - { - r = color.r; - g = color.g; - b = color.b; - a = color.a; - type = CtrlType.ColorF; - } - - public Color To() - { - return new Color(r, g, b, a); - } - } - - public class JsonColor32 - { - public CtrlType type; - public byte r; - public byte g; - public byte b; - public byte a; - - public JsonColor32(Color32 color) - { - r = color.r; - g = color.g; - b = color.b; - a = color.a; - type = CtrlType.Color; - } - - public Color32 To() - { - return new Color32(r, g, b, a); - } - } - - public sealed class Utils - { - public static string ToJson(Control[] controls) - { - if (controls == null) - { - return ""; - } - - var values = new Dictionary(); - - foreach (Control ctrl in controls) - { - switch (ctrl.ctrlType) - { - case CtrlType.Bool: - values[ctrl.name] = ctrl.valBool; - break; - - case CtrlType.Text: - values[ctrl.name] = ctrl.text; - break; - - case CtrlType.Float: - values[ctrl.name] = ctrl.valFloat; - break; - - case CtrlType.Int: - values[ctrl.name] = ctrl.valInt; - break; - - case CtrlType.Vec2F: - values[ctrl.name] = new JsonVector2(ctrl.valVector2); - break; - - case CtrlType.Vec3F: - values[ctrl.name] = new JsonVector3(ctrl.valVector3); - break; - - case CtrlType.Vec4F: - values[ctrl.name] = new JsonVector4(ctrl.valVector4); - break; - - case CtrlType.ColorF: - values[ctrl.name] = new JsonColor(ctrl.valColor); - break; - - case CtrlType.Color: - values[ctrl.name] = new JsonColor32(ctrl.valColor32); - break; - - default: - break; - } - } - - // save preset setting - return JsonConvert.SerializeObject(values, Formatting.Indented); - } - - public static void FromJson(string in_str_json, Control[] out_controls) - { - if (out_controls == null) - { - return; - } - - JsonSerializerSettings setting = new JsonSerializerSettings(); - setting.MissingMemberHandling = MissingMemberHandling.Ignore; - setting.DefaultValueHandling = DefaultValueHandling.Include; - setting.NullValueHandling = NullValueHandling.Ignore; - var res = JsonConvert.DeserializeObject< Dictionary >(in_str_json, setting); - - foreach (Control ctrl in out_controls) - { - object obj; - if (res.TryGetValue(ctrl.name, out obj)) - { - Type type = obj.GetType(); - - if (type == typeof(string) && ctrl.IsString()) - { - ctrl.text = (string)obj; - } - else if (ctrl.IsValue()) - { - if (type == typeof(bool)) - { - ctrl.valBool = (bool)obj; - } - else if (type == typeof(Double)) - { - ctrl.valFloat = Convert.ToSingle((Double)obj); - } - else if (type == typeof(float)) - { - ctrl.valFloat = (float)obj; - } - else if (type == typeof(Int64)) - { - ctrl.valInt = Convert.ToInt32((Int64)obj); - } - else if (type == typeof(int)) - { - ctrl.valInt = (int)obj; - } - else if (type == typeof(Newtonsoft.Json.Linq.JObject)) - { - Newtonsoft.Json.Linq.JObject jobj = (Newtonsoft.Json.Linq.JObject)obj; - Newtonsoft.Json.Linq.JToken token = jobj.GetValue("type"); - if (token == null) - { - continue; - } - - CtrlType jobj_type = (CtrlType)(int)token; - if (jobj_type != ctrl.ctrlType) - { - continue; - } - - switch (ctrl.ctrlType) - { - case CtrlType.Vec2F: - { - JsonVector2 json_vec2 = JsonConvert.DeserializeObject(obj.ToString()); - if (json_vec2 == null) - { - continue; - } - - ctrl.valVector2 = json_vec2.To(); - } - break; - - case CtrlType.Vec3F: - { - JsonVector3 json_vec3 = JsonConvert.DeserializeObject(obj.ToString()); - if (json_vec3 == null) - { - continue; - } - - ctrl.valVector3 = json_vec3.To(); - } - break; - - case CtrlType.Vec4F: - { - JsonVector4 json_vec4 = JsonConvert.DeserializeObject(obj.ToString()); - if (json_vec4 == null) - { - continue; - } - - ctrl.valVector2 = json_vec4.To(); - } - break; - - case CtrlType.ColorF: - { - JsonColor json_color = JsonConvert.DeserializeObject(obj.ToString()); - if (json_color == null) - { - continue; - } - - ctrl.valColor = json_color.To(); - } - break; - - case CtrlType.Color: - { - JsonColor32 json_color32 = JsonConvert.DeserializeObject(obj.ToString()); - if (json_color32 == null) - { - continue; - } - - ctrl.valColor32 = json_color32.To(); - } - break; - - default: - continue; - } - } - } - } - } - } - - public static string GetRelativeDefaultDir() - { - string dir = "settings-ultracontrols/"; - System.IO.DirectoryInfo root_dir = System.IO.Directory.GetParent(Application.dataPath); - string path = System.IO.Path.Combine(root_dir.FullName, dir); - System.IO.DirectoryInfo default_dir = new System.IO.DirectoryInfo(path); - if (!default_dir.Exists) - { - default_dir.Create(); - } - return dir; - } - - public static T BytesToStructure(byte[] bytes) where T : class - { - GCHandle handle = GCHandle.Alloc(bytes, System.Runtime.InteropServices.GCHandleType.Pinned); - T obj = (T)Marshal.PtrToStructure(handle.AddrOfPinnedObject(), typeof(T)); - handle.Free(); - return obj; - } - - public static void StructureToBytes(T obj, byte[] bytes) where T : class - { - //GCHandle handle = GCHandle.Alloc(bytes, System.Runtime.InteropServices.GCHandleType.Pinned); - int size = Marshal.SizeOf(obj); - IntPtr ptr = Marshal.AllocHGlobal(size); - Marshal.StructureToPtr(obj, ptr, false); - Marshal.Copy(ptr, bytes, 0, size); - Marshal.FreeHGlobal(ptr); - } - - public static RawCtrl[] AllocAryRawCtrl(uint num) - { - RawCtrl[] ary = new RawCtrl[num]; - - for (uint i = 0; i < num; ++i) - { - ary[i] = new RawCtrl(); - ary[i].name = ""; - ary[i].data = new byte[236]; - } - return ary; - } - - public static CtrlValues AllocCtrlVaules() - { - CtrlValues values = new CtrlValues(); - values.val = new float[16]; - values.min = new float[16]; - values.max = new float[16]; - return values; - } - - public static CtrlType GetCtrlType(Type type) - { - if (type == typeof(string)) - { - return CtrlType.Text; - } - else if (type == typeof(bool)) - { - return CtrlType.Bool; - } - else if (type == typeof(float)) - { - return CtrlType.Float; - } - else if (type == typeof(int)) - { - return CtrlType.Int; - } - else if (type == typeof(Vector2)) - { - return CtrlType.Vec2F; - } - else if (type == typeof(Vector3)) - { - return CtrlType.Vec3F; - } - else if (type == typeof(Vector4)) - { - return CtrlType.Vec4F; - } - else if (type == typeof(Color)) - { - return CtrlType.ColorF; - } - else if (type == typeof(Color32)) - { - return CtrlType.Color; - } - - return CtrlType.Unknown; - } - - public static bool IsSupport(Type type) - { - if (type == typeof(string) || - type == typeof(bool) || - type == typeof(float) || - type == typeof(int) || - type == typeof(Vector2) || - type == typeof(Vector3) || - type == typeof(Vector4) || - type == typeof(Color) || - type == typeof(Color32) ) - { - return true; - } - - return false; - } - - public static void SetVec2(Vector2 vec2, float[] ary_f) - { - ary_f[0] = vec2.x; - ary_f[1] = vec2.y; - } - - public static void SetVec3(Vector3 vec3, float[] ary_f) - { - ary_f[0] = vec3.x; - ary_f[1] = vec3.y; - ary_f[2] = vec3.z; - } - - public static void SetVec4(Vector4 vec4, float[] ary_f) - { - ary_f[0] = vec4.x; - ary_f[1] = vec4.y; - ary_f[2] = vec4.z; - ary_f[3] = vec4.w; - } - - public static void SetColor(Color clr, float[] ary_f) - { - ary_f[0] = clr.r; - ary_f[1] = clr.g; - ary_f[2] = clr.b; - ary_f[3] = clr.a; - } - - public static void SetColor32(Color32 clr, byte[] ary_b) - { - ary_b[0] = clr.r; - ary_b[1] = clr.g; - ary_b[2] = clr.b; - ary_b[3] = clr.a; - } - - public delegate void OnFoundAttribues(object sender, object behavior, FieldInfo info, UltraControlsAttribute ultra_attr, RangeAttribute range_attr); - - public static bool FindUltraControlsAttribues (Component component, UltraControlsAttribute.BindingFlag uc_flag, OnFoundAttribues dele) - { - if (dele == null) - { - return false; - } - - BindingFlags sys_binding_flag = BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Public; - sf_FindAttribuesFromComponent (component, sys_binding_flag, uc_flag, dele); - - var animators = component.gameObject.GetComponentsInChildren(true); - foreach (Animator animator in animators) - { - if (animator == null) - continue; - - var behaviours = animator.GetBehaviours(); - foreach (StateMachineBehaviour behaviour in behaviours) - { - sf_FindAttribuesFromBehavior(component, behaviour, sys_binding_flag, uc_flag, dele); - }//behaviours - - }//animators - return false; - } - - private static void sf_FindAttribuesFromComponent (Component sender, BindingFlags sys_flag, UltraControlsAttribute.BindingFlag uc_flag , OnFoundAttribues dele) - { - var components = sender.gameObject.GetComponentsInChildren(true); - - foreach (T1 component in components) - { - if (component == null) - continue; - - sf_FindAttribuesFromBehavior(sender, component, sys_flag, uc_flag, dele); - - }//monos - } - - private static void sf_FindAttribuesFromBehavior (object sender, object behavior, BindingFlags sys_flag, UltraControlsAttribute.BindingFlag uc_flag, OnFoundAttribues dele) - { - foreach (FieldInfo field in (behavior.GetType().GetFields(sys_flag))) - { - UltraControlsAttribute attr_ultracontrols = null; - RangeAttribute attr_range = null; - - foreach (object attribute in field.GetCustomAttributes(true)) - { - { - var attr = attribute as UltraControlsAttribute; - if (attr != null && attr.binding_flag == UltraControlsAttribute.BindingFlag.Getter) - { - attr_ultracontrols = attr; - continue; - } - } - - { - var attr = attribute as RangeAttribute; - if (attr != null) - { - attr_range = attr; - } - } - - }//attributes - - if (attr_ultracontrols == null) - { - continue; - } - - dele.Invoke(sender, behavior, field, attr_ultracontrols, attr_range); - - }//fields - } - -#if UNITY_EDITOR - //https://forum.unity3d.com/threads/how-to-get-the-local-identifier-in-file-for-scene-objects.265686/#post-1766415 - //https://gist.github.com/DmitriyYukhanov/5d93a0a204c32db1dd45d7a86e1df87e - - private static PropertyInfo cachedInspectorModeInfo; - - public static long GetLocalIdentifierInFileForObject(UnityEngine.Object obj) - { - long id = 0; - if (obj == null) - { - return id; - } - - PropertyInfo cachedInspectorModeInfo = typeof(UnityEditor.SerializedObject).GetProperty("inspectorMode", BindingFlags.NonPublic | BindingFlags.Instance); - UnityEditor.SerializedObject serializedObject = new UnityEditor.SerializedObject(obj); - cachedInspectorModeInfo.SetValue(serializedObject, UnityEditor.InspectorMode.Debug, null); - UnityEditor.SerializedProperty serializedProperty = serializedObject.FindProperty("m_LocalIdentfierInFile"); - -#if UNITY_5_PLUS - id = serializedProperty.longValue; -#else - id = serializedProperty.intValue; -#endif - //if (id <= 0) - //{ - // UnityEditor.PrefabType prefabType = UnityEditor.PrefabUtility.GetPrefabType(obj); - // if (prefabType != UnityEditor.PrefabType.None) - // { - // id = GetLocalIdentifierInFileForObject(UnityEditor.PrefabUtility.GetPrefabParent(obj)); - // } - // else - // { - // // this will work for the new objects in scene which weren't saved yet - // id = obj.GetInstanceID(); - // } - //} - // - //if (id <= 0) - //{ - // UnityEngine.GameObject go = obj as UnityEngine.GameObject; - // if (go != null) - // { - // id = go.transform.GetSiblingIndex(); - // } - //} - - return id; - } - -#endif - - } - - - -} \ No newline at end of file diff --git a/Unity-19050-05-BallPool/Assets/UnityUtils/UltraControls/UltraUtils.cs.meta b/Unity-19050-05-BallPool/Assets/UnityUtils/UltraControls/UltraUtils.cs.meta deleted file mode 100644 index a580ba9..0000000 --- a/Unity-19050-05-BallPool/Assets/UnityUtils/UltraControls/UltraUtils.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: ceca5512793b6334885704bffd60e492 -timeCreated: 1493025017 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: