diff --git a/Assets/.DS_Store b/Assets/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..5b2cf45edd144c20aba5259b25749a047d882b85 Binary files /dev/null and b/Assets/.DS_Store differ diff --git a/Assets/Editor.meta b/Assets/Editor.meta new file mode 100644 index 0000000000000000000000000000000000000000..705091f10696deb22131de2a1190135324fedc96 --- /dev/null +++ b/Assets/Editor.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 9021df8a15046c942ac51b068030d657 +folderAsset: yes +timeCreated: 1485872501 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Editor/CrossPlatformInput.meta b/Assets/Editor/CrossPlatformInput.meta new file mode 100644 index 0000000000000000000000000000000000000000..87b398ec256055dd1426b75784efc9228821a97c --- /dev/null +++ b/Assets/Editor/CrossPlatformInput.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 8250d421154166842bd676040e325dc3 +folderAsset: yes +timeCreated: 1485872501 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Editor/CrossPlatformInput/CrossPlatformInputInitialize.cs b/Assets/Editor/CrossPlatformInput/CrossPlatformInputInitialize.cs new file mode 100644 index 0000000000000000000000000000000000000000..4db684cf4ac90bfd3c43618fac293baa6c03f449 --- /dev/null +++ b/Assets/Editor/CrossPlatformInput/CrossPlatformInputInitialize.cs @@ -0,0 +1,138 @@ +using System; +using System.Collections.Generic; +using UnityEditor; + +namespace UnityStandardAssets.CrossPlatformInput.Inspector +{ + [InitializeOnLoad] + public class CrossPlatformInitialize + { + // Custom compiler defines: + // + // CROSS_PLATFORM_INPUT : denotes that cross platform input package exists, so that other packages can use their CrossPlatformInput functions. + // EDITOR_MOBILE_INPUT : denotes that mobile input should be used in editor, if a mobile build target is selected. (i.e. using Unity Remote app). + // MOBILE_INPUT : denotes that mobile input should be used right now! + + static CrossPlatformInitialize() + { + var defines = GetDefinesList(buildTargetGroups[0]); + if (!defines.Contains("CROSS_PLATFORM_INPUT")) + { + SetEnabled("CROSS_PLATFORM_INPUT", true, false); + SetEnabled("MOBILE_INPUT", true, true); + } + } + + + [MenuItem("Mobile Input/Enable")] + private static void Enable() + { + SetEnabled("MOBILE_INPUT", true, true); + switch (EditorUserBuildSettings.activeBuildTarget) + { + case BuildTarget.Android: + case BuildTarget.iOS: + case BuildTarget.PSM: + case BuildTarget.Tizen: + case BuildTarget.WSAPlayer: + EditorUtility.DisplayDialog("Mobile Input", + "You have enabled Mobile Input. You'll need to use the Unity Remote app on a connected device to control your game in the Editor.", + "OK"); + break; + + default: + EditorUtility.DisplayDialog("Mobile Input", + "You have enabled Mobile Input, but you have a non-mobile build target selected in your build settings. The mobile control rigs won't be active or visible on-screen until you switch the build target to a mobile platform.", + "OK"); + break; + } + } + + + [MenuItem("Mobile Input/Enable", true)] + private static bool EnableValidate() + { + var defines = GetDefinesList(mobileBuildTargetGroups[0]); + return !defines.Contains("MOBILE_INPUT"); + } + + + [MenuItem("Mobile Input/Disable")] + private static void Disable() + { + SetEnabled("MOBILE_INPUT", false, true); + switch (EditorUserBuildSettings.activeBuildTarget) + { + case BuildTarget.Android: + case BuildTarget.iOS: + EditorUtility.DisplayDialog("Mobile Input", + "You have disabled Mobile Input. Mobile control rigs won't be visible, and the Cross Platform Input functions will always return standalone controls.", + "OK"); + break; + } + } + + + [MenuItem("Mobile Input/Disable", true)] + private static bool DisableValidate() + { + var defines = GetDefinesList(mobileBuildTargetGroups[0]); + return defines.Contains("MOBILE_INPUT"); + } + + + private static BuildTargetGroup[] buildTargetGroups = new BuildTargetGroup[] + { + BuildTargetGroup.Standalone, + BuildTargetGroup.Android, + BuildTargetGroup.iOS + }; + + private static BuildTargetGroup[] mobileBuildTargetGroups = new BuildTargetGroup[] + { + BuildTargetGroup.Android, + BuildTargetGroup.iOS, + BuildTargetGroup.PSM, + BuildTargetGroup.SamsungTV, + BuildTargetGroup.Tizen, + BuildTargetGroup.WSA + }; + + + private static void SetEnabled(string defineName, bool enable, bool mobile) + { + //Debug.Log("setting "+defineName+" to "+enable); + foreach (var group in mobile ? mobileBuildTargetGroups : buildTargetGroups) + { + var defines = GetDefinesList(group); + if (enable) + { + if (defines.Contains(defineName)) + { + return; + } + defines.Add(defineName); + } + else + { + if (!defines.Contains(defineName)) + { + return; + } + while (defines.Contains(defineName)) + { + defines.Remove(defineName); + } + } + string definesString = string.Join(";", defines.ToArray()); + PlayerSettings.SetScriptingDefineSymbolsForGroup(group, definesString); + } + } + + + private static List GetDefinesList(BuildTargetGroup group) + { + return new List(PlayerSettings.GetScriptingDefineSymbolsForGroup(group).Split(';')); + } + } +} diff --git a/Assets/Editor/CrossPlatformInput/CrossPlatformInputInitialize.cs.meta b/Assets/Editor/CrossPlatformInput/CrossPlatformInputInitialize.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..56f7e861b3564d5a6b61d1ce4ac5804f934e00c0 --- /dev/null +++ b/Assets/Editor/CrossPlatformInput/CrossPlatformInputInitialize.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: db7667203062c644ea1877077e30ebd6 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/GiC_Release.shadervariants b/Assets/GiC_Release.shadervariants new file mode 100644 index 0000000000000000000000000000000000000000..44b886277dad336f3fece41dba140e6866518dbf Binary files /dev/null and b/Assets/GiC_Release.shadervariants differ diff --git a/Assets/GiC_Release.shadervariants.meta b/Assets/GiC_Release.shadervariants.meta new file mode 100644 index 0000000000000000000000000000000000000000..4176ad5466bdc2b1877761a9106bd28227b72477 --- /dev/null +++ b/Assets/GiC_Release.shadervariants.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: cc9f4013ec315a640995208c7cba8b6e +timeCreated: 1524655121 +licenseType: Free +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 20000000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Packages.meta b/Assets/Packages.meta new file mode 100644 index 0000000000000000000000000000000000000000..1cae6df8bad2f1a605be94cd26d57a80c5fb2558 --- /dev/null +++ b/Assets/Packages.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 35f6e226bb520804995ecd0684fa1651 +folderAsset: yes +timeCreated: 1442560626 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Packages/Inverse Kinematics.meta b/Assets/Packages/Inverse Kinematics.meta new file mode 100644 index 0000000000000000000000000000000000000000..234bdd0da309560d2ae697c2a453eee5c54cf8e7 --- /dev/null +++ b/Assets/Packages/Inverse Kinematics.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: a047163895777234682758c71f07d4f9 +folderAsset: yes +timeCreated: 1513341395 +licenseType: Pro +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Packages/Inverse Kinematics/3D.meta b/Assets/Packages/Inverse Kinematics/3D.meta new file mode 100644 index 0000000000000000000000000000000000000000..bda04fe671ab4177708cef38cbdb8f3fc4895509 --- /dev/null +++ b/Assets/Packages/Inverse Kinematics/3D.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: a6f1f532e390a034cbd66fb91be6b2fa +folderAsset: yes +timeCreated: 1499788554 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Packages/Inverse Kinematics/3D/Arm.FBX b/Assets/Packages/Inverse Kinematics/3D/Arm.FBX new file mode 100644 index 0000000000000000000000000000000000000000..2d9ce687837bc006ec8e8b4a33ffe7e8b3b6e20b Binary files /dev/null and b/Assets/Packages/Inverse Kinematics/3D/Arm.FBX differ diff --git a/Assets/Packages/Inverse Kinematics/3D/Arm.FBX.meta b/Assets/Packages/Inverse Kinematics/3D/Arm.FBX.meta new file mode 100644 index 0000000000000000000000000000000000000000..f5757d87da32dbab2c306107b37c5dc48912281b --- /dev/null +++ b/Assets/Packages/Inverse Kinematics/3D/Arm.FBX.meta @@ -0,0 +1,95 @@ +fileFormatVersion: 2 +guid: 419339190ddd8b14baeff0b4f9307a55 +timeCreated: 1499788733 +licenseType: Store +ModelImporter: + serializedVersion: 19 + fileIDToRecycleName: + 100000: //RootNode + 100002: Arm + 100004: Clavicle + 100006: Forearm + 100008: Hand + 100010: Torso + 100012: Upper Arm + 400000: //RootNode + 400002: Arm + 400004: Clavicle + 400006: Forearm + 400008: Hand + 400010: Torso + 400012: Upper Arm + 2300000: //RootNode + 3300000: //RootNode + 4300000: Arm + 7400000: Take 001 + 9500000: //RootNode + 13700000: Arm + materials: + importMaterials: 1 + 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: 2 + humanoidOversampling: 1 + additionalBone: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Packages/Inverse Kinematics/3D/Materials.meta b/Assets/Packages/Inverse Kinematics/3D/Materials.meta new file mode 100644 index 0000000000000000000000000000000000000000..10552b0c943a9a54fd44baac4ebcd34ba4bffba8 --- /dev/null +++ b/Assets/Packages/Inverse Kinematics/3D/Materials.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 9557c06cb29c63d48a1d56e8869c54fe +folderAsset: yes +timeCreated: 1499788733 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Packages/Inverse Kinematics/3D/Materials/Arm.mat b/Assets/Packages/Inverse Kinematics/3D/Materials/Arm.mat new file mode 100644 index 0000000000000000000000000000000000000000..356b842e8d3d124d09d6bae763107de0f02a4723 Binary files /dev/null and b/Assets/Packages/Inverse Kinematics/3D/Materials/Arm.mat differ diff --git a/Assets/Packages/Inverse Kinematics/3D/Materials/Arm.mat.meta b/Assets/Packages/Inverse Kinematics/3D/Materials/Arm.mat.meta new file mode 100644 index 0000000000000000000000000000000000000000..689bfae8bd27916c3e3234f62cdf1c2d433fa307 --- /dev/null +++ b/Assets/Packages/Inverse Kinematics/3D/Materials/Arm.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 16630cbf543d03d42b4dde7d0d66b32a +timeCreated: 1499788733 +licenseType: Store +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Packages/Inverse Kinematics/3D/Materials/Blue.mat b/Assets/Packages/Inverse Kinematics/3D/Materials/Blue.mat new file mode 100644 index 0000000000000000000000000000000000000000..9f7d813cbb3df5ee0eab50dd904b6db3e069a757 Binary files /dev/null and b/Assets/Packages/Inverse Kinematics/3D/Materials/Blue.mat differ diff --git a/Assets/Packages/Inverse Kinematics/3D/Materials/Blue.mat.meta b/Assets/Packages/Inverse Kinematics/3D/Materials/Blue.mat.meta new file mode 100644 index 0000000000000000000000000000000000000000..fb5479323dfc6c3087ede04671d87416928cc00c --- /dev/null +++ b/Assets/Packages/Inverse Kinematics/3D/Materials/Blue.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ee47bd4f706831b4daa5d4c5a3a5be77 +timeCreated: 1499803716 +licenseType: Store +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Packages/Inverse Kinematics/3D/Materials/Red.mat b/Assets/Packages/Inverse Kinematics/3D/Materials/Red.mat new file mode 100644 index 0000000000000000000000000000000000000000..9fe3e7be88476e11171aed4cb54d154054a316e0 Binary files /dev/null and b/Assets/Packages/Inverse Kinematics/3D/Materials/Red.mat differ diff --git a/Assets/Packages/Inverse Kinematics/3D/Materials/Red.mat.meta b/Assets/Packages/Inverse Kinematics/3D/Materials/Red.mat.meta new file mode 100644 index 0000000000000000000000000000000000000000..2a1ab523a1d800343c03539c8cc2954708909782 --- /dev/null +++ b/Assets/Packages/Inverse Kinematics/3D/Materials/Red.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: be56296645a02094988c7cfe77fc94e6 +timeCreated: 1499803716 +licenseType: Store +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Packages/Inverse Kinematics/Inverse Kinematics.pdf b/Assets/Packages/Inverse Kinematics/Inverse Kinematics.pdf new file mode 100644 index 0000000000000000000000000000000000000000..a0a09287f944df0a47a5de431efa0a73246376cb Binary files /dev/null and b/Assets/Packages/Inverse Kinematics/Inverse Kinematics.pdf differ diff --git a/Assets/Packages/Inverse Kinematics/Inverse Kinematics.pdf.meta b/Assets/Packages/Inverse Kinematics/Inverse Kinematics.pdf.meta new file mode 100644 index 0000000000000000000000000000000000000000..921a56d0f31b221c673110fb50ea0d2da739eb88 --- /dev/null +++ b/Assets/Packages/Inverse Kinematics/Inverse Kinematics.pdf.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ed8ab5107299d0b4f9fcfabb717aee5c +timeCreated: 1499813316 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Packages/Inverse Kinematics/Scenes.meta b/Assets/Packages/Inverse Kinematics/Scenes.meta new file mode 100644 index 0000000000000000000000000000000000000000..20a329b14c820ea482b327cb9183f5be6299bc9f --- /dev/null +++ b/Assets/Packages/Inverse Kinematics/Scenes.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: eac06716687d88841972672bb447b67b +folderAsset: yes +timeCreated: 1499788572 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Packages/Inverse Kinematics/Scenes/Arm.unity b/Assets/Packages/Inverse Kinematics/Scenes/Arm.unity new file mode 100644 index 0000000000000000000000000000000000000000..dc28cc5d2ee941d4c59a6171f9fe6f701ea80700 Binary files /dev/null and b/Assets/Packages/Inverse Kinematics/Scenes/Arm.unity differ diff --git a/Assets/Packages/Inverse Kinematics/Scenes/Arm.unity.meta b/Assets/Packages/Inverse Kinematics/Scenes/Arm.unity.meta new file mode 100644 index 0000000000000000000000000000000000000000..e8c0ead0aa41591e0cf4b137e4cfa31e2e884d75 --- /dev/null +++ b/Assets/Packages/Inverse Kinematics/Scenes/Arm.unity.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 15c597d410cac21419811fcc3f3ced76 +timeCreated: 1499791460 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Packages/Inverse Kinematics/Scripts.meta b/Assets/Packages/Inverse Kinematics/Scripts.meta new file mode 100644 index 0000000000000000000000000000000000000000..a34882f51ff47335f313079dcd47366761b975b2 --- /dev/null +++ b/Assets/Packages/Inverse Kinematics/Scripts.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 4aac37b408d208149943e1d3677a47ae +folderAsset: yes +timeCreated: 1499788566 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Packages/Inverse Kinematics/Scripts/InverseKinematics.cs b/Assets/Packages/Inverse Kinematics/Scripts/InverseKinematics.cs new file mode 100644 index 0000000000000000000000000000000000000000..eb9d8fdb355143584dbfbf90dd92388564648d8e --- /dev/null +++ b/Assets/Packages/Inverse Kinematics/Scripts/InverseKinematics.cs @@ -0,0 +1,91 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +[ExecuteInEditMode] + +public class InverseKinematics : MonoBehaviour { + + public Transform upperArm; + public Transform forearm; + public Transform hand; + public Transform elbow; + public Transform target; + [Space(20)] + public Vector3 uppperArm_OffsetRotation; + public Vector3 forearm_OffsetRotation; + public Vector3 hand_OffsetRotation; + [Space(20)] + public bool handMatchesTargetRotation = true; + [Space(20)] + public bool debug; + + float angle; + float upperArm_Length; + float forearm_Length; + float arm_Length; + float targetDistance; + float adyacent; + + // Use this for initialization + void Start () { + + } + + // Update is called once per frame + void LateUpdate () { + if(upperArm != null && forearm != null && hand != null && elbow != null && target != null){ + upperArm.LookAt (target, elbow.position - upperArm.position); + upperArm.Rotate (uppperArm_OffsetRotation); + + Vector3 cross = Vector3.Cross (elbow.position - upperArm.position, forearm.position - upperArm.position); + + upperArm_Length = Vector3.Distance (upperArm.position, forearm.position); + forearm_Length = Vector3.Distance (forearm.position, hand.position); + arm_Length = upperArm_Length + forearm_Length; + targetDistance = Vector3.Distance (upperArm.position, target.position); + targetDistance = Mathf.Min (targetDistance, arm_Length - arm_Length * 0.001f); + + adyacent = ((upperArm_Length * upperArm_Length) - (forearm_Length * forearm_Length) + (targetDistance * targetDistance)) / (2*targetDistance); + + angle = Mathf.Acos (adyacent / upperArm_Length) * Mathf.Rad2Deg; + + upperArm.RotateAround (upperArm.position, cross, -angle); + + forearm.LookAt(target, cross); + forearm.Rotate (forearm_OffsetRotation); + + if(handMatchesTargetRotation){ + hand.rotation = target.rotation; + hand.Rotate (hand_OffsetRotation); + } + + if(debug){ + if (forearm != null && elbow != null) { + Debug.DrawLine (forearm.position, elbow.position, Color.blue); + } + + if (upperArm != null && target != null) { + Debug.DrawLine (upperArm.position, target.position, Color.red); + } + } + + } + + } + + void OnDrawGizmos(){ + if (debug) { + if(upperArm != null && elbow != null && hand != null && target != null && elbow != null){ + Gizmos.color = Color.gray; + Gizmos.DrawLine (upperArm.position, forearm.position); + Gizmos.DrawLine (forearm.position, hand.position); + Gizmos.color = Color.red; + Gizmos.DrawLine (upperArm.position, target.position); + Gizmos.color = Color.blue; + Gizmos.DrawLine (forearm.position, elbow.position); + } + } + } + +} diff --git a/Assets/Packages/Inverse Kinematics/Scripts/InverseKinematics.cs.meta b/Assets/Packages/Inverse Kinematics/Scripts/InverseKinematics.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..b783f47ba1d987140686859cc156beeac6b0f88d --- /dev/null +++ b/Assets/Packages/Inverse Kinematics/Scripts/InverseKinematics.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 30d20bcf9ec4ed24b97a6e8ab136c34f +timeCreated: 1499795966 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Packages/Inverse Kinematics/Textures.meta b/Assets/Packages/Inverse Kinematics/Textures.meta new file mode 100644 index 0000000000000000000000000000000000000000..2e506fa4cc02ba514167f31c0d52aecde44f7fe5 --- /dev/null +++ b/Assets/Packages/Inverse Kinematics/Textures.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: d2b4d2bce3a568e41a5e6998a2b71cef +folderAsset: yes +timeCreated: 1499788558 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Packages/Inverse Kinematics/Textures/Arm Normals.tga b/Assets/Packages/Inverse Kinematics/Textures/Arm Normals.tga new file mode 100644 index 0000000000000000000000000000000000000000..811772a714f3c66cce7d8e0deb71585dd9a78d3a Binary files /dev/null and b/Assets/Packages/Inverse Kinematics/Textures/Arm Normals.tga differ diff --git a/Assets/Packages/Inverse Kinematics/Textures/Arm Normals.tga.meta b/Assets/Packages/Inverse Kinematics/Textures/Arm Normals.tga.meta new file mode 100644 index 0000000000000000000000000000000000000000..f04394452a829c93aea11168eb62d53105d7e058 --- /dev/null +++ b/Assets/Packages/Inverse Kinematics/Textures/Arm Normals.tga.meta @@ -0,0 +1,100 @@ +fileFormatVersion: 2 +guid: f3b8a1b2025a2b14da282ba7b5b7e9a1 +timeCreated: 1499789160 +licenseType: Store +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 4 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 0 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 1 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + - buildTarget: Standalone + maxTextureSize: 2048 + textureFormat: 4 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 1 + - buildTarget: Android + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + - buildTarget: Windows Store Apps + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + - buildTarget: WebGL + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Packages/Inverse Kinematics/Textures/Arm.tga b/Assets/Packages/Inverse Kinematics/Textures/Arm.tga new file mode 100644 index 0000000000000000000000000000000000000000..5dccd15fb74559474bb226057bbcabdb6aa2f32a Binary files /dev/null and b/Assets/Packages/Inverse Kinematics/Textures/Arm.tga differ diff --git a/Assets/Packages/Inverse Kinematics/Textures/Arm.tga.meta b/Assets/Packages/Inverse Kinematics/Textures/Arm.tga.meta new file mode 100644 index 0000000000000000000000000000000000000000..90941f717c57188ec4581ee671dd6afe5f4fb782 --- /dev/null +++ b/Assets/Packages/Inverse Kinematics/Textures/Arm.tga.meta @@ -0,0 +1,100 @@ +fileFormatVersion: 2 +guid: 291ee55cb45c2d34ebebbe622a511da0 +timeCreated: 1499788732 +licenseType: Store +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 4 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + - buildTarget: Standalone + maxTextureSize: 2048 + textureFormat: 4 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 1 + - buildTarget: Android + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + - buildTarget: Windows Store Apps + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + - buildTarget: WebGL + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Packages/ProceduralToolkit.meta b/Assets/Packages/ProceduralToolkit.meta new file mode 100644 index 0000000000000000000000000000000000000000..93fda95827f85a62d3a91ec733c8a1c10bdc74c7 --- /dev/null +++ b/Assets/Packages/ProceduralToolkit.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 37090212bba33504ca8766e654c9b773 +folderAsset: yes +timeCreated: 1491488955 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Packages/ProceduralToolkit/ArrayE.cs b/Assets/Packages/ProceduralToolkit/ArrayE.cs new file mode 100644 index 0000000000000000000000000000000000000000..963e9e20e4e57dd875f18cade7e7cf96836b1a50 --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/ArrayE.cs @@ -0,0 +1,379 @@ +using System; +using System.Collections.Generic; + +namespace ProceduralToolkit +{ + /// + /// Array extensions + /// + public static class ArrayE + { + /// + /// Gets the next or the first node in the + /// + public static LinkedListNode NextOrFirst(this LinkedListNode current) + { + return current.Next ?? current.List.First; + } + + /// + /// Gets the previous or the last node in the + /// + public static LinkedListNode PreviousOrLast(this LinkedListNode current) + { + return current.Previous ?? current.List.Last; + } + + /// + /// Looped indexer getter, allows out of bounds indices + /// + public static T GetLooped(this T[] array, int index) + { + if (index < 0) + { + index = index%array.Length + array.Length; + } + else if (index >= array.Length) + { + index %= array.Length; + } + return array[index]; + } + + /// + /// Looped indexer setter, allows out of bounds indices + /// + public static void SetLooped(this T[] array, int index, T value) + { + if (index < 0) + { + index = index%array.Length + array.Length; + } + else if (index >= array.Length) + { + index %= array.Length; + } + array[index] = value; + } + + /// + /// Looped indexer getter, allows out of bounds indices + /// + public static T GetLooped(this List array, int index) + { + if (index < 0) + { + index = index%array.Count + array.Count; + } + else if (index >= array.Count) + { + index %= array.Count; + } + return array[index]; + } + + /// + /// Looped indexer setter, allows out of bounds indices + /// + public static void SetLooped(this List array, int index, T value) + { + if (index < 0) + { + index = index%array.Count + array.Count; + } + else if (index >= array.Count) + { + index %= array.Count; + } + array[index] = value; + } + + /// + /// Checks if is within array bounds + /// + public static bool IsInBounds(this T[,] array, Vector2Int vector) + { + return IsInBounds(array, vector.x, vector.y); + } + + /// + /// Checks if and are within array bounds + /// + public static bool IsInBounds(this T[,] array, int x, int y) + { + if (array == null) + { + throw new ArgumentNullException("array"); + } + return x >= 0 && x < array.GetLength(0) && y >= 0 && y < array.GetLength(1); + } + + /// + /// Visits all connected elements with the same value as start element + /// + /// + /// https://en.wikipedia.org/wiki/Flood_fill + /// + public static void FloodVisit(this T[,] array, Vector2Int start, Action visit) + { + FloodVisit(array, start.x, start.y, visit); + } + + /// + /// Visits all connected elements with the same value as start element + /// + /// + /// https://en.wikipedia.org/wiki/Flood_fill + /// + public static void FloodVisit(this T[,] array, int startX, int startY, Action visit) + { + if (array == null) + { + throw new ArgumentNullException("array"); + } + if (visit == null) + { + throw new ArgumentNullException("visit"); + } + if (startX < 0 || startX >= array.GetLength(0)) + { + throw new ArgumentOutOfRangeException("startX"); + } + if (startY < 0 || startY >= array.GetLength(1)) + { + throw new ArgumentOutOfRangeException("startY"); + } + + bool[,] processed = new bool[array.GetLength(0), array.GetLength(1)]; + T value = array[startX, startY]; + + var queue = new Queue(); + queue.Enqueue(new Vector2Int(startX, startY)); + processed[startX, startY] = true; + + while (queue.Count > 0) + { + Vector2Int cell = queue.Dequeue(); + + array.VisitVonNeumannNeighbours(cell.x, cell.y, true, (x, y) => + { + if (array[x, y].Equals(value) && !processed[x, y]) + { + queue.Enqueue(new Vector2Int(x, y)); + processed[x, y] = true; + } + }); + + visit(cell.x, cell.y); + } + } + + /// + /// Visits all connected elements with the same value as start element + /// + /// + /// https://en.wikipedia.org/wiki/Flood_fill + /// + public static void FloodVisit(this T[,] array, Vector2Int start, Action visit) + { + FloodVisit(array, start.x, start.y, visit); + } + + /// + /// Visits all connected elements with the same value as start element + /// + /// + /// https://en.wikipedia.org/wiki/Flood_fill + /// + public static void FloodVisit(this T[,] array, int startX, int startY, Action visit) + { + if (array == null) + { + throw new ArgumentNullException("array"); + } + if (visit == null) + { + throw new ArgumentNullException("visit"); + } + if (startX < 0 || startX >= array.GetLength(0)) + { + throw new ArgumentOutOfRangeException("startX"); + } + if (startY < 0 || startY >= array.GetLength(1)) + { + throw new ArgumentOutOfRangeException("startY"); + } + + bool[,] processed = new bool[array.GetLength(0), array.GetLength(1)]; + T value = array[startX, startY]; + + var queue = new Queue(); + queue.Enqueue(new Vector2Int(startX, startY)); + processed[startX, startY] = true; + + while (queue.Count > 0) + { + Vector2Int cell = queue.Dequeue(); + + bool isBorderCell = false; + array.VisitMooreNeighbours(cell.x, cell.y, false, (x, y) => + { + if (array.IsInBounds(x, y)) + { + if (array[x, y].Equals(value)) + { + bool vonNeumannNeighbour = (x == cell.x || y == cell.y); + if (vonNeumannNeighbour && !processed[x, y]) + { + queue.Enqueue(new Vector2Int(x, y)); + processed[x, y] = true; + } + } + else + { + isBorderCell = true; + } + } + else + { + isBorderCell = true; + } + }); + + visit(cell.x, cell.y, isBorderCell); + } + } + + /// + /// Visits four cells orthogonally surrounding a central cell + /// + /// + /// https://en.wikipedia.org/wiki/Von_Neumann_neighborhood + /// + public static void VisitVonNeumannNeighbours(this T[,] array, Vector2Int center, bool checkArrayBounds, + Action visit) + { + VisitVonNeumannNeighbours(array, center.x, center.y, checkArrayBounds, visit); + } + + /// + /// Visits four cells orthogonally surrounding a central cell + /// + /// + /// https://en.wikipedia.org/wiki/Von_Neumann_neighborhood + /// + public static void VisitVonNeumannNeighbours(this T[,] array, int x, int y, bool checkArrayBounds, + Action visit) + { + if (array == null) + { + throw new ArgumentNullException("array"); + } + if (visit == null) + { + throw new ArgumentNullException("visit"); + } + + if (checkArrayBounds) + { + if (x > 0) + { + visit(x - 1, y); + } + if (x + 1 < array.GetLength(0)) + { + visit(x + 1, y); + } + if (y > 0) + { + visit(x, y - 1); + } + if (y + 1 < array.GetLength(1)) + { + visit(x, y + 1); + } + } + else + { + visit(x - 1, y); + visit(x + 1, y); + visit(x, y - 1); + visit(x, y + 1); + } + } + + /// + /// Visits eight cells surrounding a central cell + /// + /// + /// https://en.wikipedia.org/wiki/Moore_neighborhood + /// + public static void VisitMooreNeighbours(this T[,] array, Vector2Int center, bool checkArrayBounds, + Action visit) + { + VisitMooreNeighbours(array, center.x, center.y, checkArrayBounds, visit); + } + + /// + /// Visits eight cells surrounding a central cell + /// + /// + /// https://en.wikipedia.org/wiki/Moore_neighborhood + /// + public static void VisitMooreNeighbours(this T[,] array, int x, int y, bool checkArrayBounds, + Action visit) + { + if (array == null) + { + throw new ArgumentNullException("array"); + } + if (visit == null) + { + throw new ArgumentNullException("visit"); + } + + if (checkArrayBounds) + { + bool xGreaterThanZero = x > 0; + bool xLessThanWidth = x + 1 < array.GetLength(0); + + bool yGreaterThanZero = y > 0; + bool yLessThanHeight = y + 1 < array.GetLength(1); + + if (yGreaterThanZero) + { + if (xGreaterThanZero) visit(x - 1, y - 1); + + visit(x, y - 1); + + if (xLessThanWidth) visit(x + 1, y - 1); + } + + if (xGreaterThanZero) visit(x - 1, y); + if (xLessThanWidth) visit(x + 1, y); + + if (yLessThanHeight) + { + if (xGreaterThanZero) visit(x - 1, y + 1); + + visit(x, y + 1); + + if (xLessThanWidth) visit(x + 1, y + 1); + } + } + else + { + visit(x - 1, y - 1); + visit(x, y - 1); + visit(x + 1, y - 1); + + visit(x - 1, y); + visit(x + 1, y); + + visit(x - 1, y + 1); + visit(x, y + 1); + visit(x + 1, y + 1); + } + } + } +} \ No newline at end of file diff --git a/Assets/Packages/ProceduralToolkit/ArrayE.cs.meta b/Assets/Packages/ProceduralToolkit/ArrayE.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..6175b6728979541f78ac4862df159f3d46ba2c40 --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/ArrayE.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: f82a0c39a48e36845b5090386eeba392 +timeCreated: 1447085907 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Packages/ProceduralToolkit/ColorE.cs b/Assets/Packages/ProceduralToolkit/ColorE.cs new file mode 100644 index 0000000000000000000000000000000000000000..7569ddd5ea5f00e1b73586fa41b73642cded74f3 --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/ColorE.cs @@ -0,0 +1,128 @@ +using UnityEngine; + +namespace ProceduralToolkit +{ + /// + /// Color extensions + /// + public static class ColorE + { + #region HTML colors from http://www.w3.org/TR/REC-html40/types.html#h-6.5 + + public static Color32 black32 { get { return new Color32(0, 0, 0, 255); } } + public static Color32 silver32 { get { return new Color32(192, 192, 192, 255); } } + public static Color32 gray32 { get { return new Color32(128, 128, 128, 255); } } + public static Color32 white32 { get { return new Color32(255, 255, 255, 255); } } + public static Color32 maroon32 { get { return new Color32(128, 0, 0, 255); } } + public static Color32 red32 { get { return new Color32(255, 0, 0, 255); } } + public static Color32 purple32 { get { return new Color32(128, 0, 128, 255); } } + public static Color32 fuchsia32 { get { return new Color32(255, 0, 255, 255); } } + public static Color32 green32 { get { return new Color32(0, 128, 0, 255); } } + public static Color32 lime32 { get { return new Color32(0, 255, 0, 255); } } + public static Color32 olive32 { get { return new Color32(128, 128, 0, 255); } } + public static Color32 yellow32 { get { return new Color32(255, 255, 0, 255); } } + public static Color32 navy32 { get { return new Color32(0, 0, 128, 255); } } + public static Color32 blue32 { get { return new Color32(0, 0, 255, 255); } } + public static Color32 teal32 { get { return new Color32(0, 128, 128, 255); } } + public static Color32 aqua32 { get { return new Color32(0, 255, 255, 255); } } + + public static Color black { get { return black32; } } + public static Color silver { get { return silver32; } } + public static Color gray { get { return gray32; } } + public static Color white { get { return white32; } } + public static Color maroon { get { return maroon32; } } + public static Color red { get { return red32; } } + public static Color purple { get { return purple32; } } + public static Color fuchsia { get { return fuchsia32; } } + public static Color green { get { return green32; } } + public static Color lime { get { return lime32; } } + public static Color olive { get { return olive32; } } + public static Color yellow { get { return yellow32; } } + public static Color navy { get { return navy32; } } + public static Color blue { get { return blue32; } } + public static Color teal { get { return teal32; } } + public static Color aqua { get { return aqua32; } } + + #endregion Colors + + /// + /// Returns inverted color with the same alpha + /// + public static Color Inverted(this Color color) + { + var result = Color.white - color; + result.a = color.a; + return result; + } + + /// + /// Creates a gradient between two colors + /// + public static Gradient Gradient(Color from, Color to) + { + var g = new Gradient(); + g.SetKeys(new[] {new GradientColorKey(from, 0), new GradientColorKey(to, 1)}, + new[] {new GradientAlphaKey(from.a, 0), new GradientAlphaKey(to.a, 1)}); + return g; + } + + /// + /// Creates a gradient between two colors + /// + public static Gradient Gradient(ColorHSV from, ColorHSV to) + { + var g = new Gradient(); + g.SetKeys(new[] {new GradientColorKey(from.ToColor(), 0), new GradientColorKey(to.ToColor(), 1)}, + new[] {new GradientAlphaKey(from.a, 0), new GradientAlphaKey(to.a, 1)}); + return g; + } + + /// + /// Returns new color with modified red component + /// + public static Color WithR(this Color color, float r) + { + return new Color(r, color.g, color.b, color.a); + } + + /// + /// Returns new color with modified green component + /// + public static Color WithG(this Color color, float g) + { + return new Color(color.r, g, color.b, color.a); + } + + /// + /// Returns new color with modified blue component + /// + public static Color WithB(this Color color, float b) + { + return new Color(color.r, color.g, b, color.a); + } + + /// + /// Returns new color with modified alpha component + /// + public static Color WithA(this Color color, float a) + { + return new Color(color.r, color.g, color.b, a); + } + + /// + /// Returns the color as a hexadecimal string in the format "RRGGBB" + /// + public static string ToHtmlStringRGB(this Color color) + { + return ColorUtility.ToHtmlStringRGB(color); + } + + /// + /// Returns the color as a hexadecimal string in the format "RRGGBBAA" + /// + public static string ToHtmlStringRGBA(this Color color) + { + return ColorUtility.ToHtmlStringRGBA(color); + } + } +} \ No newline at end of file diff --git a/Assets/Packages/ProceduralToolkit/ColorE.cs.meta b/Assets/Packages/ProceduralToolkit/ColorE.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..d9cbb3942cd9b76cf77047704f289091da01bc30 --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/ColorE.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 7de6020a1a0dbb2409396a09fbacd6f5 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/Packages/ProceduralToolkit/ColorHSV.cs b/Assets/Packages/ProceduralToolkit/ColorHSV.cs new file mode 100644 index 0000000000000000000000000000000000000000..fd6f5d6737d2c66112c2a863ee9682c68818f05a --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/ColorHSV.cs @@ -0,0 +1,320 @@ +using System; +using System.Collections.Generic; +using UnityEngine; + +namespace ProceduralToolkit +{ + /// + /// Representation of color in HSV model + /// + public struct ColorHSV + { + /// + /// Hue component of the color + /// + public float h; + + /// + /// Saturation component of the color + /// + public float s; + + /// + /// Value component of the color + /// + public float v; + + /// + /// Alpha component of the color + /// + public float a; + + /// + /// Returns opposite color on the color wheel + /// + public ColorHSV complementary { get { return WithOffsetH(180); } } + + public float this[int index] + { + get + { + switch (index) + { + case 0: + return h; + case 1: + return s; + case 2: + return v; + case 3: + return a; + default: + throw new IndexOutOfRangeException("Invalid ColorHSV index!"); + } + } + set + { + switch (index) + { + case 0: + h = value; + break; + case 1: + s = value; + break; + case 2: + v = value; + break; + case 3: + a = value; + break; + default: + throw new IndexOutOfRangeException("Invalid ColorHSV index!"); + } + } + } + + /// + /// Constructs a new ColorHSV with given h, s, v, a components + /// + /// Hue component + /// Saturation component + /// Value component + /// Alpha component + public ColorHSV(float h, float s, float v, float a) + { + this.h = h; + this.s = s; + this.v = v; + this.a = a; + } + + /// + /// Constructs a new ColorHSV with given h, s, v components and sets alpha to 1 + /// + /// Hue component + /// Saturation component + /// Value component + public ColorHSV(float h, float s, float v) + { + this.h = h; + this.s = s; + this.v = v; + a = 1; + } + + /// + /// Constructs a new ColorHSV from a Color + /// + public ColorHSV(Color color) + { + Color.RGBToHSV(color, out h, out s, out v); + a = color.a; + } + + public static explicit operator Vector4(ColorHSV c) + { + return new Vector4(c.h, c.s, c.v, c.a); + } + + public static bool operator ==(ColorHSV lhs, ColorHSV rhs) + { + return (Vector4) lhs == (Vector4) rhs; + } + + public static bool operator !=(ColorHSV lhs, ColorHSV rhs) + { + return !(lhs == rhs); + } + + /// + /// Returns a nicely formatted string for this color + /// + public override string ToString() + { + return string.Format("HSVA({0:F3}, {1:F3}, {2:F3}, {3:F3})", h, s, v, a); + } + + /// + /// Returns the color as a hexadecimal string in the format "RRGGBB" + /// + public string ToHtmlStringRGB() + { + return ColorUtility.ToHtmlStringRGB(ToColor()); + } + + /// + /// Returns the color as a hexadecimal string in the format "RRGGBBAA" + /// + public string ToHtmlStringRGBA() + { + return ColorUtility.ToHtmlStringRGBA(ToColor()); + } + + public override int GetHashCode() + { + return ((Vector4) this).GetHashCode(); + } + + public override bool Equals(object other) + { + if (!(other is ColorHSV)) + { + return false; + } + ColorHSV color = (ColorHSV) other; + if (h.Equals(color.h) && s.Equals(color.s) && v.Equals(color.v)) + { + return a.Equals(color.a); + } + return false; + } + + /// + /// Converts ColorHSV to a RGB representation + /// + public Color ToColor() + { + var color = Color.HSVToRGB(h, s, v); + color.a = a; + return color; + } + + /// + /// Returns new color with hue offset by degrees + /// + public ColorHSV WithOffsetH(float angle) + { + return WithH(Mathf.Repeat(h + angle/360, 1)); + } + + /// + /// Returns new color with modified hue component + /// + public ColorHSV WithH(float h) + { + return new ColorHSV(h, s, v, a); + } + + /// + /// Returns new color with modified saturation component + /// + public ColorHSV WithS(float s) + { + return new ColorHSV(h, s, v, a); + } + + /// + /// Returns new color with modified value component + /// + public ColorHSV WithV(float v) + { + return new ColorHSV(h, s, v, a); + } + + /// + /// Returns new color with modified saturation and value components + /// + public ColorHSV WithSV(float s, float v) + { + return new ColorHSV(h, s, v, a); + } + + /// + /// Returns new color with modified alpha component + /// + public ColorHSV WithA(float a) + { + return new ColorHSV(h, s, v, a); + } + + /// + /// Returns list of this color, of analogous colors and optionally complementary color + /// + public List GetAnalogousPalette(int count = 2, bool withComplementary = false) + { + const float analogousAngle = 30; + + var palette = new List {this}; + int rightCount = count/2; + int leftCount = count - rightCount; + + for (int i = 0; i < leftCount; i++) + { + palette.Add(WithOffsetH(-(i + 1)*analogousAngle)); + } + for (int i = 0; i < rightCount; i++) + { + palette.Add(WithOffsetH((i + 1)*analogousAngle)); + } + if (withComplementary) + { + palette.Add(complementary); + } + return palette; + } + + /// + /// Returns list of this color, two triadic colors and optionally complementary color + /// + public List GetTriadicPalette(bool withComplementary = false) + { + const float triadicAngle = 120; + + var palette = new List + { + this, + WithOffsetH(-triadicAngle), + WithOffsetH(triadicAngle) + }; + if (withComplementary) + { + palette.Add(complementary); + } + return palette; + } + + /// + /// Returns list of this color and three tetradic colors + /// + public List GetTetradicPalette() + { + const float tetradicAngle = 60; + + var palette = new List + { + this, + WithOffsetH(tetradicAngle), + complementary, + complementary.WithOffsetH(tetradicAngle) + }; + return palette; + } + + /// + /// Linearly interpolates between colors a and b by t. + /// + public static ColorHSV Lerp(ColorHSV a, ColorHSV b, float t) + { + t = Mathf.Clamp01(t); + return LerpUnclamped(a, b, t); + } + + /// + /// Linearly interpolates between colors a and b by t. + /// + public static ColorHSV LerpUnclamped(ColorHSV a, ColorHSV b, float t) + { + float deltaH = Mathf.Repeat(b.h - a.h, 1); + if (deltaH > 0.5f) + { + deltaH -= 1; + } + return new ColorHSV( + Mathf.Repeat(a.h + deltaH*t, 1), + a.s + (b.s - a.s)*t, + a.v + (b.v - a.v)*t, + a.a + (b.a - a.a)*t); + } + } +} \ No newline at end of file diff --git a/Assets/Packages/ProceduralToolkit/ColorHSV.cs.meta b/Assets/Packages/ProceduralToolkit/ColorHSV.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..edef90dadff627ad11f90f7783b6598e67fcf1ad --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/ColorHSV.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 318aea944b749404bb5b80076321aa68 +timeCreated: 1446844904 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Packages/ProceduralToolkit/DebugE.cs b/Assets/Packages/ProceduralToolkit/DebugE.cs new file mode 100644 index 0000000000000000000000000000000000000000..e89b6dabcd2d097a68a4059a0680837aa33760ba --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/DebugE.cs @@ -0,0 +1,356 @@ +using UnityEngine; + +namespace ProceduralToolkit +{ + public static class DebugE + { + private static readonly Draw.DebugDrawLine drawLine; + + static DebugE() + { + drawLine = Debug.DrawLine; + } + + public static void DrawRay(Ray ray) + { + DrawRay(ray, Color.white); + } + + public static void DrawRay( + Ray ray, + Color color, + float duration = 0, + bool depthTest = true) + { + Draw.WireRay(drawLine, ray, color, duration, depthTest); + } + + public static void DrawWireQuadXY(Vector3 position, Quaternion rotation, Vector2 scale) + { + DrawWireQuadXY(position, rotation, scale, Color.white); + } + + public static void DrawWireQuadXY( + Vector3 position, + Quaternion rotation, + Vector2 scale, + Color color, + float duration = 0, + bool depthTest = true) + { + Draw.WireQuadXY(drawLine, position, rotation, scale, color, duration, depthTest); + } + + public static void DrawWireQuadXZ(Vector3 position, Quaternion rotation, Vector2 scale) + { + DrawWireQuadXZ(position, rotation, scale, Color.white); + } + + public static void DrawWireQuadXZ( + Vector3 position, + Quaternion rotation, + Vector2 scale, + Color color, + float duration = 0, + bool depthTest = true) + { + Draw.WireQuadXZ(drawLine, position, rotation, scale, color, duration, depthTest); + } + + public static void DrawWireQuadYZ(Vector3 position, Quaternion rotation, Vector2 scale) + { + DrawWireQuadYZ(position, rotation, scale, Color.white); + } + + public static void DrawWireQuadYZ( + Vector3 position, + Quaternion rotation, + Vector2 scale, + Color color, + float duration = 0, + bool depthTest = true) + { + Draw.WireQuadYZ(drawLine, position, rotation, scale, color, duration, depthTest); + } + + public static void DrawWireCube(Vector3 position, Quaternion rotation, Vector3 scale) + { + DrawWireCube(position, rotation, scale, Color.white); + } + + public static void DrawWireCube( + Vector3 position, + Quaternion rotation, + Vector3 scale, + Color color, + float duration = 0, + bool depthTest = true) + { + Draw.WireCube(drawLine, position, rotation, scale, color, duration, depthTest); + } + + #region DrawWireCircle + + public static void DrawWireCircleXY(Vector3 position, float radius) + { + DrawWireCircleXY(position, radius, Color.white); + } + + public static void DrawWireCircleXY( + Vector3 position, + float radius, + Color color, + float duration = 0, + bool depthTest = true) + { + Draw.WireCircleXY(drawLine, position, radius, color, duration, depthTest); + } + + public static void DrawWireCircleXY(Vector3 position, Quaternion rotation, float radius) + { + DrawWireCircleXY(position, rotation, radius, Color.white); + } + + public static void DrawWireCircleXY( + Vector3 position, + Quaternion rotation, + float radius, + Color color, + float duration = 0, + bool depthTest = true) + { + Draw.WireCircleXY(drawLine, position, rotation, radius, color, duration, depthTest); + } + + public static void DrawWireCircleXZ(Vector3 position, float radius) + { + DrawWireCircleXZ(position, radius, Color.white); + } + + public static void DrawWireCircleXZ( + Vector3 position, + float radius, + Color color, + float duration = 0, + bool depthTest = true) + { + Draw.WireCircleXZ(drawLine, position, radius, color, duration, depthTest); + } + + public static void DrawWireCircleXZ(Vector3 position, Quaternion rotation, float radius) + { + DrawWireCircleXZ(position, rotation, radius, Color.white); + } + + public static void DrawWireCircleXZ( + Vector3 position, + Quaternion rotation, + float radius, + Color color, + float duration = 0, + bool depthTest = true) + { + Draw.WireCircleXZ(drawLine, position, rotation, radius, color, duration, depthTest); + } + + public static void DrawWireCircleYZ(Vector3 position, float radius) + { + DrawWireCircleYZ(position, radius, Color.white); + } + + public static void DrawWireCircleYZ( + Vector3 position, + float radius, + Color color, + float duration = 0, + bool depthTest = true) + { + Draw.WireCircleYZ(drawLine, position, radius, color, duration, depthTest); + } + + public static void DrawWireCircleYZ(Vector3 position, Quaternion rotation, float radius) + { + DrawWireCircleYZ(position, rotation, radius, Color.white); + } + + public static void DrawWireCircleYZ( + Vector3 position, + Quaternion rotation, + float radius, + Color color, + float duration = 0, + bool depthTest = true) + { + Draw.WireCircleYZ(drawLine, position, rotation, radius, color, duration, depthTest); + } + + #endregion DrawWireCicle + + #region DrawWireArc + + public static void DrawWireArcXY(Vector3 position, float radius, float fromAngle, float toAngle) + { + DrawWireArcXY(position, radius, fromAngle, toAngle, Color.white); + } + + public static void DrawWireArcXY( + Vector3 position, + float radius, + float fromAngle, + float toAngle, + Color color, + float duration = 0, + bool depthTest = true) + { + Draw.WireArcXY(drawLine, position, radius, fromAngle, toAngle, color, duration, depthTest); + } + + public static void DrawWireArcXY(Vector3 position, Quaternion rotation, float radius, float fromAngle, + float toAngle) + { + DrawWireArcXY(position, rotation, radius, fromAngle, toAngle, Color.white); + } + + public static void DrawWireArcXY( + Vector3 position, + Quaternion rotation, + float radius, + float fromAngle, + float toAngle, + Color color, + float duration = 0, + bool depthTest = true) + { + Draw.WireArcXY(drawLine, position, rotation, radius, fromAngle, toAngle, color, duration, depthTest); + } + + public static void DrawWireArcXZ(Vector3 position, float radius, float fromAngle, float toAngle) + { + DrawWireArcXZ(position, radius, fromAngle, toAngle, Color.white); + } + + public static void DrawWireArcXZ( + Vector3 position, + float radius, + float fromAngle, + float toAngle, + Color color, + float duration = 0, + bool depthTest = true) + { + Draw.WireArcXZ(drawLine, position, radius, fromAngle, toAngle, color, duration, depthTest); + } + + public static void DrawWireArcXZ(Vector3 position, Quaternion rotation, float radius, float fromAngle, + float toAngle) + { + DrawWireArcXZ(position, rotation, radius, fromAngle, toAngle, Color.white); + } + + public static void DrawWireArcXZ( + Vector3 position, + Quaternion rotation, + float radius, + float fromAngle, + float toAngle, + Color color, + float duration = 0, + bool depthTest = true) + { + Draw.WireArcXZ(drawLine, position, rotation, radius, fromAngle, toAngle, color, duration, depthTest); + } + + public static void DrawWireArcYZ(Vector3 position, float radius, float fromAngle, float toAngle) + { + DrawWireArcYZ(position, radius, fromAngle, toAngle, Color.white); + } + + public static void DrawWireArcYZ( + Vector3 position, + float radius, + float fromAngle, + float toAngle, + Color color, + float duration = 0, + bool depthTest = true) + { + Draw.WireArcYZ(drawLine, position, radius, fromAngle, toAngle, color, duration, depthTest); + } + + public static void DrawWireArcYZ(Vector3 position, Quaternion rotation, float radius, float fromAngle, + float toAngle) + { + DrawWireArcYZ(position, rotation, radius, fromAngle, toAngle, Color.white); + } + + public static void DrawWireArcYZ( + Vector3 position, + Quaternion rotation, + float radius, + float fromAngle, + float toAngle, + Color color, + float duration = 0, + bool depthTest = true) + { + Draw.WireArcYZ(drawLine, position, rotation, radius, fromAngle, toAngle, color, duration, depthTest); + } + + #endregion DrawWireArc + + public static void DrawWireSphere(Vector3 position, Quaternion rotation, float radius) + { + DrawWireSphere(position, rotation, radius, Color.white); + } + + public static void DrawWireSphere( + Vector3 position, + Quaternion rotation, + float radius, + Color color, + float duration = 0, + bool depthTest = true) + { + Draw.WireSphere(drawLine, position, rotation, radius, color, duration, depthTest); + } + + public static void DrawWireHemisphere(Vector3 position, Quaternion rotation, float radius) + { + DrawWireHemisphere(position, rotation, radius, Color.white); + } + + public static void DrawWireHemisphere( + Vector3 position, + Quaternion rotation, + float radius, + Color color, + float duration = 0, + bool depthTest = true) + { + Draw.WireHemisphere(drawLine, position, rotation, radius, color, duration, depthTest); + } + + public static void DrawWireCone( + Vector3 position, + Quaternion rotation, + float apexRadius, + float angle, + float length) + { + DrawWireCone(position, rotation, apexRadius, angle, length, Color.white); + } + + public static void DrawWireCone( + Vector3 position, + Quaternion rotation, + float apexRadius, + float angle, + float length, + Color color, + float duration = 0, + bool depthTest = true) + { + Draw.WireCone(drawLine, position, rotation, apexRadius, angle, length, color, duration, depthTest); + } + } +} \ No newline at end of file diff --git a/Assets/Packages/ProceduralToolkit/DebugE.cs.meta b/Assets/Packages/ProceduralToolkit/DebugE.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..bfcc9a17d3006af3ce6867efad959ce9be4b6730 --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/DebugE.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 4d7068afc46b792499b664d31f2d9cc5 +timeCreated: 1472112759 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Packages/ProceduralToolkit/Directions.cs b/Assets/Packages/ProceduralToolkit/Directions.cs new file mode 100644 index 0000000000000000000000000000000000000000..40f4afd1dafec6bb71ea5a63730ef2afa83d0303 --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/Directions.cs @@ -0,0 +1,23 @@ +using System; + +namespace ProceduralToolkit +{ + /// + /// Specifies directions along thee axes + /// + [Flags] + public enum Directions + { + None = 0, + Left = 1, + Right = 2, + Down = 4, + Up = 8, + Back = 16, + Forward = 32, + XAxis = Left | Right, + YAxis = Down | Up, + ZAxis = Back | Forward, + All = Left | Right | Down | Up | Back | Forward + } +} \ No newline at end of file diff --git a/Assets/Packages/ProceduralToolkit/Directions.cs.meta b/Assets/Packages/ProceduralToolkit/Directions.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..1d341c728e8f7cac5598d74b8539007e50b48914 --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/Directions.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: faee862a0725eca4c8f4c38be2d549c8 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/Packages/ProceduralToolkit/Draw.cs b/Assets/Packages/ProceduralToolkit/Draw.cs new file mode 100644 index 0000000000000000000000000000000000000000..d62c5f4e61fbfc919aee8180464cad1e8228eda9 --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/Draw.cs @@ -0,0 +1,1098 @@ +using System; +using UnityEngine; + +namespace ProceduralToolkit +{ + /// + /// Collection of drawing method-independent generic drawing algorithms + /// + public static class Draw + { + public delegate void DebugDrawLine(Vector3 start, Vector3 end, Color color, float duration, bool depthTest); + + private const int circleSegments = 64; + private const float circleSegmentAngle = 360f/circleSegments; + + private static readonly Func pointOnCircleXY; + private static readonly Func pointOnCircleXZ; + private static readonly Func pointOnCircleYZ; + + static Draw() + { + pointOnCircleXY = PTUtils.PointOnCircle3XY; + pointOnCircleXZ = PTUtils.PointOnCircle3XZ; + pointOnCircleYZ = PTUtils.PointOnCircle3YZ; + } + + #region Raster + + /// + /// Draws aliased line and calls on every pixel + /// + /// + /// https://en.wikipedia.org/wiki/Bresenham%27s_line_algorithm + /// + public static void RasterLine(Vector2Int v0, Vector2Int v1, Action draw) + { + RasterLine(v0.x, v0.y, v1.x, v1.y, draw); + } + + /// + /// Draws aliased line and calls on every pixel + /// + /// + /// https://en.wikipedia.org/wiki/Bresenham%27s_line_algorithm + /// + public static void RasterLine(int x0, int y0, int x1, int y1, Action draw) + { + bool steep = Math.Abs(y1 - y0) > Math.Abs(x1 - x0); + if (steep) + { + PTUtils.Swap(ref x0, ref y0); + PTUtils.Swap(ref x1, ref y1); + } + if (x0 > x1) + { + PTUtils.Swap(ref x0, ref x1); + PTUtils.Swap(ref y0, ref y1); + } + + int dx = x1 - x0; + int dy = Math.Abs(y1 - y0); + int error = dx/2; + int ystep = (y0 < y1) ? 1 : -1; + int y = y0; + for (int x = x0; x <= x1; x++) + { + draw(steep ? y : x, steep ? x : y); + error -= dy; + if (error < 0) + { + y += ystep; + error += dx; + } + } + } + + /// + /// Draws anti-aliased line and calls on every pixel + /// + /// + /// https://en.wikipedia.org/wiki/Xiaolin_Wu%27s_line_algorithm + /// + public static void RasterAALine(Vector2Int v0, Vector2Int v1, Action draw) + { + RasterAALine(v0.x, v0.y, v1.x, v1.y, draw); + } + + /// + /// Draws anti-aliased line and calls on every pixel + /// + /// + /// https://en.wikipedia.org/wiki/Xiaolin_Wu%27s_line_algorithm + /// + public static void RasterAALine(int x0, int y0, int x1, int y1, Action draw) + { + bool steep = Math.Abs(y1 - y0) > Math.Abs(x1 - x0); + if (steep) + { + PTUtils.Swap(ref x0, ref y0); + PTUtils.Swap(ref x1, ref y1); + } + if (x0 > x1) + { + PTUtils.Swap(ref x0, ref x1); + PTUtils.Swap(ref y0, ref y1); + } + + if (steep) + { + draw(y0, x0, 1); + draw(y1, x1, 1); + } + else + { + draw(x0, y0, 1); + draw(x1, y1, 1); + } + float dx = x1 - x0; + float dy = y1 - y0; + float gradient = dy/dx; + float y = y0 + gradient; + for (var x = x0 + 1; x <= x1 - 1; x++) + { + if (steep) + { + draw((int) y, x, 1 - (y - (int) y)); + draw((int) y + 1, x, y - (int) y); + } + else + { + draw(x, (int) y, 1 - (y - (int) y)); + draw(x, (int) y + 1, y - (int) y); + } + y += gradient; + } + } + + /// + /// Draws aliased circle and calls on every pixel + /// + /// + /// A Rasterizing Algorithm for Drawing Curves + /// http://members.chello.at/easyfilter/bresenham.pdf + /// + public static void RasterCircle(Vector2Int v0, int radius, Action draw) + { + RasterCircle(v0.x, v0.y, radius, draw); + } + + /// + /// Draws aliased circle and calls on every pixel + /// + /// + /// A Rasterizing Algorithm for Drawing Curves + /// http://members.chello.at/easyfilter/bresenham.pdf + /// + public static void RasterCircle(int x0, int y0, int radius, Action draw) + { + int x = -radius; + int y = 0; + int error = 2 - 2*radius; // 2 quadrant ◴ + while (x < 0) + { + draw(x0 - x, y0 + y); // 1 quadrant ◷ + draw(x0 - y, y0 - x); // 2 quadrant ◴ + draw(x0 + x, y0 - y); // 3 quadrant ◵ + draw(x0 + y, y0 + x); // 4 quadrant ◶ + + int lastError = error; + if (y >= error) + { + y++; + error += 2*y + 1; + } + + // Second check is needed to avoid weird pixels at diagonals at some radiuses + // Example radiuses: 4, 11, 134, 373, 4552 + if (x < lastError || y < error) + { + x++; + error += 2*x + 1; + } + } + } + + /// + /// Draws filled aliased circle and calls on every pixel + /// + public static void RasterFilledCircle(Vector2Int v0, int radius, Action draw) + { + RasterFilledCircle(v0.x, v0.y, radius, draw); + } + + /// + /// Draws filled aliased circle and calls on every pixel + /// + public static void RasterFilledCircle(int x0, int y0, int radius, Action draw) + { + int x = -radius; + int y = 0; + int error = 2 - 2*radius; // 2 quadrant ◴ + // lastY must have a different value than y + int lastY = Int32.MaxValue; + while (x < 0) + { + // This check prevents overdraw at poles + if (lastY != y) + { + DrawHorizontalLine(x0 + x, x0 - x, y0 + y, draw); // ◠ + // This check prevents overdraw at central horizontal + if (y != 0) + { + DrawHorizontalLine(x0 + x, x0 - x, y0 - y, draw); // ◡ + } + } + lastY = y; + + int lastError = error; + if (y >= error) + { + y++; + error += 2*y + 1; + } + + // Second check is needed to avoid weird pixels at diagonals at some radiuses + // Example radiuses: 4, 11, 134, 373, 4552 + if (x < lastError || y < error) + { + x++; + error += 2*x + 1; + } + } + } + + private static void DrawHorizontalLine(int fromX, int toX, int y, Action draw) + { + for (int x = fromX; x <= toX; x++) + { + draw(x, y); + } + } + + #endregion Raster + + public static void WireRay(Action drawLine, Ray ray) + { + drawLine(ray.origin, ray.origin + ray.direction); + } + + public static void WireRay( + DebugDrawLine drawLine, + Ray ray, + Color color, + float duration, + bool depthTest) + { + drawLine(ray.origin, ray.origin + ray.direction, color, duration, depthTest); + } + + #region WireQuad + + public static void WireQuadXY( + Action drawLine, + Vector3 position, + Quaternion rotation, + Vector2 scale) + { + WireQuad(drawLine, position, rotation, scale, Vector3.right, Vector3.up); + } + + public static void WireQuadXY( + DebugDrawLine drawLine, + Vector3 position, + Quaternion rotation, + Vector2 scale, + Color color, + float duration, + bool depthTest) + { + WireQuad(drawLine, position, rotation, scale, Vector3.right, Vector3.up, color, duration, depthTest); + } + + public static void WireQuadXZ( + Action drawLine, + Vector3 position, + Quaternion rotation, + Vector2 scale) + { + WireQuad(drawLine, position, rotation, scale, Vector3.right, Vector3.forward); + } + + public static void WireQuadXZ( + DebugDrawLine drawLine, + Vector3 position, + Quaternion rotation, + Vector2 scale, + Color color, + float duration, + bool depthTest) + { + WireQuad(drawLine, position, rotation, scale, Vector3.right, Vector3.forward, color, duration, depthTest); + } + + public static void WireQuadYZ( + Action drawLine, + Vector3 position, + Quaternion rotation, + Vector2 scale) + { + WireQuad(drawLine, position, rotation, scale, Vector3.up, Vector3.forward); + } + + public static void WireQuadYZ( + DebugDrawLine drawLine, + Vector3 position, + Quaternion rotation, + Vector2 scale, + Color color, + float duration, + bool depthTest) + { + WireQuad(drawLine, position, rotation, scale, Vector3.up, Vector3.forward, color, duration, depthTest); + } + + public static void WireQuad( + Action drawLine, + Vector3 position, + Quaternion rotation, + Vector2 scale, + Vector3 planeRight, + Vector3 planeForward) + { + Vector3 right = rotation*planeRight*scale.x; + Vector3 forward = rotation*planeForward*scale.y; + Vector3 forwardRight = position + right*0.5f + forward*0.5f; + Vector3 backRight = forwardRight - forward; + Vector3 backLeft = backRight - right; + Vector3 forwardLeft = forwardRight - right; + + drawLine(forwardRight, backRight); + drawLine(backRight, backLeft); + drawLine(backLeft, forwardLeft); + drawLine(forwardLeft, forwardRight); + } + + public static void WireQuad( + DebugDrawLine drawLine, + Vector3 position, + Quaternion rotation, + Vector2 scale, + Vector3 planeRight, + Vector3 planeForward, + Color color, + float duration, + bool depthTest) + { + Vector3 right = rotation*planeRight*scale.x; + Vector3 forward = rotation*planeForward*scale.y; + Vector3 forwardRight = position + right*0.5f + forward*0.5f; + Vector3 backRight = forwardRight - forward; + Vector3 backLeft = backRight - right; + Vector3 forwardLeft = forwardRight - right; + + drawLine(forwardRight, backRight, color, duration, depthTest); + drawLine(backRight, backLeft, color, duration, depthTest); + drawLine(backLeft, forwardLeft, color, duration, depthTest); + drawLine(forwardLeft, forwardRight, color, duration, depthTest); + } + + #endregion WireQuad + + public static void WireCube( + Action drawLine, + Vector3 position, + Quaternion rotation, + Vector3 scale) + { + Vector3 right = rotation*Vector3.right*scale.x; + Vector3 up = rotation*Vector3.up*scale.y; + Vector3 forward = rotation*Vector3.forward*scale.z; + + Vector3 a1 = position + right*0.5f + up*0.5f + forward*0.5f; + Vector3 b1 = a1 - up; + Vector3 c1 = b1 - right; + Vector3 d1 = a1 - right; + + Vector3 a2 = a1 - forward; + Vector3 b2 = b1 - forward; + Vector3 c2 = c1 - forward; + Vector3 d2 = d1 - forward; + + drawLine(a1, b1); + drawLine(b1, c1); + drawLine(c1, d1); + drawLine(d1, a1); + + drawLine(a2, b2); + drawLine(b2, c2); + drawLine(c2, d2); + drawLine(d2, a2); + + drawLine(a1, a2); + drawLine(b1, b2); + drawLine(c1, c2); + drawLine(d1, d2); + } + + public static void WireCube( + DebugDrawLine drawLine, + Vector3 position, + Quaternion rotation, + Vector3 scale, + Color color, + float duration, + bool depthTest) + { + Vector3 right = rotation*Vector3.right*scale.x; + Vector3 up = rotation*Vector3.up*scale.y; + Vector3 forward = rotation*Vector3.forward*scale.z; + + Vector3 a1 = position + right*0.5f + up*0.5f + forward*0.5f; + Vector3 b1 = a1 - up; + Vector3 c1 = b1 - right; + Vector3 d1 = a1 - right; + + Vector3 a2 = a1 - forward; + Vector3 b2 = b1 - forward; + Vector3 c2 = c1 - forward; + Vector3 d2 = d1 - forward; + + drawLine(a1, b1, color, duration, depthTest); + drawLine(b1, c1, color, duration, depthTest); + drawLine(c1, d1, color, duration, depthTest); + drawLine(d1, a1, color, duration, depthTest); + + drawLine(a2, b2, color, duration, depthTest); + drawLine(b2, c2, color, duration, depthTest); + drawLine(c2, d2, color, duration, depthTest); + drawLine(d2, a2, color, duration, depthTest); + + drawLine(a1, a2, color, duration, depthTest); + drawLine(b1, b2, color, duration, depthTest); + drawLine(c1, c2, color, duration, depthTest); + drawLine(d1, d2, color, duration, depthTest); + } + + #region WireCircleXY + + public static void WireCircleXY( + Action drawLine, + Vector3 position, + float radius) + { + WireCircle(pointOnCircleXY, drawLine, position, radius); + } + + public static void WireCircleXY( + DebugDrawLine drawLine, + Vector3 position, + float radius, + Color color, + float duration, + bool depthTest) + { + WireCircle(pointOnCircleXY, drawLine, position, radius, color, duration, depthTest); + } + + public static void WireCircleXY( + Action drawLine, + Vector3 position, + Quaternion rotation, + float radius) + { + WireCircle(pointOnCircleXY, drawLine, position, rotation, radius); + } + + public static void WireCircleXY( + DebugDrawLine drawLine, + Vector3 position, + Quaternion rotation, + float radius, + Color color, + float duration, + bool depthTest) + { + WireCircle(pointOnCircleXY, drawLine, position, rotation, radius, color, duration, depthTest); + } + + #endregion WireCircleXY + + #region WireCircleXZ + + public static void WireCircleXZ( + Action drawLine, + Vector3 position, + float radius) + { + WireCircle(pointOnCircleXZ, drawLine, position, radius); + } + + public static void WireCircleXZ( + DebugDrawLine drawLine, + Vector3 position, + float radius, + Color color, + float duration, + bool depthTest) + { + WireCircle(pointOnCircleXZ, drawLine, position, radius, color, duration, depthTest); + } + + public static void WireCircleXZ( + Action drawLine, + Vector3 position, + Quaternion rotation, + float radius) + { + WireCircle(pointOnCircleXZ, drawLine, position, rotation, radius); + } + + public static void WireCircleXZ( + DebugDrawLine drawLine, + Vector3 position, + Quaternion rotation, + float radius, + Color color, + float duration, + bool depthTest) + { + WireCircle(pointOnCircleXZ, drawLine, position, rotation, radius, color, duration, depthTest); + } + + #endregion WireCircleXZ + + #region WireCircleYZ + + public static void WireCircleYZ( + Action drawLine, + Vector3 position, + float radius) + { + WireCircle(pointOnCircleYZ, drawLine, position, radius); + } + + public static void WireCircleYZ( + DebugDrawLine drawLine, + Vector3 position, + float radius, + Color color, + float duration, + bool depthTest) + { + WireCircle(pointOnCircleYZ, drawLine, position, radius, color, duration, depthTest); + } + + public static void WireCircleYZ( + Action drawLine, + Vector3 position, + Quaternion rotation, + float radius) + { + WireCircle(pointOnCircleYZ, drawLine, position, rotation, radius); + } + + public static void WireCircleYZ( + DebugDrawLine drawLine, + Vector3 position, + Quaternion rotation, + float radius, + Color color, + float duration, + bool depthTest) + { + WireCircle(pointOnCircleYZ, drawLine, position, rotation, radius, color, duration, depthTest); + } + + #endregion WireCircleYZ + + #region WireCircle Universal + + public static void WireCircle( + Func pointOnCircle, + Action drawLine, + Vector3 position, + float radius) + { + WireArc(pointOnCircle, drawLine, position, radius, 0, circleSegments, circleSegmentAngle); + } + + public static void WireCircle( + Func pointOnCircle, + DebugDrawLine drawLine, + Vector3 position, + float radius, + Color color, + float duration, + bool depthTest) + { + WireArc(pointOnCircle, drawLine, position, radius, 0, circleSegments, circleSegmentAngle, color, duration, + depthTest); + } + + public static void WireCircle( + Func pointOnCircle, + Action drawLine, + Vector3 position, + Quaternion rotation, + float radius) + { + WireArc(pointOnCircle, drawLine, position, rotation, radius, 0, circleSegments, circleSegmentAngle); + } + + public static void WireCircle( + Func pointOnCircle, + DebugDrawLine drawLine, + Vector3 position, + Quaternion rotation, + float radius, + Color color, + float duration, + bool depthTest) + { + WireArc(pointOnCircle, drawLine, position, rotation, radius, 0, circleSegments, circleSegmentAngle, color, + duration, depthTest); + } + + #endregion WireCircle Universal + + #region WireArcXY + + public static void WireArcXY( + Action drawLine, + Vector3 position, + float radius, + float fromAngle, + float toAngle) + { + WireArc(pointOnCircleXY, drawLine, position, radius, fromAngle, toAngle); + } + + public static void WireArcXY( + DebugDrawLine drawLine, + Vector3 position, + float radius, + float fromAngle, + float toAngle, + Color color, + float duration, + bool depthTest) + { + WireArc(pointOnCircleXY, drawLine, position, radius, fromAngle, toAngle, color, duration, depthTest); + } + + public static void WireArcXY( + Action drawLine, + Vector3 position, + Quaternion rotation, + float radius, + float fromAngle, + float toAngle) + { + WireArc(pointOnCircleXY, drawLine, position, rotation, radius, fromAngle, toAngle); + } + + public static void WireArcXY( + DebugDrawLine drawLine, + Vector3 position, + Quaternion rotation, + float radius, + float fromAngle, + float toAngle, + Color color, + float duration, + bool depthTest) + { + WireArc(pointOnCircleXY, drawLine, position, rotation, radius, fromAngle, toAngle, color, duration, + depthTest); + } + + #endregion WireCircleXY + + #region WireArcXZ + + public static void WireArcXZ( + Action drawLine, + Vector3 position, + float radius, + float fromAngle, + float toAngle) + { + WireArc(pointOnCircleXZ, drawLine, position, radius, fromAngle, toAngle); + } + + public static void WireArcXZ( + DebugDrawLine drawLine, + Vector3 position, + float radius, + float fromAngle, + float toAngle, + Color color, + float duration, + bool depthTest) + { + WireArc(pointOnCircleXZ, drawLine, position, radius, fromAngle, toAngle, color, duration, depthTest); + } + + public static void WireArcXZ( + Action drawLine, + Vector3 position, + Quaternion rotation, + float radius, + float fromAngle, + float toAngle) + { + WireArc(pointOnCircleXZ, drawLine, position, rotation, radius, fromAngle, toAngle); + } + + public static void WireArcXZ( + DebugDrawLine drawLine, + Vector3 position, + Quaternion rotation, + float radius, + float fromAngle, + float toAngle, + Color color, + float duration, + bool depthTest) + { + WireArc(pointOnCircleXZ, drawLine, position, rotation, radius, fromAngle, toAngle, color, duration, + depthTest); + } + + #endregion WireCircleXZ + + #region WireArcYZ + + public static void WireArcYZ( + Action drawLine, + Vector3 position, + float radius, + float fromAngle, + float toAngle) + { + WireArc(pointOnCircleYZ, drawLine, position, radius, fromAngle, toAngle); + } + + public static void WireArcYZ( + DebugDrawLine drawLine, + Vector3 position, + float radius, + float fromAngle, + float toAngle, + Color color, + float duration, + bool depthTest) + { + WireArc(pointOnCircleYZ, drawLine, position, radius, fromAngle, toAngle, color, duration, depthTest); + } + + public static void WireArcYZ( + Action drawLine, + Vector3 position, + Quaternion rotation, + float radius, + float fromAngle, + float toAngle) + { + WireArc(pointOnCircleYZ, drawLine, position, rotation, radius, fromAngle, toAngle); + } + + public static void WireArcYZ( + DebugDrawLine drawLine, + Vector3 position, + Quaternion rotation, + float radius, + float fromAngle, + float toAngle, + Color color, + float duration, + bool depthTest) + { + WireArc(pointOnCircleYZ, drawLine, position, rotation, radius, fromAngle, toAngle, color, duration, + depthTest); + } + + #endregion WireCircleYZ + + #region WireArc Universal + + public static void WireArc( + Func pointOnCircle, + Action drawLine, + Vector3 position, + float radius, + float fromAngle, + float toAngle) + { + int segments; + float segmentAngle; + GetSegmentsAndSegmentAngle(fromAngle, toAngle, out segments, out segmentAngle); + + WireArc(pointOnCircle, drawLine, position, radius, fromAngle, segments, segmentAngle); + } + + public static void WireArc( + Func pointOnCircle, + DebugDrawLine drawLine, + Vector3 position, + float radius, + float fromAngle, + float toAngle, + Color color, + float duration, + bool depthTest) + { + int segments; + float segmentAngle; + GetSegmentsAndSegmentAngle(fromAngle, toAngle, out segments, out segmentAngle); + + WireArc(pointOnCircle, drawLine, position, radius, fromAngle, segments, segmentAngle, color, duration, + depthTest); + } + + public static void WireArc( + Func pointOnCircle, + Action drawLine, + Vector3 position, + Quaternion rotation, + float radius, + float fromAngle, + float toAngle) + { + int segments; + float segmentAngle; + GetSegmentsAndSegmentAngle(fromAngle, toAngle, out segments, out segmentAngle); + + WireArc(pointOnCircle, drawLine, position, rotation, radius, fromAngle, segments, segmentAngle); + } + + public static void WireArc( + Func pointOnCircle, + DebugDrawLine drawLine, + Vector3 position, + Quaternion rotation, + float radius, + float fromAngle, + float toAngle, + Color color, + float duration, + bool depthTest) + { + int segments; + float segmentAngle; + GetSegmentsAndSegmentAngle(fromAngle, toAngle, out segments, out segmentAngle); + + WireArc(pointOnCircle, drawLine, position, rotation, radius, fromAngle, segments, segmentAngle, color, + duration, depthTest); + } + + public static void WireArc( + Func pointOnCircle, + Action drawLine, + Vector3 position, + float radius, + float fromAngle, + int segments, + float segmentAngle) + { + float currentAngle = fromAngle; + for (var i = 0; i < segments; i++) + { + Vector3 a = position + pointOnCircle(radius, currentAngle); + currentAngle += segmentAngle; + Vector3 b = position + pointOnCircle(radius, currentAngle); + drawLine(a, b); + } + } + + public static void WireArc( + Func pointOnCircle, + DebugDrawLine drawLine, + Vector3 position, + float radius, + float fromAngle, + int segments, + float segmentAngle, + Color color, + float duration, + bool depthTest) + { + float currentAngle = fromAngle; + for (var i = 0; i < segments; i++) + { + Vector3 a = position + pointOnCircle(radius, currentAngle); + currentAngle += segmentAngle; + Vector3 b = position + pointOnCircle(radius, currentAngle); + drawLine(a, b, color, duration, depthTest); + } + } + + public static void WireArc( + Func pointOnCircle, + Action drawLine, + Vector3 position, + Quaternion rotation, + float radius, + float fromAngle, + int segments, + float segmentAngle) + { + float currentAngle = fromAngle; + for (var i = 0; i < segments; i++) + { + Vector3 a = position + rotation*pointOnCircle(radius, currentAngle); + currentAngle += segmentAngle; + Vector3 b = position + rotation*pointOnCircle(radius, currentAngle); + drawLine(a, b); + } + } + + public static void WireArc( + Func pointOnCircle, + DebugDrawLine drawLine, + Vector3 position, + Quaternion rotation, + float radius, + float fromAngle, + int segments, + float segmentAngle, + Color color, + float duration, + bool depthTest) + { + float currentAngle = fromAngle; + for (var i = 0; i < segments; i++) + { + Vector3 a = position + rotation*pointOnCircle(radius, currentAngle); + currentAngle += segmentAngle; + Vector3 b = position + rotation*pointOnCircle(radius, currentAngle); + drawLine(a, b, color, duration, depthTest); + } + } + + #endregion WireArc Universal + + public static void WireSphere( + Action drawLine, + Vector3 position, + Quaternion rotation, + float radius) + { + WireCircleXY(drawLine, position, rotation, radius); + WireCircleXZ(drawLine, position, rotation, radius); + WireCircleYZ(drawLine, position, rotation, radius); + } + + public static void WireSphere( + DebugDrawLine drawLine, + Vector3 position, + Quaternion rotation, + float radius, + Color color, + float duration, + bool depthTest) + { + WireCircleXY(drawLine, position, rotation, radius, color, duration, depthTest); + WireCircleXZ(drawLine, position, rotation, radius, color, duration, depthTest); + WireCircleYZ(drawLine, position, rotation, radius, color, duration, depthTest); + } + + public static void WireHemisphere( + Action drawLine, + Vector3 position, + Quaternion rotation, + float radius) + { + WireArcXY(drawLine, position, rotation, radius, -90, 90); + WireCircleXZ(drawLine, position, rotation, radius); + WireArcYZ(drawLine, position, rotation, radius, 0, 180); + } + + public static void WireHemisphere( + DebugDrawLine drawLine, + Vector3 position, + Quaternion rotation, + float radius, + Color color, + float duration, + bool depthTest) + { + WireArcXY(drawLine, position, rotation, radius, -90, 90, color, duration, depthTest); + WireCircleXZ(drawLine, position, rotation, radius, color, duration, depthTest); + WireArcYZ(drawLine, position, rotation, radius, 0, 180, color, duration, depthTest); + } + + public static void WireCone( + Action drawLine, + Vector3 position, + Quaternion rotation, + float apexRadius, + float angle, + float length) + { + Vector3 upperCenter = position + rotation*Vector3.up*length; + float upperRadius = Mathf.Tan(angle*Mathf.Deg2Rad)*length + apexRadius; + WireCircleXZ(drawLine, upperCenter, rotation, upperRadius); + + Vector3 a2 = upperCenter + rotation*PTUtils.PointOnCircle3XZ(upperRadius, 0); + Vector3 b2 = upperCenter + rotation*PTUtils.PointOnCircle3XZ(upperRadius, 90); + Vector3 c2 = upperCenter + rotation*PTUtils.PointOnCircle3XZ(upperRadius, 180); + Vector3 d2 = upperCenter + rotation*PTUtils.PointOnCircle3XZ(upperRadius, 270); + + if (apexRadius == 0) + { + drawLine(position, a2); + drawLine(position, b2); + drawLine(position, c2); + drawLine(position, d2); + } + else + { + WireCircleXZ(drawLine, position, rotation, apexRadius); + + Vector3 a1 = rotation*PTUtils.PointOnCircle3XZ(apexRadius, 0); + Vector3 b1 = rotation*PTUtils.PointOnCircle3XZ(apexRadius, 90); + Vector3 c1 = rotation*PTUtils.PointOnCircle3XZ(apexRadius, 180); + Vector3 d1 = rotation*PTUtils.PointOnCircle3XZ(apexRadius, 270); + + drawLine(a1, a2); + drawLine(b1, b2); + drawLine(c1, c2); + drawLine(d1, d2); + } + } + + public static void WireCone( + DebugDrawLine drawLine, + Vector3 position, + Quaternion rotation, + float apexRadius, + float angle, + float length, + Color color, + float duration, + bool depthTest) + { + Vector3 upperCenter = position + rotation*Vector3.up*length; + float upperRadius = Mathf.Tan(angle*Mathf.Deg2Rad)*length + apexRadius; + WireCircleXZ(drawLine, upperCenter, rotation, upperRadius, color, duration, depthTest); + + Vector3 a2 = upperCenter + rotation*PTUtils.PointOnCircle3XZ(upperRadius, 0); + Vector3 b2 = upperCenter + rotation*PTUtils.PointOnCircle3XZ(upperRadius, 90); + Vector3 c2 = upperCenter + rotation*PTUtils.PointOnCircle3XZ(upperRadius, 180); + Vector3 d2 = upperCenter + rotation*PTUtils.PointOnCircle3XZ(upperRadius, 270); + + if (apexRadius == 0) + { + drawLine(position, a2, color, duration, depthTest); + drawLine(position, b2, color, duration, depthTest); + drawLine(position, c2, color, duration, depthTest); + drawLine(position, d2, color, duration, depthTest); + } + else + { + WireCircleXZ(drawLine, position, rotation, apexRadius, color, duration, depthTest); + + Vector3 a1 = rotation*PTUtils.PointOnCircle3XZ(apexRadius, 0); + Vector3 b1 = rotation*PTUtils.PointOnCircle3XZ(apexRadius, 90); + Vector3 c1 = rotation*PTUtils.PointOnCircle3XZ(apexRadius, 180); + Vector3 d1 = rotation*PTUtils.PointOnCircle3XZ(apexRadius, 270); + + drawLine(a1, a2, color, duration, depthTest); + drawLine(b1, b2, color, duration, depthTest); + drawLine(c1, c2, color, duration, depthTest); + drawLine(d1, d2, color, duration, depthTest); + } + } + + private static void GetSegmentsAndSegmentAngle( + float fromAngle, + float toAngle, + out int segments, + out float segmentAngle) + { + float range = toAngle - fromAngle; + if (range > circleSegmentAngle) + { + segments = Mathf.FloorToInt(range/circleSegmentAngle); + segmentAngle = range/segments; + } + else + { + segments = 1; + segmentAngle = range; + } + } + } +} \ No newline at end of file diff --git a/Assets/Packages/ProceduralToolkit/Draw.cs.meta b/Assets/Packages/ProceduralToolkit/Draw.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..2ca41838fe340f1caf9f66c1a3662600e65d6551 --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/Draw.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 041d40a802569bb468e48d3d12108291 +timeCreated: 1472191557 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Packages/ProceduralToolkit/Editor.meta b/Assets/Packages/ProceduralToolkit/Editor.meta new file mode 100644 index 0000000000000000000000000000000000000000..2e4f3ba205fe489d69916a9688d6579e3a1fbe4d --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/Editor.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 50de3855b4920d1418f38faef4ac2903 +folderAsset: yes +DefaultImporter: + userData: diff --git a/Assets/Packages/ProceduralToolkit/Editor/MeshFilterExtension.cs b/Assets/Packages/ProceduralToolkit/Editor/MeshFilterExtension.cs new file mode 100644 index 0000000000000000000000000000000000000000..fe71084d4f7e3c1e2fc104adc9076fe55ce08eab --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/Editor/MeshFilterExtension.cs @@ -0,0 +1,31 @@ +using UnityEngine; +using UnityEditor; + +namespace ProceduralToolkit.Editor +{ + public class MeshFilterExtension + { + private const string menuPath = "CONTEXT/MeshFilter/Save Mesh"; + + [MenuItem(menuPath)] + private static void SaveMesh(MenuCommand menuCommand) + { + var meshFilter = (MeshFilter) menuCommand.context; + var mesh = meshFilter.sharedMesh; + + var path = EditorUtility.SaveFilePanelInProject("Save Mesh", mesh.name, "asset", "Save Mesh"); + if (string.IsNullOrEmpty(path)) + { + return; + } + AssetDatabase.CreateAsset(Object.Instantiate(mesh), path); + } + + [MenuItem(menuPath, true)] + private static bool SaveMeshTest(MenuCommand menuCommand) + { + var meshFilter = (MeshFilter) menuCommand.context; + return meshFilter.sharedMesh != null; + } + } +} \ No newline at end of file diff --git a/Assets/Packages/ProceduralToolkit/Editor/MeshFilterExtension.cs.meta b/Assets/Packages/ProceduralToolkit/Editor/MeshFilterExtension.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..1c4a4e330c25bbbee6d7a61c6b96434ff57abb2a --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/Editor/MeshFilterExtension.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 71651db0d4914594299aa50097de7456 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/Packages/ProceduralToolkit/Editor/ProceduralToolkitMenu.cs b/Assets/Packages/ProceduralToolkit/Editor/ProceduralToolkitMenu.cs new file mode 100644 index 0000000000000000000000000000000000000000..796fe1efdf5485b6598439c844f5983a7db6e5cf --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/Editor/ProceduralToolkitMenu.cs @@ -0,0 +1,145 @@ +using System; +using UnityEditor; +using UnityEngine; + +namespace ProceduralToolkit.Editor +{ + public class ProceduralToolkitMenu + { + public const string version = "0.1.9"; + + private const string primitivesPath = "GameObject/Procedural Toolkit/"; + private const string create = "Create "; + + private const int platonicSolids = 0; + private const string tetrahedron = "Tetrahedron"; + private const string cube = "Cube"; + private const string octahedron = "Octahedron"; + private const string dodecahedron = "Dodecahedron"; + private const string icosahedron = "Icosahedron"; + + private const int other = 20; + private const string plane = "Plane"; + private const string pyramid = "Pyramid"; + private const string prism = "Prism"; + private const string cylinder = "Cylinder"; + private const string sphere = "Sphere"; + + [MenuItem("Help/About Procedural Toolkit")] + private static void About() + { + AboutWindow.Open(); + } + + private static void PrimitiveTemplate(string name, Func mesh) + { + var go = GameObject.CreatePrimitive(PrimitiveType.Quad); + Undo.RegisterCreatedObjectUndo(go, create + name); + UnityEngine.Object.DestroyImmediate(go.GetComponent()); + go.name = name; + go.GetComponent().mesh = mesh(); + } + + #region Platonic solids + + [MenuItem(primitivesPath + tetrahedron, false, platonicSolids + 0)] + public static void Tetrahedron() + { + PrimitiveTemplate(tetrahedron, () => MeshE.Tetrahedron(1)); + } + + [MenuItem(primitivesPath + cube, false, platonicSolids + 1)] + public static void Cube() + { + PrimitiveTemplate(cube, () => MeshE.Cube(1)); + } + + [MenuItem(primitivesPath + octahedron, false, platonicSolids + 2)] + public static void Octahedron() + { + PrimitiveTemplate(octahedron, () => MeshE.Octahedron(1)); + } + + [MenuItem(primitivesPath + dodecahedron, false, platonicSolids + 3)] + public static void Dodecahedron() + { + PrimitiveTemplate(dodecahedron, () => MeshE.Dodecahedron(1)); + } + + [MenuItem(primitivesPath + icosahedron, false, platonicSolids + 4)] + public static void Icosahedron() + { + PrimitiveTemplate(icosahedron, () => MeshE.Icosahedron(1)); + } + + #endregion Platonic solids + + #region Other + + [MenuItem(primitivesPath + plane, false, other + 0)] + public static void Plane() + { + PrimitiveTemplate(plane, () => MeshE.Plane(10, 10, 10, 10)); + } + + [MenuItem(primitivesPath + pyramid, false, other + 1)] + public static void Pyramid() + { + PrimitiveTemplate(pyramid, () => MeshE.Pyramid(1, 6, 1)); + } + + [MenuItem(primitivesPath + prism, false, other + 2)] + public static void Prism() + { + PrimitiveTemplate(prism, () => MeshE.Prism(1, 16, 1)); + } + + [MenuItem(primitivesPath + cylinder, false, other + 3)] + public static void Cylinder() + { + PrimitiveTemplate(cylinder, () => MeshE.Cylinder(1, 16, 1)); + } + + [MenuItem(primitivesPath + sphere, false, other + 4)] + public static void Sphere() + { + PrimitiveTemplate(sphere, () => MeshE.Sphere(1, 16, 16)); + } + + #endregion Other + } + + public class AboutWindow : EditorWindow + { + public static void Open() + { + GetWindow(true, "About Procedural Toolkit"); + } + + private void OnGUI() + { + EditorGUILayout.Space(); + EditorGUILayout.SelectableLabel("Version: " + ProceduralToolkitMenu.version + "\n" + + "Copyright © Daniil Basmanov\n" + + "Icon by Iuliana Koroviakovskaia", GUILayout.Height(50)); + + EditorGUILayout.Space(); + if (GUILayout.Button("Repository")) + { + Application.OpenURL("https://github.com/Syomus/ProceduralToolkit/"); + } + if (GUILayout.Button("Asset Store")) + { + Application.OpenURL("https://www.assetstore.unity3d.com/#!/content/16508"); + } + if (GUILayout.Button("Issues")) + { + Application.OpenURL("https://github.com/Syomus/ProceduralToolkit/issues"); + } + if (GUILayout.Button("Support email")) + { + Application.OpenURL("mailto:proceduraltoolkit@syomus.com"); + } + } + } +} \ No newline at end of file diff --git a/Assets/Packages/ProceduralToolkit/Editor/ProceduralToolkitMenu.cs.meta b/Assets/Packages/ProceduralToolkit/Editor/ProceduralToolkitMenu.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..201b2e19cb458630bb79a2bbfed7c0ee4d830a21 --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/Editor/ProceduralToolkitMenu.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 1ec653ab5f2acc24493c9c537c9d98c3 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/Packages/ProceduralToolkit/Examples.meta b/Assets/Packages/ProceduralToolkit/Examples.meta new file mode 100644 index 0000000000000000000000000000000000000000..60d94aed7f3d558245bcb7a153b4856c20e64137 --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/Examples.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 09518247a0ed8fb499521b814ed2d7b5 +folderAsset: yes +DefaultImporter: + userData: diff --git a/Assets/Packages/ProceduralToolkit/Examples/Common.meta b/Assets/Packages/ProceduralToolkit/Examples/Common.meta new file mode 100644 index 0000000000000000000000000000000000000000..10d81f2bf67ee4a1a7d127f887fff19367d95529 --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/Examples/Common.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 21ba79b1e8f59ed4398ea530b0a8d1d6 +folderAsset: yes +timeCreated: 1443728013 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Packages/ProceduralToolkit/Examples/Common/ButtonControl.cs b/Assets/Packages/ProceduralToolkit/Examples/Common/ButtonControl.cs new file mode 100644 index 0000000000000000000000000000000000000000..25c1f481139f655b713f99f7c0e24fe34e31ed8a --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/Examples/Common/ButtonControl.cs @@ -0,0 +1,19 @@ +using System; +using UnityEngine; +using UnityEngine.UI; + +namespace ProceduralToolkit.Examples.UI +{ + public class ButtonControl : MonoBehaviour + { + public Text headerText; + public Button button; + + public void Initialize(string header, Action onClick) + { + name = header; + headerText.text = header; + button.onClick.AddListener(() => onClick()); + } + } +} \ No newline at end of file diff --git a/Assets/Packages/ProceduralToolkit/Examples/Common/ButtonControl.cs.meta b/Assets/Packages/ProceduralToolkit/Examples/Common/ButtonControl.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..08b96348caaef7b96426443e9dcd17bd0cb59660 --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/Examples/Common/ButtonControl.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: ff9585afe73a0dd4896f46d4c5903688 +timeCreated: 1443731833 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Packages/ProceduralToolkit/Examples/Common/CameraRotator.cs b/Assets/Packages/ProceduralToolkit/Examples/Common/CameraRotator.cs new file mode 100644 index 0000000000000000000000000000000000000000..d5d74f7cf7bb53086b1b6866cb0d7b0f446efa84 --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/Examples/Common/CameraRotator.cs @@ -0,0 +1,86 @@ +using UnityEngine; +using UnityEngine.EventSystems; +using UnityEngine.UI; + +namespace ProceduralToolkit.Examples +{ + /// + /// Simple camera controller + /// + [RequireComponent(typeof (Image))] + public class CameraRotator : UIBehaviour, IDragHandler + { + public Transform cameraTransform; + public Transform target; + [Header("Position")] + public float distanceMin = 10; + public float distanceMax = 30; + public float yOffset = 0; + public float scrollSensitivity = 1000; + public float scrollSmoothing = 10; + [Header("Rotation")] + public float tiltMin = -85; + public float tiltMax = 85; + public float rotationSensitivity = 0.5f; + public float rotationSpeed = 20; + + private float distance; + private float scrollDistance; + private float velocity; + private float lookAngle; + private float tiltAngle; + private Quaternion rotation; + + protected override void Awake() + { + base.Awake(); + tiltAngle = (tiltMin + tiltMax)/2; + distance = scrollDistance = (distanceMax + distanceMin)/2; + + if (cameraTransform == null || target == null) return; + + cameraTransform.rotation = rotation = Quaternion.Euler(tiltAngle, lookAngle, 0); + cameraTransform.position = CalculateCameraPosition(); + } + + private void LateUpdate() + { + if (cameraTransform == null || target == null) return; + + if (cameraTransform.rotation != rotation) + { + cameraTransform.rotation = Quaternion.Lerp(cameraTransform.rotation, rotation, + Time.deltaTime*rotationSpeed); + } + + float scroll = Input.GetAxis("Mouse ScrollWheel"); + if (scroll != 0) + { + scrollDistance -= scroll*Time.deltaTime*scrollSensitivity; + scrollDistance = Mathf.Clamp(scrollDistance, distanceMin, distanceMax); + } + + if (distance != scrollDistance) + { + distance = Mathf.SmoothDamp(distance, scrollDistance, ref velocity, Time.deltaTime*scrollSmoothing); + } + + cameraTransform.position = CalculateCameraPosition(); + } + + public void OnDrag(PointerEventData eventData) + { + if (cameraTransform == null || target == null) return; + + lookAngle += eventData.delta.x*rotationSensitivity; + tiltAngle -= eventData.delta.y*rotationSensitivity; + tiltAngle = Mathf.Clamp(tiltAngle, tiltMin, tiltMax); + rotation = Quaternion.Euler(tiltAngle, lookAngle, 0); + } + + private Vector3 CalculateCameraPosition() + { + return target.position + cameraTransform.rotation*(Vector3.back*distance) + Vector3.up*yOffset; + } + } +} \ No newline at end of file diff --git a/Assets/Packages/ProceduralToolkit/Examples/Common/CameraRotator.cs.meta b/Assets/Packages/ProceduralToolkit/Examples/Common/CameraRotator.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..ab84061dc85446c58c9a93c8085db4e1c03a8f34 --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/Examples/Common/CameraRotator.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 8a9e3604dbea82f46bac0914f2aea2c2 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/Packages/ProceduralToolkit/Examples/Common/ConfiguratorBase.cs b/Assets/Packages/ProceduralToolkit/Examples/Common/ConfiguratorBase.cs new file mode 100644 index 0000000000000000000000000000000000000000..c1980c1e02a2ba1af086bea30b444c901e596c89 --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/Examples/Common/ConfiguratorBase.cs @@ -0,0 +1,122 @@ +using System.Collections.Generic; +using UnityEngine; + +namespace ProceduralToolkit.Examples +{ + public class ConfiguratorBase : MonoBehaviour + { + private Palette currentPalette = new Palette(); + private Palette targetPalette = new Palette(); + + protected static T InstantiateControl(Transform parent) where T : Component + { + T prefab = Resources.Load(typeof (T).Name); + T control = Instantiate(prefab); + control.transform.SetParent(parent, false); + control.transform.localPosition = Vector3.zero; + control.transform.localRotation = Quaternion.identity; + control.transform.localScale = Vector3.one; + return control; + } + + protected static MeshDraft Platform(float radius, float heignt, int segments = 128) + { + float segmentAngle = 360f/segments; + float currentAngle = 0; + + var lowerRing = new List(segments); + var upperRing = new List(segments); + for (var i = 0; i < segments; i++) + { + var lowerPoint = PTUtils.PointOnCircle3XZ(radius + heignt, currentAngle); + lowerRing.Add(lowerPoint + Vector3.down*heignt); + + var upperPoint = PTUtils.PointOnCircle3XZ(radius, currentAngle); + upperRing.Add(upperPoint); + currentAngle -= segmentAngle; + } + + var platform = new MeshDraft {name = "Platform"}; + var bottom = MeshDraft.TriangleFan(lowerRing); + bottom.Add(MeshDraft.Band(lowerRing, upperRing)); + bottom.Paint(new Color(0.5f, 0.5f, 0.5f, 1)); + platform.Add(bottom); + + upperRing.Reverse(); + var top = MeshDraft.TriangleFan(upperRing); + top.Paint(new Color(0.8f, 0.8f, 0.8f, 1)); + platform.Add(top); + + return platform; + } + + protected static void AssignDraftToMeshFilter(MeshDraft draft, MeshFilter meshFilter, ref Mesh mesh) + { + if (mesh == null) + { + mesh = draft.ToMesh(); + } + else + { + draft.ToMesh(ref mesh); + } + mesh.RecalculateBounds(); + meshFilter.sharedMesh = mesh; + } + + protected void GeneratePalette() + { + List palette = RandomE.TetradicPalette(0.25f, 0.7f); + targetPalette.mainColor = palette[0].WithSV(0.8f, 0.6f); + targetPalette.secondaryColor = palette[1].WithSV(0.8f, 0.6f); + targetPalette.skyColor = palette[2]; + targetPalette.horizonColor = palette[3]; + targetPalette.groundColor = ColorHSV.Lerp(targetPalette.skyColor, targetPalette.horizonColor, 0.5f); + } + + protected ColorHSV GetMainColorHSV() + { + return targetPalette.mainColor; + } + + protected ColorHSV GetSecondaryColorHSV() + { + return targetPalette.secondaryColor; + } + + protected void SetupSkyboxAndPalette() + { + RenderSettings.skybox = new Material(RenderSettings.skybox); + currentPalette.mainColor = targetPalette.mainColor; + currentPalette.secondaryColor = targetPalette.secondaryColor; + currentPalette.skyColor = targetPalette.skyColor; + currentPalette.horizonColor = targetPalette.horizonColor; + currentPalette.groundColor = targetPalette.groundColor; + } + + protected void UpdateSkybox() + { + LerpSkybox(RenderSettings.skybox, currentPalette, targetPalette, Time.deltaTime); + } + + private static void LerpSkybox(Material skybox, Palette currentPalette, Palette targetPalette, float t) + { + currentPalette.skyColor = ColorHSV.Lerp(currentPalette.skyColor, targetPalette.skyColor, t); + currentPalette.horizonColor = ColorHSV.Lerp(currentPalette.horizonColor, targetPalette.horizonColor, t); + currentPalette.groundColor = ColorHSV.Lerp(currentPalette.groundColor, targetPalette.groundColor, t); + + skybox.SetColor("_SkyColor", currentPalette.skyColor.ToColor()); + skybox.SetColor("_HorizonColor", currentPalette.horizonColor.ToColor()); + skybox.SetColor("_GroundColor", currentPalette.groundColor.ToColor()); + } + + private class Palette + { + public ColorHSV mainColor; + public ColorHSV secondaryColor; + public ColorHSV skyColor; + public ColorHSV horizonColor; + public ColorHSV groundColor; + } + } +} \ No newline at end of file diff --git a/Assets/Packages/ProceduralToolkit/Examples/Common/ConfiguratorBase.cs.meta b/Assets/Packages/ProceduralToolkit/Examples/Common/ConfiguratorBase.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..56f80ccd9bd550b6e175b911d518a7059c6dd575 --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/Examples/Common/ConfiguratorBase.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 8124c0f20d31aab439ec3778bccaba87 +timeCreated: 1443729041 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Packages/ProceduralToolkit/Examples/Common/SkyBoxGenerator.cs b/Assets/Packages/ProceduralToolkit/Examples/Common/SkyBoxGenerator.cs new file mode 100644 index 0000000000000000000000000000000000000000..2ddd87e67af61c5a93d33001c4e416e49537b3f0 --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/Examples/Common/SkyBoxGenerator.cs @@ -0,0 +1,28 @@ +using UnityEngine; + +namespace ProceduralToolkit.Examples +{ + public class SkyBoxGenerator : ConfiguratorBase + { + private const float generateInterval = 5; + + private float nextGenerateTime; + + private void Awake() + { + GeneratePalette(); + SetupSkyboxAndPalette(); + } + + private void Update() + { + if (Time.time > nextGenerateTime) + { + nextGenerateTime = Time.time + generateInterval; + GeneratePalette(); + } + + UpdateSkybox(); + } + } +} \ No newline at end of file diff --git a/Assets/Packages/ProceduralToolkit/Examples/Common/SkyBoxGenerator.cs.meta b/Assets/Packages/ProceduralToolkit/Examples/Common/SkyBoxGenerator.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..a14a9678c62c53b58f5a252311448945507e5cd9 --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/Examples/Common/SkyBoxGenerator.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: fbbfdf99a4c2da44e85e79ec390d42b4 +timeCreated: 1472587502 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Packages/ProceduralToolkit/Examples/Common/SliderControl.cs b/Assets/Packages/ProceduralToolkit/Examples/Common/SliderControl.cs new file mode 100644 index 0000000000000000000000000000000000000000..69f4967b0d5dbf9edfd024fa3e836b376a971b90 --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/Examples/Common/SliderControl.cs @@ -0,0 +1,46 @@ +using System; +using UnityEngine; +using UnityEngine.UI; + +namespace ProceduralToolkit.Examples.UI +{ + public class SliderControl : MonoBehaviour + { + public Text headerText; + public Slider slider; + public Text valueText; + + public void Initialize(string header, float minValue, float maxValue, float value, Action onValueChanged) + { + name = header; + headerText.text = header; + slider.minValue = minValue; + slider.maxValue = maxValue; + slider.wholeNumbers = false; + slider.value = value; + slider.onValueChanged.AddListener(newValue => + { + onValueChanged(newValue); + valueText.text = newValue.ToString(); + }); + valueText.text = value.ToString(); + } + + public void Initialize(string header, int minValue, int maxValue, int value, Action onValueChanged) + { + name = header; + headerText.text = header; + slider.minValue = minValue; + slider.maxValue = maxValue; + slider.wholeNumbers = true; + slider.value = value; + slider.onValueChanged.AddListener(newValue => + { + int intValue = Mathf.FloorToInt(newValue); + onValueChanged(intValue); + valueText.text = intValue.ToString(); + }); + valueText.text = value.ToString(); + } + } +} \ No newline at end of file diff --git a/Assets/Packages/ProceduralToolkit/Examples/Common/SliderControl.cs.meta b/Assets/Packages/ProceduralToolkit/Examples/Common/SliderControl.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..3d7edaf293ae25867c1634857bc3169d652816ef --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/Examples/Common/SliderControl.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 5af1ea43c4a797e40b84b7383fc47fd8 +timeCreated: 1443731833 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Packages/ProceduralToolkit/Examples/Common/TextControl.cs b/Assets/Packages/ProceduralToolkit/Examples/Common/TextControl.cs new file mode 100644 index 0000000000000000000000000000000000000000..0169cd34a62e990721c8a9033f9d84b47706f9f1 --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/Examples/Common/TextControl.cs @@ -0,0 +1,16 @@ +using UnityEngine; +using UnityEngine.UI; + +namespace ProceduralToolkit.Examples.UI +{ + public class TextControl : MonoBehaviour + { + public Text headerText; + + public void Initialize(string header) + { + name = header; + headerText.text = header; + } + } +} \ No newline at end of file diff --git a/Assets/Packages/ProceduralToolkit/Examples/Common/TextControl.cs.meta b/Assets/Packages/ProceduralToolkit/Examples/Common/TextControl.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..ac628c30cf45c78013b9a442f989f90659cd5ea8 --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/Examples/Common/TextControl.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 9efd8439db7a449478ca7c33e193a47e +timeCreated: 1443771045 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Packages/ProceduralToolkit/Examples/Common/ToggleControl.cs b/Assets/Packages/ProceduralToolkit/Examples/Common/ToggleControl.cs new file mode 100644 index 0000000000000000000000000000000000000000..4b61e951b5a61e54ce30445fec75ad3262bc7f39 --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/Examples/Common/ToggleControl.cs @@ -0,0 +1,21 @@ +using System; +using UnityEngine; +using UnityEngine.UI; + +namespace ProceduralToolkit.Examples.UI +{ + public class ToggleControl : MonoBehaviour + { + public Text headerText; + public Toggle toggle; + + public void Initialize(string header, bool value, Action onValueChanged, ToggleGroup toggleGroup = null) + { + name = header; + headerText.text = header; + toggle.isOn = value; + toggle.onValueChanged.AddListener(newValue => onValueChanged(newValue)); + toggle.group = toggleGroup; + } + } +} \ No newline at end of file diff --git a/Assets/Packages/ProceduralToolkit/Examples/Common/ToggleControl.cs.meta b/Assets/Packages/ProceduralToolkit/Examples/Common/ToggleControl.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..a0abab0897d12d420fd9ecf1ffe91d42389c18ef --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/Examples/Common/ToggleControl.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: f674532b9458fc44381f0490d1f23f25 +timeCreated: 1443731833 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Packages/ProceduralToolkit/Examples/LowPolyTerrainGenerator.meta b/Assets/Packages/ProceduralToolkit/Examples/LowPolyTerrainGenerator.meta new file mode 100644 index 0000000000000000000000000000000000000000..46994f42fa20e7c1d038225bf988701804decd0b --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/Examples/LowPolyTerrainGenerator.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 697315c155f3d914c883613af41c9115 +folderAsset: yes +DefaultImporter: + userData: diff --git a/Assets/Packages/ProceduralToolkit/Examples/LowPolyTerrainGenerator/Editor.meta b/Assets/Packages/ProceduralToolkit/Examples/LowPolyTerrainGenerator/Editor.meta new file mode 100644 index 0000000000000000000000000000000000000000..5c8878a25839ab8990c382d4bde6acf309a2bf63 --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/Examples/LowPolyTerrainGenerator/Editor.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 004f7cff3452ee94e8222afe4c6aebdb +folderAsset: yes +timeCreated: 1472316297 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Packages/ProceduralToolkit/Examples/LowPolyTerrainGenerator/Editor/Editoraew_WorldSpaceLightDirHlpNode.shaderaaaTknx6h b/Assets/Packages/ProceduralToolkit/Examples/LowPolyTerrainGenerator/Editor/Editoraew_WorldSpaceLightDirHlpNode.shaderaaaTknx6h new file mode 100644 index 0000000000000000000000000000000000000000..b2ce0a69bc0029dba443e1b533b41b9c2bfa3d5a --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/Examples/LowPolyTerrainGenerator/Editor/Editoraew_WorldSpaceLightDirHlpNode.shaderaaaTknx6h @@ -0,0 +1,41 @@ +using UnityEditor; +using UnityEngine; + +namespace ProceduralToolkit.Examples +{ + [CustomEditor(typeof (LowPolyTerrainGeneratorConfigurator))] + public class LowPolyTerrainGeneratorConfiguratorEditor : UnityEditor.Editor + { + private LowPolyTerrainGeneratorConfigurator generator; + + private void OnEnable() + { + generator = (LowPolyTerrainGeneratorConfigurator) target; + } + + public override void OnInspectorGUI() + { + base.OnInspectorGUI(); + + EditorGUILayout.Space(); + if (GUILayout.Button("Generate mesh")) + { + Undo.RecordObjects(new Object[] + { + generator, + generator.terrainMeshFilter, + }, "Generate terrain"); + generator.Generate(randomizeConfig: false); + } + if (GUILayout.Button("Randomize config and generate mesh")) + { + Undo.RecordObjects(new Object[] + { + generator, + generator.terrainMeshFilter, + }, "Generate terrain"); + generator.Generate(randomizeConfig: true); + } + } + } +} \ No newline at end of file diff --git a/Assets/Packages/ProceduralToolkit/Examples/LowPolyTerrainGenerator/Editor/Editoraew_WorldSpaceLightDirHlpNode.shaderaaaTknx6h.meta b/Assets/Packages/ProceduralToolkit/Examples/LowPolyTerrainGenerator/Editor/Editoraew_WorldSpaceLightDirHlpNode.shaderaaaTknx6h.meta new file mode 100644 index 0000000000000000000000000000000000000000..eb2a8e724f8da690e8a125b5579167498e31cf00 --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/Examples/LowPolyTerrainGenerator/Editor/Editoraew_WorldSpaceLightDirHlpNode.shaderaaaTknx6h.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 22f732953e2c41b4985ac5d782749ab6 +timeCreated: 1493999981 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Packages/ProceduralToolkit/Examples/LowPolyTerrainGenerator/Editor/e9UVHqw+ b/Assets/Packages/ProceduralToolkit/Examples/LowPolyTerrainGenerator/Editor/e9UVHqw+ new file mode 100644 index 0000000000000000000000000000000000000000..e48549a755baa1e6d55185d715c6d433d5935ad5 --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/Examples/LowPolyTerrainGenerator/Editor/e9UVHqw+ @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: a30856e6ad186d24184da4273117b550 +timeCreated: 1472316301 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Packages/ProceduralToolkit/Examples/LowPolyTerrainGenerator/Editor/e9UVHqw+.meta b/Assets/Packages/ProceduralToolkit/Examples/LowPolyTerrainGenerator/Editor/e9UVHqw+.meta new file mode 100644 index 0000000000000000000000000000000000000000..6deae2d9b3853abe3722bc0e431658703e179adb --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/Examples/LowPolyTerrainGenerator/Editor/e9UVHqw+.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ab8395abe88392844ad61e2bd812c98f +timeCreated: 1493999981 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Packages/ProceduralToolkit/Examples/LowPolyTerrainGenerator/LowPolyTerrainGenerator.cs b/Assets/Packages/ProceduralToolkit/Examples/LowPolyTerrainGenerator/LowPolyTerrainGenerator.cs new file mode 100644 index 0000000000000000000000000000000000000000..d3d17afc45177f1ac6fd266c77097f35253a6293 --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/Examples/LowPolyTerrainGenerator/LowPolyTerrainGenerator.cs @@ -0,0 +1,118 @@ +using System; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.Assertions; +using Random = UnityEngine.Random; + +namespace ProceduralToolkit.Examples +{ + /// + /// A simple Perlin noise based low poly terrain generator + /// + public static class LowPolyTerrainGenerator + { + [Serializable] + public class Config + { + public Vector3 terrainSize = new Vector3(20, 1, 20); + public float cellSize = 1; + public float noiseScale = 5; + public Gradient gradient; + } + + public static MeshDraft TerrainDraft(Config config) + { + Assert.IsTrue(config.terrainSize.x > 0); + Assert.IsTrue(config.terrainSize.z > 0); + Assert.IsTrue(config.cellSize > 0); + + var noiseOffset = new Vector2(Random.Range(0f, 100f), Random.Range(0f, 100f)); + + int xSegments = Mathf.FloorToInt(config.terrainSize.x/config.cellSize); + int zSegments = Mathf.FloorToInt(config.terrainSize.z/config.cellSize); + + float xStep = config.terrainSize.x/xSegments; + float zStep = config.terrainSize.z/zSegments; + int vertexCount = 6*xSegments*zSegments; + var draft = new MeshDraft + { + name = "Terrain", + vertices = new List(vertexCount), + triangles = new List(vertexCount), + normals = new List(vertexCount), + colors = new List(vertexCount) + }; + + for (int i = 0; i < vertexCount; i++) + { + draft.vertices.Add(Vector3.zero); + draft.triangles.Add(0); + draft.normals.Add(Vector3.zero); + draft.colors.Add(Color.black); + } + + for (int x = 0; x < xSegments; x++) + { + for (int z = 0; z < zSegments; z++) + { + int index0 = 6*(x + z*xSegments); + int index1 = index0 + 1; + int index2 = index0 + 2; + int index3 = index0 + 3; + int index4 = index0 + 4; + int index5 = index0 + 5; + + float height00 = GetHeight(x + 0, z + 0, xSegments, zSegments, noiseOffset, config.noiseScale); + float height01 = GetHeight(x + 0, z + 1, xSegments, zSegments, noiseOffset, config.noiseScale); + float height10 = GetHeight(x + 1, z + 0, xSegments, zSegments, noiseOffset, config.noiseScale); + float height11 = GetHeight(x + 1, z + 1, xSegments, zSegments, noiseOffset, config.noiseScale); + + var vertex00 = new Vector3((x + 0)*xStep, height00*config.terrainSize.y, (z + 0)*zStep); + var vertex01 = new Vector3((x + 0)*xStep, height01*config.terrainSize.y, (z + 1)*zStep); + var vertex10 = new Vector3((x + 1)*xStep, height10*config.terrainSize.y, (z + 0)*zStep); + var vertex11 = new Vector3((x + 1)*xStep, height11*config.terrainSize.y, (z + 1)*zStep); + + draft.vertices[index0] = vertex00; + draft.vertices[index1] = vertex01; + draft.vertices[index2] = vertex11; + draft.vertices[index3] = vertex00; + draft.vertices[index4] = vertex11; + draft.vertices[index5] = vertex10; + + draft.colors[index0] = config.gradient.Evaluate(height00); + draft.colors[index1] = config.gradient.Evaluate(height01); + draft.colors[index2] = config.gradient.Evaluate(height11); + draft.colors[index3] = config.gradient.Evaluate(height00); + draft.colors[index4] = config.gradient.Evaluate(height11); + draft.colors[index5] = config.gradient.Evaluate(height10); + + Vector3 normal000111 = Vector3.Cross(vertex01 - vertex00, vertex11 - vertex00).normalized; + Vector3 normal001011 = Vector3.Cross(vertex11 - vertex00, vertex10 - vertex00).normalized; + + draft.normals[index0] = normal000111; + draft.normals[index1] = normal000111; + draft.normals[index2] = normal000111; + draft.normals[index3] = normal001011; + draft.normals[index4] = normal001011; + draft.normals[index5] = normal001011; + + draft.triangles[index0] = index0; + draft.triangles[index1] = index1; + draft.triangles[index2] = index2; + draft.triangles[index3] = index3; + draft.triangles[index4] = index4; + draft.triangles[index5] = index5; + } + } + + return draft; + } + + private static float GetHeight(int x, int z, int xSegments, int zSegments, Vector2 noiseOffset, float noiseScale) + { + float noiseX = noiseScale*x/xSegments + noiseOffset.x; + float noiseZ = noiseScale*z/zSegments + noiseOffset.y; + return Mathf.PerlinNoise(noiseX, noiseZ); + } + } +} \ No newline at end of file diff --git a/Assets/Packages/ProceduralToolkit/Examples/LowPolyTerrainGenerator/LowPolyTerrainGenerator.cs.meta b/Assets/Packages/ProceduralToolkit/Examples/LowPolyTerrainGenerator/LowPolyTerrainGenerator.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..c61882d6ce89b01fc1ace442a8ac689310ac1c60 --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/Examples/LowPolyTerrainGenerator/LowPolyTerrainGenerator.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 2c0b83da005af044da00be885d08dd80 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/Packages/ProceduralToolkit/Examples/LowPolyTerrainGenerator/LowPolyTerrainGenerator.unity b/Assets/Packages/ProceduralToolkit/Examples/LowPolyTerrainGenerator/LowPolyTerrainGenerator.unity new file mode 100644 index 0000000000000000000000000000000000000000..45c13ee7ca21046c8c37f50d35027bdde9fab46c --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/Examples/LowPolyTerrainGenerator/LowPolyTerrainGenerator.unity @@ -0,0 +1,821 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!29 &1 +SceneSettings: + m_ObjectHideFlags: 0 + m_PVSData: + m_PVSObjectsArray: [] + m_PVSPortalsArray: [] + m_OcclusionBakeSettings: + smallestOccluder: 5 + smallestHole: 0.25 + backfaceThreshold: 100 +--- !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.5, g: 0.5, b: 0.5, 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: 2100000, guid: 3b82c898af0b03548a0dddd255b6092e, 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: 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: 0 + m_AOMaxDistance: 1 + m_CompAOExponent: 0 + 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: 1024 + m_ReflectionCompression: 2 + m_LightingDataAsset: {fileID: 0} + m_RuntimeCPUUsage: 25 +--- !u!196 &5 +NavMeshSettings: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_BuildSettings: + serializedVersion: 2 + agentRadius: 0.5 + agentHeight: 2 + agentSlope: 45 + agentClimb: 0.4 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + accuratePlacement: 0 + minRegionArea: 2 + cellSize: 0.16666666 + manualCellSize: 0 + m_NavMeshData: {fileID: 0} +--- !u!1 &20002140 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 4: {fileID: 20002143} + - 114: {fileID: 20002142} + - 114: {fileID: 20002141} + m_Layer: 0 + m_Name: EventSystem + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &20002141 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 20002140} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1077351063, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_HorizontalAxis: Horizontal + m_VerticalAxis: Vertical + m_SubmitButton: Submit + m_CancelButton: Cancel + m_InputActionsPerSecond: 10 + m_RepeatDelay: 0.5 + m_ForceModuleActive: 0 +--- !u!114 &20002142 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 20002140} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -619905303, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_FirstSelected: {fileID: 0} + m_sendNavigationEvents: 1 + m_DragThreshold: 5 +--- !u!4 &20002143 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 20002140} + 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_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 4 +--- !u!1 &466175283 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 126034, guid: 0bc0ac62dcca19446890462247ee487c, type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 224: {fileID: 466175284} + - 223: {fileID: 466175287} + - 114: {fileID: 466175286} + - 114: {fileID: 466175285} + - 114: {fileID: 466175288} + m_Layer: 5 + m_Name: LowPolyTerrainGeneratorConfigurator + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &466175284 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22405940, guid: 0bc0ac62dcca19446890462247ee487c, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 466175283} + 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_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_Children: + - {fileID: 1832017631} + - {fileID: 693684436} + m_Father: {fileID: 0} + m_RootOrder: 3 + 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!114 &466175285 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11431070, guid: 0bc0ac62dcca19446890462247ee487c, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 466175283} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1301386320, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreReversedGraphics: 1 + m_BlockingObjects: 0 + m_BlockingMask: + serializedVersion: 2 + m_Bits: 4294967295 +--- !u!114 &466175286 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11448610, guid: 0bc0ac62dcca19446890462247ee487c, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 466175283} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1980459831, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_UiScaleMode: 1 + m_ReferencePixelsPerUnit: 100 + m_ScaleFactor: 1 + m_ReferenceResolution: {x: 960, y: 600} + m_ScreenMatchMode: 0 + m_MatchWidthOrHeight: 0.5 + m_PhysicalUnit: 3 + m_FallbackScreenDPI: 96 + m_DefaultSpriteDPI: 96 + m_DynamicPixelsPerUnit: 1 +--- !u!223 &466175287 +Canvas: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22322820, guid: 0bc0ac62dcca19446890462247ee487c, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 466175283} + 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!114 &466175288 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 466175283} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: c2ea2478de1f3b342afd171f3dc5e216, type: 3} + m_Name: + m_EditorClassIdentifier: + terrainMeshFilter: {fileID: 1534059044} + leftPanel: {fileID: 1832017631} + constantSeed: 0 + config: + terrainSize: {x: 20, y: 1, z: 20} + cellSize: 1 + noiseScale: 5 + gradient: + key0: + serializedVersion: 2 + rgba: 4280233881 + key1: + serializedVersion: 2 + rgba: 4280893388 + key2: + serializedVersion: 2 + rgba: 0 + key3: + serializedVersion: 2 + rgba: 0 + key4: + serializedVersion: 2 + rgba: 0 + key5: + serializedVersion: 2 + rgba: 0 + key6: + serializedVersion: 2 + rgba: 0 + key7: + serializedVersion: 2 + rgba: 0 + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 +--- !u!1 &693684432 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 168256, guid: 0bc0ac62dcca19446890462247ee487c, type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 224: {fileID: 693684436} + - 222: {fileID: 693684435} + - 114: {fileID: 693684434} + - 114: {fileID: 693684433} + m_Layer: 5 + m_Name: CameraRotator + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &693684433 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11453326, guid: 0bc0ac62dcca19446890462247ee487c, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 693684432} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0, g: 0, b: 0, a: 0} + 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 &693684434 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 693684432} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 8a9e3604dbea82f46bac0914f2aea2c2, type: 3} + m_Name: + m_EditorClassIdentifier: + cameraTransform: {fileID: 957521128} + target: {fileID: 1534059046} + distanceMin: 2 + distanceMax: 20 + yOffset: 0.5 + scrollSensitivity: 1000 + scrollSmoothing: 10 + tiltMin: 0 + tiltMax: 85 + rotationSensitivity: 0.5 + rotationSpeed: 20 +--- !u!222 &693684435 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22257302, guid: 0bc0ac62dcca19446890462247ee487c, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 693684432} +--- !u!224 &693684436 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22401078, guid: 0bc0ac62dcca19446890462247ee487c, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 693684432} + 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_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_Children: [] + m_Father: {fileID: 466175284} + m_RootOrder: 1 + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 300, y: 0} + m_SizeDelta: {x: -300, y: 0} + m_Pivot: {x: 0, y: 0.5} +--- !u!1 &957521123 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 4: {fileID: 957521128} + - 20: {fileID: 957521127} + m_Layer: 0 + m_Name: Main Camera + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!20 &957521127 +Camera: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 957521123} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 1 + m_BackGroundColor: {r: 1, g: 1, b: 1, a: 1} + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.3 + far clip plane: 50 + 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 &957521128 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 957521123} + m_LocalRotation: {x: 0.38268343, y: 0, z: 0, w: 0.92387956} + m_LocalPosition: {x: 0, y: 8, z: -8} + m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalEulerAnglesHint: {x: 45, y: 0, z: 0} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 1 +--- !u!1 &1327247758 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 4: {fileID: 1327247760} + - 108: {fileID: 1327247759} + 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 &1327247759 +Light: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1327247758} + m_Enabled: 1 + serializedVersion: 7 + m_Type: 1 + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_Intensity: 1.4 + 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 &1327247760 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1327247758} + m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 2 +--- !u!1 &1534059042 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 4: {fileID: 1534059046} + - 23: {fileID: 1534059045} + - 33: {fileID: 1534059044} + m_Layer: 0 + m_Name: TerrainRenderer + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!33 &1534059044 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1534059042} + m_Mesh: {fileID: 1552487971} +--- !u!23 &1534059045 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1534059042} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 0 + m_ReflectionProbeUsage: 0 + m_Materials: + - {fileID: 2100000, guid: d8eccd73a6902a04eae9084d964dd9b8, type: 2} + m_SubsetIndices: + 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_SelectedWireframeHidden: 0 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingOrder: 0 +--- !u!4 &1534059046 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1534059042} + 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_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 +--- !u!43 &1552487971 +Mesh: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: Terrain + serializedVersion: 8 + m_SubMeshes: + - serializedVersion: 2 + firstByte: 0 + indexCount: 2400 + topology: 0 + firstVertex: 0 + vertexCount: 2400 + localAABB: + m_Center: {x: 0, y: 0.4520702, z: 0} + m_Extent: {x: 10, y: 0.3620161, z: 10} + m_Shapes: + vertices: [] + shapes: [] + channels: [] + fullWeights: [] + m_BindPose: [] + m_BoneNameHashes: + m_RootBoneNameHash: 0 + m_MeshCompression: 0 + m_IsReadable: 1 + m_KeepVertices: 0 + m_KeepIndices: 0 + m_IndexBuffer: 00000100020003000400050006000700080009000a000b000c000d000e000f0010001100120013001400150016001700180019001a001b001c001d001e001f0020002100220023002400250026002700280029002a002b002c002d002e002f0030003100320033003400350036003700380039003a003b003c003d003e003f0040004100420043004400450046004700480049004a004b004c004d004e004f0050005100520053005400550056005700580059005a005b005c005d005e005f0060006100620063006400650066006700680069006a006b006c006d006e006f0070007100720073007400750076007700780079007a007b007c007d007e007f0080008100820083008400850086008700880089008a008b008c008d008e008f0090009100920093009400950096009700980099009a009b009c009d009e009f00a000a100a200a300a400a500a600a700a800a900aa00ab00ac00ad00ae00af00b000b100b200b300b400b500b600b700b800b900ba00bb00bc00bd00be00bf00c000c100c200c300c400c500c600c700c800c900ca00cb00cc00cd00ce00cf00d000d100d200d300d400d500d600d700d800d900da00db00dc00dd00de00df00e000e100e200e300e400e500e600e700e800e900ea00eb00ec00ed00ee00ef00f000f100f200f300f400f500f600f700f800f900fa00fb00fc00fd00fe00ff0000010101020103010401050106010701080109010a010b010c010d010e010f0110011101120113011401150116011701180119011a011b011c011d011e011f0120012101220123012401250126012701280129012a012b012c012d012e012f0130013101320133013401350136013701380139013a013b013c013d013e013f0140014101420143014401450146014701480149014a014b014c014d014e014f0150015101520153015401550156015701580159015a015b015c015d015e015f0160016101620163016401650166016701680169016a016b016c016d016e016f0170017101720173017401750176017701780179017a017b017c017d017e017f0180018101820183018401850186018701880189018a018b018c018d018e018f0190019101920193019401950196019701980199019a019b019c019d019e019f01a001a101a201a301a401a501a601a701a801a901aa01ab01ac01ad01ae01af01b001b101b201b301b401b501b601b701b801b901ba01bb01bc01bd01be01bf01c001c101c201c301c401c501c601c701c801c901ca01cb01cc01cd01ce01cf01d001d101d201d301d401d501d601d701d801d901da01db01dc01dd01de01df01e001e101e201e301e401e501e601e701e801e901ea01eb01ec01ed01ee01ef01f001f101f201f301f401f501f601f701f801f901fa01fb01fc01fd01fe01ff0100020102020203020402050206020702080209020a020b020c020d020e020f0210021102120213021402150216021702180219021a021b021c021d021e021f0220022102220223022402250226022702280229022a022b022c022d022e022f0230023102320233023402350236023702380239023a023b023c023d023e023f0240024102420243024402450246024702480249024a024b024c024d024e024f0250025102520253025402550256025702580259025a025b025c025d025e025f0260026102620263026402650266026702680269026a026b026c026d026e026f0270027102720273027402750276027702780279027a027b027c027d027e027f0280028102820283028402850286028702880289028a028b028c028d028e028f0290029102920293029402950296029702980299029a029b029c029d029e029f02a002a102a202a302a402a502a602a702a802a902aa02ab02ac02ad02ae02af02b002b102b202b302b402b502b602b702b802b902ba02bb02bc02bd02be02bf02c002c102c202c302c402c502c602c702c802c902ca02cb02cc02cd02ce02cf02d002d102d202d302d402d502d602d702d802d902da02db02dc02dd02de02df02e002e102e202e302e402e502e602e702e802e902ea02eb02ec02ed02ee02ef02f002f102f202f302f402f502f602f702f802f902fa02fb02fc02fd02fe02ff0200030103020303030403050306030703080309030a030b030c030d030e030f0310031103120313031403150316031703180319031a031b031c031d031e031f0320032103220323032403250326032703280329032a032b032c032d032e032f0330033103320333033403350336033703380339033a033b033c033d033e033f0340034103420343034403450346034703480349034a034b034c034d034e034f0350035103520353035403550356035703580359035a035b035c035d035e035f0360036103620363036403650366036703680369036a036b036c036d036e036f0370037103720373037403750376037703780379037a037b037c037d037e037f0380038103820383038403850386038703880389038a038b038c038d038e038f0390039103920393039403950396039703980399039a039b039c039d039e039f03a003a103a203a303a403a503a603a703a803a903aa03ab03ac03ad03ae03af03b003b103b203b303b403b503b603b703b803b903ba03bb03bc03bd03be03bf03c003c103c203c303c403c503c603c703c803c903ca03cb03cc03cd03ce03cf03d003d103d203d303d403d503d603d703d803d903da03db03dc03dd03de03df03e003e103e203e303e403e503e603e703e803e903ea03eb03ec03ed03ee03ef03f003f103f203f303f403f503f603f703f803f903fa03fb03fc03fd03fe03ff0300040104020403040404050406040704080409040a040b040c040d040e040f0410041104120413041404150416041704180419041a041b041c041d041e041f0420042104220423042404250426042704280429042a042b042c042d042e042f0430043104320433043404350436043704380439043a043b043c043d043e043f0440044104420443044404450446044704480449044a044b044c044d044e044f0450045104520453045404550456045704580459045a045b045c045d045e045f0460046104620463046404650466046704680469046a046b046c046d046e046f0470047104720473047404750476047704780479047a047b047c047d047e047f0480048104820483048404850486048704880489048a048b048c048d048e048f0490049104920493049404950496049704980499049a049b049c049d049e049f04a004a104a204a304a404a504a604a704a804a904aa04ab04ac04ad04ae04af04b004b104b204b304b404b504b604b704b804b904ba04bb04bc04bd04be04bf04c004c104c204c304c404c504c604c704c804c904ca04cb04cc04cd04ce04cf04d004d104d204d304d404d504d604d704d804d904da04db04dc04dd04de04df04e004e104e204e304e404e504e604e704e804e904ea04eb04ec04ed04ee04ef04f004f104f204f304f404f504f604f704f804f904fa04fb04fc04fd04fe04ff0400050105020503050405050506050705080509050a050b050c050d050e050f0510051105120513051405150516051705180519051a051b051c051d051e051f0520052105220523052405250526052705280529052a052b052c052d052e052f0530053105320533053405350536053705380539053a053b053c053d053e053f0540054105420543054405450546054705480549054a054b054c054d054e054f0550055105520553055405550556055705580559055a055b055c055d055e055f0560056105620563056405650566056705680569056a056b056c056d056e056f0570057105720573057405750576057705780579057a057b057c057d057e057f0580058105820583058405850586058705880589058a058b058c058d058e058f0590059105920593059405950596059705980599059a059b059c059d059e059f05a005a105a205a305a405a505a605a705a805a905aa05ab05ac05ad05ae05af05b005b105b205b305b405b505b605b705b805b905ba05bb05bc05bd05be05bf05c005c105c205c305c405c505c605c705c805c905ca05cb05cc05cd05ce05cf05d005d105d205d305d405d505d605d705d805d905da05db05dc05dd05de05df05e005e105e205e305e405e505e605e705e805e905ea05eb05ec05ed05ee05ef05f005f105f205f305f405f505f605f705f805f905fa05fb05fc05fd05fe05ff0500060106020603060406050606060706080609060a060b060c060d060e060f0610061106120613061406150616061706180619061a061b061c061d061e061f0620062106220623062406250626062706280629062a062b062c062d062e062f0630063106320633063406350636063706380639063a063b063c063d063e063f0640064106420643064406450646064706480649064a064b064c064d064e064f0650065106520653065406550656065706580659065a065b065c065d065e065f0660066106620663066406650666066706680669066a066b066c066d066e066f0670067106720673067406750676067706780679067a067b067c067d067e067f0680068106820683068406850686068706880689068a068b068c068d068e068f0690069106920693069406950696069706980699069a069b069c069d069e069f06a006a106a206a306a406a506a606a706a806a906aa06ab06ac06ad06ae06af06b006b106b206b306b406b506b606b706b806b906ba06bb06bc06bd06be06bf06c006c106c206c306c406c506c606c706c806c906ca06cb06cc06cd06ce06cf06d006d106d206d306d406d506d606d706d806d906da06db06dc06dd06de06df06e006e106e206e306e406e506e606e706e806e906ea06eb06ec06ed06ee06ef06f006f106f206f306f406f506f606f706f806f906fa06fb06fc06fd06fe06ff0600070107020703070407050706070707080709070a070b070c070d070e070f0710071107120713071407150716071707180719071a071b071c071d071e071f0720072107220723072407250726072707280729072a072b072c072d072e072f0730073107320733073407350736073707380739073a073b073c073d073e073f0740074107420743074407450746074707480749074a074b074c074d074e074f0750075107520753075407550756075707580759075a075b075c075d075e075f0760076107620763076407650766076707680769076a076b076c076d076e076f0770077107720773077407750776077707780779077a077b077c077d077e077f0780078107820783078407850786078707880789078a078b078c078d078e078f0790079107920793079407950796079707980799079a079b079c079d079e079f07a007a107a207a307a407a507a607a707a807a907aa07ab07ac07ad07ae07af07b007b107b207b307b407b507b607b707b807b907ba07bb07bc07bd07be07bf07c007c107c207c307c407c507c607c707c807c907ca07cb07cc07cd07ce07cf07d007d107d207d307d407d507d607d707d807d907da07db07dc07dd07de07df07e007e107e207e307e407e507e607e707e807e907ea07eb07ec07ed07ee07ef07f007f107f207f307f407f507f607f707f807f907fa07fb07fc07fd07fe07ff0700080108020803080408050806080708080809080a080b080c080d080e080f0810081108120813081408150816081708180819081a081b081c081d081e081f0820082108220823082408250826082708280829082a082b082c082d082e082f0830083108320833083408350836083708380839083a083b083c083d083e083f0840084108420843084408450846084708480849084a084b084c084d084e084f0850085108520853085408550856085708580859085a085b085c085d085e085f0860086108620863086408650866086708680869086a086b086c086d086e086f0870087108720873087408750876087708780879087a087b087c087d087e087f0880088108820883088408850886088708880889088a088b088c088d088e088f0890089108920893089408950896089708980899089a089b089c089d089e089f08a008a108a208a308a408a508a608a708a808a908aa08ab08ac08ad08ae08af08b008b108b208b308b408b508b608b708b808b908ba08bb08bc08bd08be08bf08c008c108c208c308c408c508c608c708c808c908ca08cb08cc08cd08ce08cf08d008d108d208d308d408d508d608d708d808d908da08db08dc08dd08de08df08e008e108e208e308e408e508e608e708e808e908ea08eb08ec08ed08ee08ef08f008f108f208f308f408f508f608f708f808f908fa08fb08fc08fd08fe08ff0800090109020903090409050906090709080909090a090b090c090d090e090f0910091109120913091409150916091709180919091a091b091c091d091e091f0920092109220923092409250926092709280929092a092b092c092d092e092f0930093109320933093409350936093709380939093a093b093c093d093e093f0940094109420943094409450946094709480949094a094b094c094d094e094f0950095109520953095409550956095709580959095a095b095c095d095e095f09 + m_Skin: [] + m_VertexData: + m_CurrentChannels: 7 + m_VertexCount: 2400 + m_Channels: + - stream: 0 + offset: 0 + format: 0 + dimension: 3 + - stream: 0 + offset: 12 + format: 0 + dimension: 3 + - stream: 0 + offset: 24 + format: 0 + dimension: 4 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + m_DataSize: 96000 + _typelessdata: 000020c177e1223f000020c18c77763ec511773f0411d3bdbab9393fe5e4643e9594143e0000803f000020c1ba373e3f000010c18c77763ec511773f0411d3bdbfbe3e3fe9e8683e9998183e0000803f000010c15abffc3e000010c18c77763ec511773f0411d3bdb3b2323fd9d8583e8d8c0c3e0000803f000020c177e1223f000020c132f3633e6ca5783fcf3bacbdbab9393fe5e4643e9594143e0000803f000010c15abffc3e000010c132f3633e6ca5783fcf3bacbdb3b2323fd9d8583e8d8c0c3e0000803f000010c1646ad03e000020c132f3633e6ca5783fcf3bacbdaead2d3fd5d4543e8d8c0c3e0000803f000010c1646ad03e000020c162bb3c3e29ad7a3fd3a3adbdaead2d3fd5d4543e8d8c0c3e0000803f000010c15abffc3e000010c162bb3c3e29ad7a3fd3a3adbdb3b2323fd9d8583e8d8c0c3e0000803f000000c1a0609c3e000010c162bb3c3e29ad7a3fd3a3adbda9a8283fcdcc4c3e8988083e0000803f000010c1646ad03e000020c1b718353ea6307b3f92f39dbdaead2d3fd5d4543e8d8c0c3e0000803f000000c1a0609c3e000010c1b718353ea6307b3f92f39dbda9a8283fcdcc4c3e8988083e0000803f000000c15244683e000020c1b718353ea6307b3f92f39dbda5a4243fc9c8483e8584043e0000803f000000c15244683e000020c19cb0973d06837e3f4c0aa0bda5a4243fc9c8483e8584043e0000803f000000c1a0609c3e000010c19cb0973d06837e3f4c0aa0bda9a8283fcdcc4c3e8988083e0000803f0000e0c06a776c3e000010c19cb0973d06837e3f4c0aa0bda5a4243fc9c8483e8584043e0000803f000000c15244683e000020c1c18a573c91f07f3f1a5c8dbca5a4243fc9c8483e8584043e0000803f0000e0c06a776c3e000010c1c18a573c91f07f3f1a5c8dbca5a4243fc9c8483e8584043e0000803f0000e0c0d6ca5a3e000020c1c18a573c91f07f3f1a5c8dbca4a3233fc9c8483e8584043e0000803f0000e0c0d6ca5a3e000020c1119b0bbe6c927d3f510d8cbca4a3233fc9c8483e8584043e0000803f0000e0c06a776c3e000010c1119b0bbe6c927d3f510d8cbca5a4243fc9c8483e8584043e0000803f0000c0c059b4bc3e000010c1119b0bbe6c927d3f510d8cbcacab2b3fd1d0503e8988083e0000803f0000e0c0d6ca5a3e000020c1522a6abe5e68783f7581a03da4a3233fc9c8483e8584043e0000803f0000c0c059b4bc3e000010c1522a6abe5e68783f7581a03dacab2b3fd1d0503e8988083e0000803f0000c0c0ad0ee63e000020c1522a6abe5e68783f7581a03db0af2f3fd9d8583e8d8c0c3e0000803f0000c0c0ad0ee63e000020c1372932befd467b3f205ca23db0af2f3fd9d8583e8d8c0c3e0000803f0000c0c059b4bc3e000010c1372932befd467b3f205ca23dacab2b3fd1d0503e8988083e0000803f0000a0c0c8ba0b3f000010c1372932befd467b3f205ca23db5b4343fdddc5c3e9190103e0000803f0000c0c0ad0ee63e000020c18c454bbece79793fc7f8d53db0af2f3fd9d8583e8d8c0c3e0000803f0000a0c0c8ba0b3f000010c18c454bbece79793fc7f8d53db5b4343fdddc5c3e9190103e0000803f0000a0c0f12c273f000020c18c454bbece79793fc7f8d53dbbba3a3fe5e4643e9594143e0000803f0000a0c0f12c273f000020c12658bebcfd787e3fea41da3dbbba3a3fe5e4643e9594143e0000803f0000a0c0c8ba0b3f000010c12658bebcfd787e3fea41da3db5b4343fdddc5c3e9190103e0000803f000080c0adb6113f000010c12658bebcfd787e3fea41da3db6b5353fe1e0603e9190103e0000803f0000a0c0f12c273f000020c1a043b03c29727f3f2d847e3dbbba3a3fe5e4643e9594143e0000803f000080c0adb6113f000010c1a043b03c29727f3f2d847e3db6b5353fe1e0603e9190103e0000803f000080c0c5a7213f000020c1a043b03c29727f3f2d847e3dbab9393fe5e4643e9594143e0000803f000080c0c5a7213f000020c153f139bdde3d7f3f13507e3dbab9393fe5e4643e9594143e0000803f000080c0adb6113f000010c153f139bdde3d7f3f13507e3db6b5353fe1e0603e9190103e0000803f000040c0995e1d3f000010c153f139bdde3d7f3f13507e3db9b8383fe1e0603e9594143e0000803f000080c0c5a7213f000020c1d3bec63cdaea7f3f9f92f6bbbab9393fe5e4643e9594143e0000803f000040c0995e1d3f000010c1d3bec63cdaea7f3f9f92f6bbb9b8383fe1e0603e9594143e0000803f000040c04b711b3f000020c1d3bec63cdaea7f3f9f92f6bbb8b7373fe1e0603e9594143e0000803f000040c04b711b3f000020c19dea2a3becfd7f3fffa4f6bbb8b7373fe1e0603e9594143e0000803f000040c0995e1d3f000010c19dea2a3becfd7f3fffa4f6bbb9b8383fe1e0603e9594143e0000803f000000c0adb31c3f000010c19dea2a3becfd7f3fffa4f6bbb9b8383fe1e0603e9594143e0000803f000040c04b711b3f000020c11db5793d88f77e3f36e386bdb8b7373fe1e0603e9594143e0000803f000000c0adb31c3f000010c11db5793d88f77e3f36e386bdb9b8383fe1e0603e9594143e0000803f000000c0c9c50b3f000020c11db5793d88f77e3f36e386bdb5b4343fdddc5c3e9190103e0000803f000000c0c9c50b3f000020c1f9b50a3e6e167d3fb1e485bdb5b4343fdddc5c3e9190103e0000803f000000c0adb31c3f000010c1f9b50a3e6e167d3fb1e485bdb9b8383fe1e0603e9594143e0000803f000080bf0d40f33e000010c1f9b50a3e6e167d3fb1e485bdb2b1313fd9d8583e8d8c0c3e0000803f000000c0c9c50b3f000020c10f1c193ea74c7c3f4923a3bdb5b4343fdddc5c3e9190103e0000803f000080bf0d40f33e000010c10f1c193ea74c7c3f4923a3bdb2b1313fd9d8583e8d8c0c3e0000803f000080bf17dec93e000020c10f1c193ea74c7c3f4923a3bdadac2c3fd5d4543e8988083e0000803f000080bf17dec93e000020c190f62a3e20967b3f43ada2bdadac2c3fd5d4543e8988083e0000803f000080bf0d40f33e000010c190f62a3e20967b3f43ada2bdb2b1313fd9d8583e8d8c0c3e0000803f00000000df449c3e000010c190f62a3e20967b3f43ada2bda9a8283fcdcc4c3e8988083e0000803f000080bf17dec93e000020c113d02a3e8e987b3f8d5ea2bdadac2c3fd5d4543e8988083e0000803f00000000df449c3e000010c113d02a3e8e987b3f8d5ea2bda9a8283fcdcc4c3e8988083e0000803f00000000aaee653e000020c113d02a3e8e987b3f8d5ea2bda5a4243fc9c8483e8584043e0000803f00000000aaee653e000020c18e2da33d1d5c7e3f2e27a4bda5a4243fc9c8483e8584043e0000803f00000000df449c3e000010c18e2da33d1d5c7e3f2e27a4bda9a8283fcdcc4c3e8988083e0000803f0000803f486c663e000010c18e2da33d1d5c7e3f2e27a4bda5a4243fc9c8483e8584043e0000803f00000000aaee653e000020c10994973dae957e3fe18d98bda5a4243fc9c8483e8584043e0000803f0000803f486c663e000010c10994973dae957e3fe18d98bda5a4243fc9c8483e8584043e0000803f0000803fc9b8193e000020c10994973dae957e3fe18d98bda1a0203fc5c4443e8180003e0000803f0000803fc9b8193e000020c1f6da05be2c187d3f45a997bda1a0203fc5c4443e8180003e0000803f0000803f486c663e000010c1f6da05be2c187d3f45a997bda5a4243fc9c8483e8584043e0000803f0000004051e8b63e000010c1f6da05be2c187d3f45a997bdacab2b3fd1d0503e8988083e0000803f0000803fc9b8193e000020c1d2b132bebff57b3f4769f0bca1a0203fc5c4443e8180003e0000803f0000004051e8b63e000010c1d2b132bebff57b3f4769f0bcacab2b3fd1d0503e8988083e0000803f000000400fa4a73e000020c1d2b132bebff57b3f4769f0bcaaa9293fd1d0503e8988083e0000803f000000400fa4a73e000020c1c44537be2ac17b3f1b37f0bcaaa9293fd1d0503e8988083e0000803f0000004051e8b63e000010c1c44537be2ac17b3f1b37f0bcacab2b3fd1d0503e8988083e0000803f00004040660b0a3f000010c1c44537be2ac17b3f1b37f0bcb5b4343fdddc5c3e9190103e0000803f000000400fa4a73e000020c1598e7cbe0add773fa6362a3daaa9293fd1d0503e8988083e0000803f00004040660b0a3f000010c1598e7cbe0add773fa6362a3db5b4343fdddc5c3e9190103e0000803f000040403708153f000020c1598e7cbe0add773fa6362a3db7b6363fe1e0603e9190103e0000803f000040403708153f000020c1f2c2dabc5fac7f3fa2932f3db7b6363fe1e0603e9190103e0000803f00004040660b0a3f000010c1f2c2dabc5fac7f3fa2932f3db5b4343fdddc5c3e9190103e0000803f00008040bae3103f000010c1f2c2dabc5fac7f3fa2932f3db6b5353fe1e0603e9190103e0000803f000040403708153f000020c10e7ea5bd85f47d3f325ec63db7b6363fe1e0603e9190103e0000803f00008040bae3103f000010c10e7ea5bd85f47d3f325ec63db6b5353fe1e0603e9190103e0000803f000080409de2293f000020c10e7ea5bd85f47d3f325ec63dbbba3a3fe5e4643e9594143e0000803f000080409de2293f000020c1d077013e65be7c3ff46bc53dbbba3a3fe5e4643e9594143e0000803f00008040bae3103f000010c1d077013e65be7c3ff46bc53db6b5353fe1e0603e9190103e0000803f0000a0400a36e03e000010c1d077013e65be7c3ff46bc53db0af2f3fd9d8583e8d8c0c3e0000803f000080409de2293f000020c1c71dcd3dc3c47c3f4d49fb3dbbba3a3fe5e4643e9594143e0000803f0000a0400a36e03e000010c1c71dcd3dc3c47c3f4d49fb3db0af2f3fd9d8583e8d8c0c3e0000803f0000a040fbea0f3f000020c1c71dcd3dc3c47c3f4d49fb3db6b5353fdddc5c3e9190103e0000803f0000a040fbea0f3f000020c1c3a62d3ecf5d7a3ff5e5f83db6b5353fdddc5c3e9190103e0000803f0000a0400a36e03e000010c1c3a62d3ecf5d7a3ff5e5f83db0af2f3fd9d8583e8d8c0c3e0000803f0000c040846e873e000010c1c3a62d3ecf5d7a3ff5e5f83da7a6263fcdcc4c3e8584043e0000803f0000a040fbea0f3f000020c1c09e4e3e07b5793f0c64b53db6b5353fdddc5c3e9190103e0000803f0000c040846e873e000010c1c09e4e3e07b5793f0c64b53da7a6263fcdcc4c3e8584043e0000803f0000c04016ecb53e000020c1c09e4e3e07b5793f0c64b53dabaa2a3fd1d0503e8988083e0000803f0000c04016ecb53e000020c1146a75bc2aec7e3fe92db93dabaa2a3fd1d0503e8988083e0000803f0000c040846e873e000010c1146a75bc2aec7e3fe92db93da7a6263fcdcc4c3e8584043e0000803f0000e04021228f3e000010c1146a75bc2aec7e3fe92db93da8a7273fcdcc4c3e8584043e0000803f0000c04016ecb53e000020c1ee560b3d37a17f3fd6852a3dabaa2a3fd1d0503e8988083e0000803f0000e04021228f3e000010c1ee560b3d37a17f3fd6852a3da8a7273fcdcc4c3e8584043e0000803f0000e040c37aa43e000020c1ee560b3d37a17f3fd6852a3daaa9293fd1d0503e8988083e0000803f0000e040c37aa43e000020c1b1f81ebe3ead7c3f8d8d283daaa9293fd1d0503e8988083e0000803f0000e04021228f3e000010c1b1f81ebe3ead7c3f8d8d283da8a7273fcdcc4c3e8584043e0000803f000000411aaadf3e000010c1b1f81ebe3ead7c3f8d8d283db0af2f3fd5d4543e8d8c0c3e0000803f0000e040c37aa43e000020c1d48216bec4147d3fa0f6053daaa9293fd1d0503e8988083e0000803f000000411aaadf3e000010c1d48216bec4147d3fa0f6053db0af2f3fd5d4543e8d8c0c3e0000803f000000415f9af03e000020c1d48216bec4147d3fa0f6053db1b0303fd9d8583e8d8c0c3e0000803f000000415f9af03e000020c10a21e6bd553d7e3f9b93063db1b0303fd9d8583e8d8c0c3e0000803f000000411aaadf3e000010c10a21e6bd553d7e3f9b93063db0af2f3fd5d4543e8d8c0c3e0000803f000010412ccc0c3f000010c10a21e6bd553d7e3f9b93063db5b4343fdddc5c3e9190103e0000803f000000415f9af03e000020c1186285bdb66d7f3fcbc071bcb1b0303fd9d8583e8d8c0c3e0000803f000010412ccc0c3f000010c1186285bdb66d7f3fcbc071bcb5b4343fdddc5c3e9190103e0000803f00001041ff02093f000020c1186285bdb66d7f3fcbc071bcb5b4343fdddc5c3e9190103e0000803f00001041ff02093f000020c18e836f3db4887f3f57da71bcb5b4343fdddc5c3e9190103e0000803f000010412ccc0c3f000010c18e836f3db4887f3f57da71bcb5b4343fdddc5c3e9190103e0000803f00002041ec99fb3e000010c18e836f3db4887f3f57da71bcb2b1313fd9d8583e8d8c0c3e0000803f00001041ff02093f000020c1ab5f213e87177b3f42c7eabdb5b4343fdddc5c3e9190103e0000803f00002041ec99fb3e000010c1ab5f213e87177b3f42c7eabdb2b1313fd9d8583e8d8c0c3e0000803f0000204166c2bf3e000020c1ab5f213e87177b3f42c7eabdacab2b3fd1d0503e8988083e0000803f000020c1ba373e3f000010c1de591d3e5e8e7c3fc87f64bdbfbe3e3fe9e8683e9998183e0000803f000020c191b14c3f000000c1de591d3e5e8e7c3fc87f64bdc2c1413fedec6c3e9998183e0000803f000010c1c7d1243f000000c1de591d3e5e8e7c3fc87f64bdbab9393fe5e4643e9594143e0000803f000020c1ba373e3f000010c16b32753ed8cb753f3fa713bebfbe3e3fe9e8683e9998183e0000803f000010c1c7d1243f000000c16b32753ed8cb753f3fa713bebab9393fe5e4643e9594143e0000803f000010c15abffc3e000010c16b32753ed8cb753f3fa713beb3b2323fd9d8583e8d8c0c3e0000803f000010c15abffc3e000010c161a0323e9247793febbe15beb3b2323fd9d8583e8d8c0c3e0000803f000010c1c7d1243f000000c161a0323e9247793febbe15bebab9393fe5e4643e9594143e0000803f000000c1f6eaed3e000000c161a0323e9247793febbe15beb1b0303fd9d8583e8d8c0c3e0000803f000010c15abffc3e000010c1c9223b3e758e783fc6561ebeb3b2323fd9d8583e8d8c0c3e0000803f000000c1f6eaed3e000000c1c9223b3e758e783fc6561ebeb1b0303fd9d8583e8d8c0c3e0000803f000000c1a0609c3e000010c1c9223b3e758e783fc6561ebea9a8283fcdcc4c3e8988083e0000803f000000c1a0609c3e000010c1acb30f3eec4f7a3f1a751fbea9a8283fcdcc4c3e8988083e0000803f000000c1f6eaed3e000000c1acb30f3eec4f7a3f1a751fbeb1b0303fd9d8583e8d8c0c3e0000803f0000e0c02a6fa43e000000c1acb30f3eec4f7a3f1a751fbeaaa9293fd1d0503e8988083e0000803f000000c1a0609c3e000010c1f78a973dde437e3f368db7bda9a8283fcdcc4c3e8988083e0000803f0000e0c02a6fa43e000000c1f78a973dde437e3f368db7bdaaa9293fd1d0503e8988083e0000803f0000e0c06a776c3e000010c1f78a973dde437e3f368db7bda5a4243fc9c8483e8584043e0000803f0000e0c06a776c3e000010c1e7f1053c9ef47e3fcf0cb8bda5a4243fc9c8483e8584043e0000803f0000e0c02a6fa43e000000c1e7f1053c9ef47e3fcf0cb8bdaaa9293fd1d0503e8988083e0000803f0000c0c0373ba03e000000c1e7f1053c9ef47e3fcf0cb8bda9a8283fd1d0503e8988083e0000803f0000e0c06a776c3e000010c12b6a0bbe9b397d3ff650613da5a4243fc9c8483e8584043e0000803f0000c0c0373ba03e000000c12b6a0bbe9b397d3ff650613da9a8283fd1d0503e8988083e0000803f0000c0c059b4bc3e000010c12b6a0bbe9b397d3ff650613dacab2b3fd1d0503e8988083e0000803f0000c0c059b4bc3e000010c196c3a2bdebcb7e3fefb6623dacab2b3fd1d0503e8988083e0000803f0000c0c0373ba03e000000c196c3a2bdebcb7e3fefb6623da9a8283fd1d0503e8988083e0000803f0000a0c0501dc93e000000c196c3a2bdebcb7e3fefb6623dadac2c3fd5d4543e8988083e0000803f0000c0c059b4bc3e000010c193ba30bee141793fff8f183eacab2b3fd1d0503e8988083e0000803f0000a0c0501dc93e000000c193ba30bee141793fff8f183eadac2c3fd5d4543e8988083e0000803f0000a0c0c8ba0b3f000010c193ba30bee141793fff8f183eb5b4343fdddc5c3e9190103e0000803f0000a0c0c8ba0b3f000010c1eb319bbc5b027d3fe0db1a3eb5b4343fdddc5c3e9190103e0000803f0000a0c0501dc93e000000c1eb319bbc5b027d3fe0db1a3eadac2c3fd5d4543e8988083e0000803f000080c0c9edd23e000000c1eb319bbc5b027d3fe0db1a3eaead2d3fd5d4543e8d8c0c3e0000803f0000a0c0c8ba0b3f000010c1da1cbdbc77d37c3f23001f3eb5b4343fdddc5c3e9190103e0000803f000080c0c9edd23e000000c1da1cbdbc77d37c3f23001f3eaead2d3fd5d4543e8d8c0c3e0000803f000080c0adb6113f000010c1da1cbdbc77d37c3f23001f3eb6b5353fe1e0603e9190103e0000803f000080c0adb6113f000010c16ed9e8bde8407b3ff8021e3eb6b5353fe1e0603e9190103e0000803f000080c0c9edd23e000000c16ed9e8bde8407b3ff8021e3eaead2d3fd5d4543e8d8c0c3e0000803f000040c0d51e073f000000c16ed9e8bde8407b3ff8021e3eb4b3333fdddc5c3e9190103e0000803f000080c0adb6113f000010c1999a39bdd1c67e3f6024b13db6b5353fe1e0603e9190103e0000803f000040c0d51e073f000000c1999a39bdd1c67e3f6024b13db4b3333fdddc5c3e9190103e0000803f000040c0995e1d3f000010c1999a39bdd1c67e3f6024b13db9b8383fe1e0603e9594143e0000803f000040c0995e1d3f000010c10b040dbed69b7c3f81a2af3db9b8383fe1e0603e9594143e0000803f000040c0d51e073f000000c10b040dbed69b7c3f81a2af3db4b3333fdddc5c3e9190103e0000803f000000c001d92a3f000000c10b040dbed69b7c3f81a2af3dbbba3a3fe5e4643e9594143e0000803f000040c0995e1d3f000010c135a92a3bf59b7f3fcdfc61bdb9b8383fe1e0603e9594143e0000803f000000c001d92a3f000000c135a92a3bf59b7f3fcdfc61bdbbba3a3fe5e4643e9594143e0000803f000000c0adb31c3f000010c135a92a3bf59b7f3fcdfc61bdb9b8383fe1e0603e9594143e0000803f000000c0adb31c3f000010c10999203ddc697f3f82d061bdb9b8383fe1e0603e9594143e0000803f000000c001d92a3f000000c10999203ddc697f3f82d061bdbbba3a3fe5e4643e9594143e0000803f000080bf8ac9203f000000c10999203ddc697f3f82d061bdb9b8383fe5e4643e9594143e0000803f000000c0adb31c3f000010c14b70093e34c47a3f397219beb9b8383fe1e0603e9594143e0000803f000080bf8ac9203f000000c14b70093e34c47a3f397219beb9b8383fe5e4643e9594143e0000803f000080bf0d40f33e000010c14b70093e34c47a3f397219beb2b1313fd9d8583e8d8c0c3e0000803f000080bf0d40f33e000010c1f5ea1e3e79fd793f9ef818beb2b1313fd9d8583e8d8c0c3e0000803f000080bf8ac9203f000000c1f5ea1e3e79fd793f9ef818beb9b8383fe5e4643e9594143e0000803f000000009534f03e000000c1f5ea1e3e79fd793f9ef818beb1b0303fd9d8583e8d8c0c3e0000803f000080bf0d40f33e000010c1d84e293e9626793f9d6123beb2b1313fd9d8583e8d8c0c3e0000803f000000009534f03e000000c1d84e293e9626793f9d6123beb1b0303fd9d8583e8d8c0c3e0000803f00000000df449c3e000010c1d84e293e9626793f9d6123bea9a8283fcdcc4c3e8988083e0000803f00000000df449c3e000010c123a50f3e39217a3ff80524bea9a8283fcdcc4c3e8988083e0000803f000000009534f03e000000c123a50f3e39217a3ff80524beb1b0303fd9d8583e8d8c0c3e0000803f0000803f81b2a63e000000c123a50f3e39217a3ff80524beaaa9293fd1d0503e8988083e0000803f00000000df449c3e000010c16fe3a23d93e87d3fb942ccbda9a8283fcdcc4c3e8988083e0000803f0000803f81b2a63e000000c16fe3a23d93e87d3fb942ccbdaaa9293fd1d0503e8988083e0000803f0000803f486c663e000010c16fe3a23d93e87d3fb942ccbda5a4243fc9c8483e8584043e0000803f0000803f486c663e000010c1433c283cb4b37e3f21e6ccbda5a4243fc9c8483e8584043e0000803f0000803f81b2a63e000000c1433c283cb4b37e3f21e6ccbdaaa9293fd1d0503e8988083e0000803f00000040c369a13e000000c1433c283cb4b37e3f21e6ccbda9a8283fd1d0503e8988083e0000803f0000803f486c663e000010c1961b06be5e927d3fe3522a3da5a4243fc9c8483e8584043e0000803f00000040c369a13e000000c1961b06be5e927d3fe3522a3da9a8283fd1d0503e8988083e0000803f0000004051e8b63e000010c1961b06be5e927d3fe3522a3dacab2b3fd1d0503e8988083e0000803f0000004051e8b63e000010c1fdbb9ebd5a017f3f64492b3dacab2b3fd1d0503e8988083e0000803f00000040c369a13e000000c1fdbb9ebd5a017f3f64492b3da9a8283fd1d0503e8988083e0000803f000040406340c93e000000c1fdbb9ebd5a017f3f64492b3dadac2c3fd5d4543e8988083e0000803f0000004051e8b63e000010c1047c35be5f4c793fbfc1113eacab2b3fd1d0503e8988083e0000803f000040406340c93e000000c1047c35be5f4c793fbfc1113eadac2c3fd5d4543e8988083e0000803f00004040660b0a3f000010c1047c35be5f4c793fbfc1113eb5b4343fdddc5c3e9190103e0000803f00004040660b0a3f000010c1bd1f44bc4c4a7d3f3c17143eb5b4343fdddc5c3e9190103e0000803f000040406340c93e000000c1bd1f44bc4c4a7d3f3c17143eadac2c3fd5d4543e8988083e0000803f000080402a72cf3e000000c1bd1f44bc4c4a7d3f3c17143eaead2d3fd5d4543e8d8c0c3e0000803f00004040660b0a3f000010c1f82fd8bc35aa7c3f6585223eb5b4343fdddc5c3e9190103e0000803f000080402a72cf3e000000c1f82fd8bc35aa7c3f6585223eaead2d3fd5d4543e8d8c0c3e0000803f00008040bae3103f000010c1f82fd8bc35aa7c3f6585223eb6b5353fe1e0603e9190103e0000803f00008040bae3103f000010c1a292873dd1327c3f9a38223eb6b5353fe1e0603e9190103e0000803f000080402a72cf3e000000c1a292873dd1327c3f9a38223eaead2d3fd5d4543e8d8c0c3e0000803f0000a040b80aad3e000000c1a292873dd1327c3f9a38223eabaa2a3fd1d0503e8988083e0000803f00008040bae3103f000010c17970013e0fb07c3f5607ca3db6b5353fe1e0603e9190103e0000803f0000a040b80aad3e000000c17970013e0fb07c3f5607ca3dabaa2a3fd1d0503e8988083e0000803f0000a0400a36e03e000010c17970013e0fb07c3f5607ca3db0af2f3fd9d8583e8d8c0c3e0000803f0000a0400a36e03e000010c1efde113dc7917e3f7b88cb3db0af2f3fd9d8583e8d8c0c3e0000803f0000a040b80aad3e000000c1efde113dc7917e3f7b88cb3dabaa2a3fd1d0503e8988083e0000803f0000c0409fb49a3e000000c1efde113dc7917e3f7b88cb3da9a8283fcdcc4c3e8988083e0000803f0000a0400a36e03e000010c1f7d32e3e14107c3fc4d117bdb0af2f3fd9d8583e8d8c0c3e0000803f0000c0409fb49a3e000000c1f7d32e3e14107c3fc4d117bda9a8283fcdcc4c3e8988083e0000803f0000c040846e873e000010c1f7d32e3e14107c3fc4d117bda7a6263fcdcc4c3e8584043e0000803f0000c040846e873e000010c1dd2de2bd02417e3f9e2319bda7a6263fcdcc4c3e8584043e0000803f0000c0409fb49a3e000000c1dd2de2bd02417e3f9e2319bda9a8283fcdcc4c3e8988083e0000803f0000e0407fa3d33e000000c1dd2de2bd02417e3f9e2319bdaead2d3fd5d4543e8d8c0c3e0000803f0000c040846e873e000010c1683f74bcecb57d3f11c907bea7a6263fcdcc4c3e8584043e0000803f0000e0407fa3d33e000000c1683f74bcecb57d3f11c907beaead2d3fd5d4543e8d8c0c3e0000803f0000e04021228f3e000010c1683f74bcecb57d3f11c907bea8a7273fcdcc4c3e8584043e0000803f0000e04021228f3e000010c1207a26bef55c7a3f6cfe05bea8a7273fcdcc4c3e8584043e0000803f0000e0407fa3d33e000000c1207a26bef55c7a3f6cfe05beaead2d3fd5d4543e8d8c0c3e0000803f000000412a60143f000000c1207a26bef55c7a3f6cfe05beb7b6363fe1e0603e9190103e0000803f0000e04021228f3e000010c12b8c1dbeda697a3fdafb0ebea8a7273fcdcc4c3e8584043e0000803f000000412a60143f000000c12b8c1dbeda697a3fdafb0ebeb7b6363fe1e0603e9190103e0000803f000000411aaadf3e000010c12b8c1dbeda697a3fdafb0ebeb0af2f3fd5d4543e8d8c0c3e0000803f000000411aaadf3e000010c112a5f2bd5ba57b3f00b00fbeb0af2f3fd5d4543e8d8c0c3e0000803f000000412a60143f000000c112a5f2bd5ba57b3f00b00fbeb7b6363fe1e0603e9190103e0000803f00001041253b333f000000c112a5f2bd5ba57b3f00b00fbebdbc3c3fe9e8683e9594143e0000803f000000411aaadf3e000010c1b8bbe3bdc2977b3f5b1617beb0af2f3fd5d4543e8d8c0c3e0000803f00001041253b333f000000c1b8bbe3bdc2977b3f5b1617bebdbc3c3fe9e8683e9594143e0000803f000010412ccc0c3f000010c1b8bbe3bdc2977b3f5b1617beb5b4343fdddc5c3e9190103e0000803f000010412ccc0c3f000010c1771e1d3dfef97c3f15eb17beb5b4343fdddc5c3e9190103e0000803f00001041253b333f000000c1771e1d3dfef97c3f15eb17bebdbc3c3fe9e8683e9594143e0000803f00002041324b293f000000c1771e1d3dfef97c3f15eb17bebbba3a3fe5e4643e9594143e0000803f000010412ccc0c3f000010c1d82a6c3db0f67b3fb83a2bbeb5b4343fdddc5c3e9190103e0000803f00002041324b293f000000c1d82a6c3db0f67b3fb83a2bbebbba3a3fe5e4643e9594143e0000803f00002041ec99fb3e000010c1d82a6c3db0f67b3fb83a2bbeb2b1313fd9d8583e8d8c0c3e0000803f000020c191b14c3f000000c1d1f0c23d404e7e3fe8a8833dc2c1413fedec6c3e9998183e0000803f000020c162203c3f0000e0c0d1f0c23d404e7e3fe8a8833dbfbe3e3fe9e8683e9998183e0000803f000010c1b898233f0000e0c0d1f0c23d404e7e3fe8a8833dbab9393fe5e4643e9594143e0000803f000020c191b14c3f000000c13e981d3e7bf27c3fa5a99a3bc2c1413fedec6c3e9998183e0000803f000010c1b898233f0000e0c03e981d3e7bf27c3fa5a99a3bbab9393fe5e4643e9594143e0000803f000010c1c7d1243f000000c13e981d3e7bf27c3fa5a99a3bbab9393fe5e4643e9594143e0000803f000010c1c7d1243f000000c111190d3e218e7d3fd1089b3bbab9393fe5e4643e9594143e0000803f000010c1b898233f0000e0c011190d3e218e7d3fd1089b3bbab9393fe5e4643e9594143e0000803f000000c1c3f6ff3e0000e0c011190d3e218e7d3fd1089b3bb3b2323fd9d8583e8d8c0c3e0000803f000010c1c7d1243f000000c18575343e46d67b3f66050ebdbab9393fe5e4643e9594143e0000803f000000c1c3f6ff3e0000e0c08575343e46d67b3f66050ebdb3b2323fd9d8583e8d8c0c3e0000803f000000c1f6eaed3e000000c18575343e46d67b3f66050ebdb1b0303fd9d8583e8d8c0c3e0000803f000000c1f6eaed3e000000c1bc11013efbcc7d3fe6200fbdb1b0303fd9d8583e8d8c0c3e0000803f000000c1c3f6ff3e0000e0c0bc11013efbcc7d3fe6200fbdb3b2323fd9d8583e8d8c0c3e0000803f0000e0c0bcdebe3e0000e0c0bc11013efbcc7d3fe6200fbdacab2b3fd1d0503e8988083e0000803f000000c1f6eaed3e000000c16f49113eb6127d3f901151bdb1b0303fd9d8583e8d8c0c3e0000803f0000e0c0bcdebe3e0000e0c06f49113eb6127d3f901151bdacab2b3fd1d0503e8988083e0000803f0000e0c02a6fa43e000000c16f49113eb6127d3f901151bdaaa9293fd1d0503e8988083e0000803f0000e0c02a6fa43e000000c101401b3dcb797f3fb10d53bdaaa9293fd1d0503e8988083e0000803f0000e0c0bcdebe3e0000e0c001401b3dcb797f3fb10d53bdacab2b3fd1d0503e8988083e0000803f0000c0c08a6cab3e0000e0c001401b3dcb797f3fb10d53bdaaa9293fd1d0503e8988083e0000803f0000e0c02a6fa43e000000c1fe74063c23ee7f3fb108b3bcaaa9293fd1d0503e8988083e0000803f0000c0c08a6cab3e0000e0c0fe74063c23ee7f3fb108b3bcaaa9293fd1d0503e8988083e0000803f0000c0c0373ba03e000000c1fe74063c23ee7f3fb108b3bca9a8283fd1d0503e8988083e0000803f0000c0c0373ba03e000000c1d94026bd5bba7f3f78e4b2bca9a8283fd1d0503e8988083e0000803f0000c0c08a6cab3e0000e0c0d94026bd5bba7f3f78e4b2bcaaa9293fd1d0503e8988083e0000803f0000a0c04e3ac03e0000e0c0d94026bd5bba7f3f78e4b2bcadac2c3fd5d4543e8988083e0000803f0000c0c0373ba03e000000c151fda2bd4a267f3f34b78d3ca9a8283fd1d0503e8988083e0000803f0000a0c04e3ac03e0000e0c051fda2bd4a267f3f34b78d3cadac2c3fd5d4543e8988083e0000803f0000a0c0501dc93e000000c151fda2bd4a267f3f34b78d3cadac2c3fd5d4543e8988083e0000803f0000a0c0501dc93e000000c16f4051bcc9f07f3fad278e3cadac2c3fd5d4543e8988083e0000803f0000a0c04e3ac03e0000e0c06f4051bcc9f07f3fad278e3cadac2c3fd5d4543e8988083e0000803f000080c0b5c4c63e0000e0c06f4051bcc9f07f3fad278e3cadac2c3fd5d4543e8988083e0000803f0000a0c0501dc93e000000c1daf49cbc80e17f3f117ac23cadac2c3fd5d4543e8988083e0000803f000080c0b5c4c63e0000e0c0daf49cbc80e17f3f117ac23cadac2c3fd5d4543e8988083e0000803f000080c0c9edd23e000000c1daf49cbc80e17f3f117ac23caead2d3fd5d4543e8d8c0c3e0000803f000080c0c9edd23e000000c13e71d6bd5f857e3f7b71c13caead2d3fd5d4543e8d8c0c3e0000803f000080c0b5c4c63e0000e0c03e71d6bd5f857e3f7b71c13cadac2c3fd5d4543e8988083e0000803f000040c0c5b0fc3e0000e0c03e71d6bd5f857e3f7b71c13cb3b2323fd9d8583e8d8c0c3e0000803f000080c0c9edd23e000000c11989ebbdef267e3fb4630b3daead2d3fd5d4543e8d8c0c3e0000803f000040c0c5b0fc3e0000e0c01989ebbdef267e3fb4630b3db3b2323fd9d8583e8d8c0c3e0000803f000040c0d51e073f000000c11989ebbdef267e3fb4630b3db4b3333fdddc5c3e9190103e0000803f000040c0d51e073f000000c158c225beb7797c3f4c780a3db4b3333fdddc5c3e9190103e0000803f000040c0c5b0fc3e0000e0c058c225beb7797c3f4c780a3db3b2323fd9d8583e8d8c0c3e0000803f000000c0115d283f0000e0c058c225beb7797c3f4c780a3dbbba3a3fe5e4643e9594143e0000803f000040c0d51e073f000000c1dc870dbef6877d3f7b731d3cb4b3333fdddc5c3e9190103e0000803f000000c0115d283f0000e0c0dc870dbef6877d3f7b731d3cbbba3a3fe5e4643e9594143e0000803f000000c001d92a3f000000c1dc870dbef6877d3f7b731d3cbbba3a3fe5e4643e9594143e0000803f000000c001d92a3f000000c13f6a18bd87cf7f3fe6dd1e3cbbba3a3fe5e4643e9594143e0000803f000000c0115d283f0000e0c03f6a18bd87cf7f3fe6dd1e3cbbba3a3fe5e4643e9594143e0000803f000080bf83e5313f0000e0c03f6a18bd87cf7f3fe6dd1e3cbdbc3c3fe9e8683e9594143e0000803f000000c001d92a3f000000c1257c203deb3b7f3ff17688bdbbba3a3fe5e4643e9594143e0000803f000080bf83e5313f0000e0c0257c203deb3b7f3ff17688bdbdbc3c3fe9e8683e9594143e0000803f000080bf8ac9203f000000c1257c203deb3b7f3ff17688bdb9b8383fe5e4643e9594143e0000803f000080bf8ac9203f000000c115e7aa3d0d8a7e3fd81788bdb9b8383fe5e4643e9594143e0000803f000080bf83e5313f0000e0c015e7aa3d0d8a7e3fd81788bdbdbc3c3fe9e8683e9594143e0000803f000000003e691c3f0000e0c015e7aa3d0d8a7e3fd81788bdb9b8383fe1e0603e9594143e0000803f000080bf8ac9203f000000c1da2a1f3efd617a3ffe0b0ebeb9b8383fe5e4643e9594143e0000803f000000003e691c3f0000e0c0da2a1f3efd617a3ffe0b0ebeb9b8383fe1e0603e9594143e0000803f000000009534f03e000000c1da2a1f3efd617a3ffe0b0ebeb1b0303fd9d8583e8d8c0c3e0000803f000000009534f03e000000c13870f33d9aaa7b3f6cc60ebeb1b0303fd9d8583e8d8c0c3e0000803f000000003e691c3f0000e0c03870f33d9aaa7b3f6cc60ebeb9b8383fe1e0603e9594143e0000803f0000803f26eafa3e0000e0c03870f33d9aaa7b3f6cc60ebeb2b1313fd9d8583e8d8c0c3e0000803f000000009534f03e000000c1faa10f3eb81b7a3feb8e24beb1b0303fd9d8583e8d8c0c3e0000803f0000803f26eafa3e0000e0c0faa10f3eb81b7a3feb8e24beb2b1313fd9d8583e8d8c0c3e0000803f0000803f81b2a63e000000c1faa10f3eb81b7a3feb8e24beaaa9293fd1d0503e8988083e0000803f0000803f81b2a63e000000c19f07b83d6b957b3f6d8725beaaa9293fd1d0503e8988083e0000803f0000803f26eafa3e0000e0c09f07b83d6b957b3f6d8725beb2b1313fd9d8583e8d8c0c3e0000803f000000407e19cc3e0000e0c09f07b83d6b957b3f6d8725beaead2d3fd5d4543e8988083e0000803f0000803f81b2a63e000000c1ce7f283cf5197f3f7d25aabdaaa9293fd1d0503e8988083e0000803f000000407e19cc3e0000e0c0ce7f283cf5197f3f7d25aabdaead2d3fd5d4543e8988083e0000803f00000040c369a13e000000c1ce7f283cf5197f3f7d25aabda9a8283fd1d0503e8988083e0000803f00000040c369a13e000000c14c467e3c8d157f3f8d22aabda9a8283fd1d0503e8988083e0000803f000000407e19cc3e0000e0c04c467e3c8d157f3f8d22aabdaead2d3fd5d4543e8988083e0000803f00004040fe1fc43e0000e0c04c467e3c8d157f3f8d22aabdadac2c3fd5d4543e8988083e0000803f00000040c369a13e000000c18bdd9ebd42377f3ffc8b233ca9a8283fd1d0503e8988083e0000803f00004040fe1fc43e0000e0c08bdd9ebd42377f3ffc8b233cadac2c3fd5d4543e8988083e0000803f000040406340c93e000000c18bdd9ebd42377f3ffc8b233cadac2c3fd5d4543e8988083e0000803f000040406340c93e000000c14c5d51bab2fc7f3f820a243cadac2c3fd5d4543e8988083e0000803f00004040fe1fc43e0000e0c04c5d51bab2fc7f3f820a243cadac2c3fd5d4543e8988083e0000803f00008040ae88c43e0000e0c04c5d51bab2fc7f3f820a243cadac2c3fd5d4543e8988083e0000803f000040406340c93e000000c1a42946bc54ec7f3f558aae3cadac2c3fd5d4543e8988083e0000803f00008040ae88c43e0000e0c0a42946bc54ec7f3f558aae3cadac2c3fd5d4543e8988083e0000803f000080402a72cf3e000000c1a42946bc54ec7f3f558aae3caead2d3fd5d4543e8d8c0c3e0000803f000080402a72cf3e000000c1d542913cd2e67f3f9486ae3caead2d3fd5d4543e8d8c0c3e0000803f00008040ae88c43e0000e0c0d542913cd2e67f3f9486ae3cadac2c3fd5d4543e8988083e0000803f0000a0409c73bb3e0000e0c0d542913cd2e67f3f9486ae3cacab2b3fd1d0503e8988083e0000803f000080402a72cf3e000000c1aa40893dc8527f3f3ff2e5bcaead2d3fd5d4543e8d8c0c3e0000803f0000a0409c73bb3e0000e0c0aa40893dc8527f3f3ff2e5bcacab2b3fd1d0503e8988083e0000803f0000a040b80aad3e000000c1aa40893dc8527f3f3ff2e5bcabaa2a3fd1d0503e8988083e0000803f0000a040b80aad3e000000c1a349b9bc4dd57f3fcc67e6bcabaa2a3fd1d0503e8988083e0000803f0000a0409c73bb3e0000e0c0a349b9bc4dd57f3fcc67e6bcacab2b3fd1d0503e8988083e0000803f0000c040250ac73e0000e0c0a349b9bc4dd57f3fcc67e6bcadac2c3fd5d4543e8988083e0000803f0000a040b80aad3e000000c1ff0c123d2be27e3f1790b0bdabaa2a3fd1d0503e8988083e0000803f0000c040250ac73e0000e0c0ff0c123d2be27e3f1790b0bdadac2c3fd5d4543e8988083e0000803f0000c0409fb49a3e000000c1ff0c123d2be27e3f1790b0bda9a8283fcdcc4c3e8988083e0000803f0000c0409fb49a3e000000c14253bbbdfdf97d3f41efafbda9a8283fcdcc4c3e8988083e0000803f0000c040250ac73e0000e0c04253bbbdfdf97d3f41efafbdadac2c3fd5d4543e8988083e0000803f0000e0407a3ef63e0000e0c04253bbbdfdf97d3f41efafbdb2b1313fd9d8583e8d8c0c3e0000803f0000c0409fb49a3e000000c117d4e1bd17dc7d3fa94389bda9a8283fcdcc4c3e8988083e0000803f0000e0407a3ef63e0000e0c017d4e1bd17dc7d3fa94389bdb2b1313fd9d8583e8d8c0c3e0000803f0000e0407fa3d33e000000c117d4e1bd17dc7d3fa94389bdaead2d3fd5d4543e8d8c0c3e0000803f0000e0407fa3d33e000000c18f00c7bd67357e3ff47389bdaead2d3fd5d4543e8d8c0c3e0000803f0000e0407a3ef63e0000e0c08f00c7bd67357e3ff47389bdb2b1313fd9d8583e8d8c0c3e0000803f000000412f2c143f0000e0c08f00c7bd67357e3ff47389bdb7b6363fe1e0603e9190103e0000803f0000e0407fa3d33e000000c1bceb27becf887c3f6d1b4d3aaead2d3fd5d4543e8d8c0c3e0000803f000000412f2c143f0000e0c0bceb27becf887c3f6d1b4d3ab7b6363fe1e0603e9190103e0000803f000000412a60143f000000c1bceb27becf887c3f6d1b4d3ab7b6363fe1e0603e9190103e0000803f000000412a60143f000000c1e5e0dbbd2e857e3f53b84e3ab7b6363fe1e0603e9190103e0000803f000000412f2c143f0000e0c0e5e0dbbd2e857e3f53b84e3ab7b6363fe1e0603e9190103e0000803f0000104134d12f3f0000e0c0e5e0dbbd2e857e3f53b84e3abcbb3b3fe5e4643e9594143e0000803f000000412a60143f000000c14a0cf5bd66237e3f7de5583cb7b6363fe1e0603e9190103e0000803f0000104134d12f3f0000e0c04a0cf5bd66237e3f7de5583cbcbb3b3fe5e4643e9594143e0000803f00001041253b333f000000c14a0cf5bd66237e3f7de5583cbdbc3c3fe9e8683e9594143e0000803f00001041253b333f000000c19b8682bdf2747f3f92055a3cbdbc3c3fe9e8683e9594143e0000803f0000104134d12f3f0000e0c09b8682bdf2747f3f92055a3cbcbb3b3fe5e4643e9594143e0000803f00002041e92a403f0000e0c09b8682bdf2747f3f92055a3cc0bf3f3fedec6c3e9998183e0000803f00001041253b333f000000c1683f1e3d36cb7e3fff20b6bdbdbc3c3fe9e8683e9594143e0000803f00002041e92a403f0000e0c0683f1e3d36cb7e3fff20b6bdc0bf3f3fedec6c3e9998183e0000803f00002041324b293f000000c1683f1e3d36cb7e3fff20b6bdbbba3a3fe5e4643e9594143e0000803f000020c162203c3f0000e0c07275ea3da2667b3ffa9a193ebfbe3e3fe9e8683e9998183e0000803f000020c1cc05153f0000c0c07275ea3da2667b3ffa9a193eb7b6363fe1e0603e9190103e0000803f000010c1ba5bee3e0000c0c07275ea3da2667b3ffa9a193eb1b0303fd9d8583e8d8c0c3e0000803f000020c162203c3f0000e0c0aa7ec03d6a1d7b3f7d472e3ebfbe3e3fe9e8683e9998183e0000803f000010c1ba5bee3e0000c0c0aa7ec03d6a1d7b3f7d472e3eb1b0303fd9d8583e8d8c0c3e0000803f000010c1b898233f0000e0c0aa7ec03d6a1d7b3f7d472e3ebab9393fe5e4643e9594143e0000803f000010c1b898233f0000e0c007b68d3d83a07b3f79a22e3ebab9393fe5e4643e9594143e0000803f000010c1ba5bee3e0000c0c007b68d3d83a07b3f79a22e3eb1b0303fd9d8583e8d8c0c3e0000803f000000c19a50ca3e0000c0c007b68d3d83a07b3f79a22e3eaead2d3fd5d4543e8988083e0000803f000010c1b898233f0000e0c07f580c3e14347c3fe969d33dbab9393fe5e4643e9594143e0000803f000000c19a50ca3e0000c0c07f580c3e14347c3fe969d33daead2d3fd5d4543e8988083e0000803f000000c1c3f6ff3e0000e0c07f580c3e14347c3fe969d33db3b2323fd9d8583e8d8c0c3e0000803f000000c1c3f6ff3e0000e0c0bb7d963c2a907e3f4b64d53db3b2323fd9d8583e8d8c0c3e0000803f000000c19a50ca3e0000c0c0bb7d963c2a907e3f4b64d53daead2d3fd5d4543e8988083e0000803f0000e0c027dbc03e0000c0c0bb7d963c2a907e3f4b64d53dadac2c3fd5d4543e8988083e0000803f000000c1c3f6ff3e0000e0c0ae25013e34f47d3f5e2d7cbbb3b2323fd9d8583e8d8c0c3e0000803f0000e0c027dbc03e0000c0c0ae25013e34f47d3f5e2d7cbbadac2c3fd5d4543e8988083e0000803f0000e0c0bcdebe3e0000e0c0ae25013e34f47d3f5e2d7cbbacab2b3fd1d0503e8988083e0000803f0000e0c0bcdebe3e0000e0c0b7b275bd7f897f3fd3bf7dbbacab2b3fd1d0503e8988083e0000803f0000e0c027dbc03e0000c0c0b7b275bd7f897f3fd3bf7dbbadac2c3fd5d4543e8988083e0000803f0000c0c0bc9fdf3e0000c0c0b7b275bd7f897f3fd3bf7dbbb0af2f3fd5d4543e8d8c0c3e0000803f0000e0c0bcdebe3e0000e0c0eda71a3d897f7e3f3493cfbdacab2b3fd1d0503e8988083e0000803f0000c0c0bc9fdf3e0000c0c0eda71a3d897f7e3f3493cfbdb0af2f3fd5d4543e8d8c0c3e0000803f0000c0c08a6cab3e0000e0c0eda71a3d897f7e3f3493cfbdaaa9293fd1d0503e8988083e0000803f0000c0c08a6cab3e0000e0c065b78ebd880f7e3fd937cfbdaaa9293fd1d0503e8988083e0000803f0000c0c0bc9fdf3e0000c0c065b78ebd880f7e3fd937cfbdb0af2f3fd5d4543e8d8c0c3e0000803f0000a0c0a7c9013f0000c0c065b78ebd880f7e3fd937cfbdb3b2323fdddc5c3e9190103e0000803f0000c0c08a6cab3e0000e0c003e024bda19b7d3fcc6f05beaaa9293fd1d0503e8988083e0000803f0000a0c0a7c9013f0000c0c003e024bda19b7d3fcc6f05beb3b2323fdddc5c3e9190103e0000803f0000a0c04e3ac03e0000e0c003e024bda19b7d3fcc6f05beadac2c3fd5d4543e8988083e0000803f0000a0c04e3ac03e0000e0c0d58d14bc9ecd7d3f1a8a05beadac2c3fd5d4543e8988083e0000803f0000a0c0a7c9013f0000c0c0d58d14bc9ecd7d3f1a8a05beb3b2323fdddc5c3e9190103e0000803f000080c00321043f0000c0c0d58d14bc9ecd7d3f1a8a05beb4b3333fdddc5c3e9190103e0000803f0000a0c04e3ac03e0000e0c09a974fbc29e97d3ffde801beadac2c3fd5d4543e8988083e0000803f000080c00321043f0000c0c09a974fbc29e97d3ffde801beb4b3333fdddc5c3e9190103e0000803f000080c0b5c4c63e0000e0c09a974fbc29e97d3ffde801beadac2c3fd5d4543e8988083e0000803f000080c0b5c4c63e0000e0c0e82b673ce8e77d3f59e801beadac2c3fd5d4543e8988083e0000803f000080c00321043f0000c0c0e82b673ce8e77d3f59e801beb4b3333fdddc5c3e9190103e0000803f000040c0b37c003f0000c0c0e82b673ce8e77d3f59e801beb3b2323fdddc5c3e9190103e0000803f000080c0b5c4c63e0000e0c0a87ed6bd4b957e3fe85108bcadac2c3fd5d4543e8988083e0000803f000040c0b37c003f0000c0c0a87ed6bd4b957e3fe85108bcb3b2323fdddc5c3e9190103e0000803f000040c0c5b0fc3e0000e0c0a87ed6bd4b957e3fe85108bcb3b2323fd9d8583e8d8c0c3e0000803f000040c0c5b0fc3e0000e0c017fbcebb66fc7f3f321209bcb3b2323fd9d8583e8d8c0c3e0000803f000040c0b37c003f0000c0c017fbcebb66fc7f3f321209bcb3b2323fdddc5c3e9190103e0000803f000000c0af1a023f0000c0c017fbcebb66fc7f3f321209bcb3b2323fdddc5c3e9190103e0000803f000040c0c5b0fc3e0000e0c0481424beaaea793f8e66153eb3b2323fd9d8583e8d8c0c3e0000803f000000c0af1a023f0000c0c0481424beaaea793f8e66153eb3b2323fdddc5c3e9190103e0000803f000000c0115d283f0000e0c0481424beaaea793f8e66153ebbba3a3fe5e4643e9594143e0000803f000000c0115d283f0000e0c0ef604dbd9ede7c3f762a173ebbba3a3fe5e4643e9594143e0000803f000000c0af1a023f0000c0c0ef604dbd9ede7c3f762a173eb3b2323fdddc5c3e9190103e0000803f000080bf6c190f3f0000c0c0ef604dbd9ede7c3f762a173eb6b5353fdddc5c3e9190103e0000803f000000c0115d283f0000e0c0040917bdad7e7d3fabd3093ebbba3a3fe5e4643e9594143e0000803f000080bf6c190f3f0000c0c0040917bdad7e7d3fabd3093eb6b5353fdddc5c3e9190103e0000803f000080bf83e5313f0000e0c0040917bdad7e7d3fabd3093ebdbc3c3fe9e8683e9594143e0000803f000080bf83e5313f0000e0c0d88e69bd2e417d3f3bb2093ebdbc3c3fe9e8683e9594143e0000803f000080bf6c190f3f0000c0c0d88e69bd2e417d3f3bb2093eb6b5353fdddc5c3e9190103e0000803f00000000dcda1d3f0000c0c0d88e69bd2e417d3f3bb2093eb9b8383fe1e0603e9594143e0000803f000080bf83e5313f0000e0c04e47ab3d5f197f3f8128b8bbbdbc3c3fe9e8683e9594143e0000803f00000000dcda1d3f0000c0c04e47ab3d5f197f3f8128b8bbb9b8383fe1e0603e9594143e0000803f000000003e691c3f0000e0c04e47ab3d5f197f3f8128b8bbb9b8383fe1e0603e9594143e0000803f000000003e691c3f0000e0c0abf0c1bc97ec7f3ffdc0b8bbb9b8383fe1e0603e9594143e0000803f00000000dcda1d3f0000c0c0abf0c1bc97ec7f3ffdc0b8bbb9b8383fe1e0603e9594143e0000803f0000803fd7ea233f0000c0c0abf0c1bc97ec7f3ffdc0b8bbbab9393fe5e4643e9594143e0000803f000000003e691c3f0000e0c06d26f33d515e7b3f8a0e17beb9b8383fe1e0603e9594143e0000803f0000803fd7ea233f0000c0c06d26f33d515e7b3f8a0e17bebab9393fe5e4643e9594143e0000803f0000803f26eafa3e0000e0c06d26f33d515e7b3f8a0e17beb2b1313fd9d8583e8d8c0c3e0000803f0000803f26eafa3e0000e0c050da4b3d64d87c3fbdf117beb2b1313fd9d8583e8d8c0c3e0000803f0000803fd7ea233f0000c0c050da4b3d64d87c3fbdf117bebab9393fe5e4643e9594143e0000803f000000408004173f0000c0c050da4b3d64d87c3fbdf117beb8b7373fe1e0603e9190103e0000803f0000803f26eafa3e0000e0c04030b73dfd6e7a3fb59c3fbeb2b1313fd9d8583e8d8c0c3e0000803f000000408004173f0000c0c04030b73dfd6e7a3fb59c3fbeb8b7373fe1e0603e9190103e0000803f000000407e19cc3e0000e0c04030b73dfd6e7a3fb59c3fbeaead2d3fd5d4543e8988083e0000803f000000407e19cc3e0000e0c03946803da0f27a3f6d0140beaead2d3fd5d4543e8988083e0000803f000000408004173f0000c0c03946803da0f27a3f6d0140beb8b7373fe1e0603e9190103e0000803f0000404015a9063f0000c0c03946803da0f27a3f6d0140beb4b3333fdddc5c3e9190103e0000803f000000407e19cc3e0000e0c0cc967c3cad647d3fbde610beaead2d3fd5d4543e8988083e0000803f0000404015a9063f0000c0c0cc967c3cad647d3fbde610beb4b3333fdddc5c3e9190103e0000803f00004040fe1fc43e0000e0c0cc967c3cad647d3fbde610beadac2c3fd5d4543e8988083e0000803f00004040fe1fc43e0000e0c00f840b3c096a7d3fcee910beadac2c3fd5d4543e8988083e0000803f0000404015a9063f0000c0c00f840b3c096a7d3fcee910beb4b3333fdddc5c3e9190103e0000803f000080405375043f0000c0c00f840b3c096a7d3fcee910beb4b3333fdddc5c3e9190103e0000803f00004040fe1fc43e0000e0c038884fba29bf7d3fc48f07beadac2c3fd5d4543e8988083e0000803f000080405375043f0000c0c038884fba29bf7d3fc48f07beb4b3333fdddc5c3e9190103e0000803f00008040ae88c43e0000e0c038884fba29bf7d3fc48f07beadac2c3fd5d4543e8988083e0000803f00008040ae88c43e0000e0c0be971bbc41bc7d3f378e07beadac2c3fd5d4543e8988083e0000803f000080405375043f0000c0c0be971bbc41bc7d3f378e07beb4b3333fdddc5c3e9190103e0000803f0000a04040e9063f0000c0c0be971bbc41bc7d3f378e07beb4b3333fdddc5c3e9190103e0000803f00008040ae88c43e0000e0c037738f3c15b67c3ffd9f22beadac2c3fd5d4543e8988083e0000803f0000a04040e9063f0000c0c037738f3c15b67c3ffd9f22beb4b3333fdddc5c3e9190103e0000803f0000a0409c73bb3e0000e0c037738f3c15b67c3ffd9f22beacab2b3fd1d0503e8988083e0000803f0000a0409c73bb3e0000e0c06e2f833cb4b77c3f08a122beacab2b3fd1d0503e8988083e0000803f0000a04040e9063f0000c0c06e2f833cb4b77c3f08a122beb4b3333fdddc5c3e9190103e0000803f0000c04023c2023f0000c0c06e2f833cb4b77c3f08a122beb3b2323fdddc5c3e9190103e0000803f0000a0409c73bb3e0000e0c032ffb7bc0c0d7e3f6f01f8bdacab2b3fd1d0503e8988083e0000803f0000c04023c2023f0000c0c032ffb7bc0c0d7e3f6f01f8bdb3b2323fdddc5c3e9190103e0000803f0000c040250ac73e0000e0c032ffb7bc0c0d7e3f6f01f8bdadac2c3fd5d4543e8988083e0000803f0000c040250ac73e0000e0c0d2ea693d4ab37d3fd0a9f7bdadac2c3fd5d4543e8988083e0000803f0000c04023c2023f0000c0c0d2ea693d4ab37d3fd0a9f7bdb3b2323fdddc5c3e9190103e0000803f0000e0401203e83e0000c0c0d2ea693d4ab37d3fd0a9f7bdb1b0303fd9d8583e8d8c0c3e0000803f0000c040250ac73e0000e0c0c4f2bbbd3fd27e3f17aae23cadac2c3fd5d4543e8988083e0000803f0000e0401203e83e0000c0c0c4f2bbbd3fd27e3f17aae23cb1b0303fd9d8583e8d8c0c3e0000803f0000e0407a3ef63e0000e0c0c4f2bbbd3fd27e3f17aae23cb2b1313fd9d8583e8d8c0c3e0000803f0000e0407a3ef63e0000e0c0c32b683d5f7d7f3f4e42e33cb2b1313fd9d8583e8d8c0c3e0000803f0000e0401203e83e0000c0c0c32b683d5f7d7f3f4e42e33cb1b0303fd9d8583e8d8c0c3e0000803f00000041c3eeca3e0000c0c0c32b683d5f7d7f3f4e42e33caead2d3fd5d4543e8988083e0000803f0000e0407a3ef63e0000e0c0343ec4bd18af7a3f0bf2363eb2b1313fd9d8583e8d8c0c3e0000803f00000041c3eeca3e0000c0c0343ec4bd18af7a3f0bf2363eaead2d3fd5d4543e8988083e0000803f000000412f2c143f0000e0c0343ec4bd18af7a3f0bf2363eb7b6363fe1e0603e9190103e0000803f000000412f2c143f0000e0c0327611bd17af7b3fddac373eb7b6363fe1e0603e9190103e0000803f00000041c3eeca3e0000c0c0327611bd17af7b3fddac373eaead2d3fd5d4543e8988083e0000803f000010415c6ddd3e0000c0c0327611bd17af7b3fddac373eafae2e3fd5d4543e8d8c0c3e0000803f000000412f2c143f0000e0c0962bd5bd50c1763f98027b3eb7b6363fe1e0603e9190103e0000803f000010415c6ddd3e0000c0c0962bd5bd50c1763f98027b3eafae2e3fd5d4543e8d8c0c3e0000803f0000104134d12f3f0000e0c0962bd5bd50c1763f98027b3ebcbb3b3fe5e4643e9594143e0000803f0000104134d12f3f0000e0c0ce012ebe957e743fe3b5783ebcbb3b3fe5e4643e9594143e0000803f000010415c6ddd3e0000c0c0ce012ebe957e743fe3b5783eafae2e3fd5d4543e8d8c0c3e0000803f0000204132431c3f0000c0c0ce012ebe957e743fe3b5783eb9b8383fe1e0603e9594143e0000803f0000104134d12f3f0000e0c0f44681bd57037d3fdff10d3ebcbb3b3fe5e4643e9594143e0000803f0000204132431c3f0000c0c0f44681bd57037d3fdff10d3eb9b8383fe1e0603e9594143e0000803f00002041e92a403f0000e0c0f44681bd57037d3fdff10d3ec0bf3f3fedec6c3e9998183e0000803f000020c1cc05153f0000c0c09a420d3e0c5d7d3fda9c1c3db7b6363fe1e0603e9190103e0000803f000020c1eb210b3f0000a0c09a420d3e0c5d7d3fda9c1c3db5b4343fdddc5c3e9190103e0000803f000010c161e6ce3e0000a0c09a420d3e0c5d7d3fda9c1c3daead2d3fd5d4543e8d8c0c3e0000803f000020c1cc05153f0000c0c09cb3ec3d49ce7d3f9382793db7b6363fe1e0603e9190103e0000803f000010c161e6ce3e0000a0c09cb3ec3d49ce7d3f9382793daead2d3fd5d4543e8d8c0c3e0000803f000010c1ba5bee3e0000c0c09cb3ec3d49ce7d3f9382793db1b0303fd9d8583e8d8c0c3e0000803f000010c1ba5bee3e0000c0c0a108d13c5a6f7f3f951c7b3db1b0303fd9d8583e8d8c0c3e0000803f000010c161e6ce3e0000a0c0a108d13c5a6f7f3f951c7b3daead2d3fd5d4543e8d8c0c3e0000803f000000c171cec13e0000a0c0a108d13c5a6f7f3f951c7b3dadac2c3fd5d4543e8988083e0000803f000010c1ba5bee3e0000c0c053cc8f3d3a557f3fc0c7873cb1b0303fd9d8583e8d8c0c3e0000803f000000c171cec13e0000a0c053cc8f3d3a557f3fc0c7873cadac2c3fd5d4543e8988083e0000803f000000c19a50ca3e0000c0c053cc8f3d3a557f3fc0c7873caead2d3fd5d4543e8988083e0000803f000000c19a50ca3e0000c0c0255a03bd3fd57f3fd40b883caead2d3fd5d4543e8988083e0000803f000000c171cec13e0000a0c0255a03bd3fd57f3fd40b883cadac2c3fd5d4543e8988083e0000803f0000e0c0743cd23e0000a0c0255a03bd3fd57f3fd40b883caead2d3fd5d4543e8d8c0c3e0000803f000000c19a50ca3e0000c0c04a3a973c1dcf7f3fdbef0abdaead2d3fd5d4543e8988083e0000803f0000e0c0743cd23e0000a0c04a3a973c1dcf7f3fdbef0abdaead2d3fd5d4543e8d8c0c3e0000803f0000e0c027dbc03e0000c0c04a3a973c1dcf7f3fdbef0abdadac2c3fd5d4543e8988083e0000803f0000e0c027dbc03e0000c0c0c2819ebdcf157f3f368b0abdadac2c3fd5d4543e8988083e0000803f0000e0c0743cd23e0000a0c0c2819ebdcf157f3f368b0abdaead2d3fd5d4543e8d8c0c3e0000803f0000c0c04601fa3e0000a0c0c2819ebdcf157f3f368b0abdb2b1313fd9d8583e8d8c0c3e0000803f0000e0c027dbc03e0000c0c0286075bda2337f3fd46352bdadac2c3fd5d4543e8988083e0000803f0000c0c04601fa3e0000a0c0286075bda2337f3fd46352bdb2b1313fd9d8583e8d8c0c3e0000803f0000c0c0bc9fdf3e0000c0c0286075bda2337f3fd46352bdb0af2f3fd5d4543e8d8c0c3e0000803f0000c0c0bc9fdf3e0000c0c0c8ae66bd4c417f3f196f52bdb0af2f3fd5d4543e8d8c0c3e0000803f0000c0c04601fa3e0000a0c0c8ae66bd4c417f3f196f52bdb2b1313fd9d8583e8d8c0c3e0000803f0000a0c055760b3f0000a0c0c8ae66bd4c417f3f196f52bdb5b4343fdddc5c3e9190103e0000803f0000c0c0bc9fdf3e0000c0c0cb598fbda1307f3f7c4d1abdb0af2f3fd5d4543e8d8c0c3e0000803f0000a0c055760b3f0000a0c0cb598fbda1307f3f7c4d1abdb5b4343fdddc5c3e9190103e0000803f0000a0c0a7c9013f0000c0c0cb598fbda1307f3f7c4d1abdb3b2323fdddc5c3e9190103e0000803f0000a0c0a7c9013f0000c0c0169238bbffd07f3f74ae1abdb3b2323fdddc5c3e9190103e0000803f0000a0c055760b3f0000a0c0169238bbffd07f3f74ae1abdb5b4343fdddc5c3e9190103e0000803f000080c0092f0c3f0000a0c0169238bbffd07f3f74ae1abdb5b4343fdddc5c3e9190103e0000803f0000a0c0a7c9013f0000c0c06dc215bcd9dc7f3faece00bdb3b2323fdddc5c3e9190103e0000803f000080c0092f0c3f0000a0c06dc215bcd9dc7f3faece00bdb5b4343fdddc5c3e9190103e0000803f000080c00321043f0000c0c06dc215bcd9dc7f3faece00bdb4b3333fdddc5c3e9190103e0000803f000080c00321043f0000c0c09c7dcd3d06957e3fa52900bdb4b3333fdddc5c3e9190103e0000803f000080c0092f0c3f0000a0c09c7dcd3d06957e3fa52900bdb5b4343fdddc5c3e9190103e0000803f000040c06cb5e43e0000a0c09c7dcd3d06957e3fa52900bdb0af2f3fd9d8583e8d8c0c3e0000803f000080c00321043f0000c0c045b3683cc2957f3ff8c1613db4b3333fdddc5c3e9190103e0000803f000040c06cb5e43e0000a0c045b3683cc2957f3ff8c1613db0af2f3fd9d8583e8d8c0c3e0000803f000040c0b37c003f0000c0c045b3683cc2957f3ff8c1613db3b2323fdddc5c3e9190103e0000803f000040c0b37c003f0000c0c0d77ce53d3f007e3fc85b603db3b2323fdddc5c3e9190103e0000803f000040c06cb5e43e0000a0c0d77ce53d3f007e3fc85b603db0af2f3fd9d8583e8d8c0c3e0000803f000000c09fe2aa3e0000a0c0d77ce53d3f007e3fc85b603daaa9293fd1d0503e8988083e0000803f000040c0b37c003f0000c0c08ae8cbbba02f7c3f24fc2f3eb3b2323fdddc5c3e9190103e0000803f000000c09fe2aa3e0000a0c08ae8cbbba02f7c3f24fc2f3eaaa9293fd1d0503e8988083e0000803f000000c0af1a023f0000c0c08ae8cbbba02f7c3f24fc2f3eb3b2323fdddc5c3e9190103e0000803f000000c0af1a023f0000c0c0a9ee4dbd3adf7b3f09c42f3eb3b2323fdddc5c3e9190103e0000803f000000c09fe2aa3e0000a0c0a9ee4dbd3adf7b3f09c42f3eaaa9293fd1d0503e8988083e0000803f000080bf750cc53e0000a0c0a9ee4dbd3adf7b3f09c42f3eadac2c3fd5d4543e8988083e0000803f000000c0af1a023f0000c0c05f954cbdfce37b3f10702f3eb3b2323fdddc5c3e9190103e0000803f000080bf750cc53e0000a0c05f954cbdfce37b3f10702f3eadac2c3fd5d4543e8988083e0000803f000080bf6c190f3f0000c0c05f954cbdfce37b3f10702f3eb6b5353fdddc5c3e9190103e0000803f000080bf6c190f3f0000c0c0750f18bebe68793fa0b52d3eb6b5353fdddc5c3e9190103e0000803f000080bf750cc53e0000a0c0750f18bebe68793fa0b52d3eadac2c3fd5d4543e8988083e0000803f00000000448b093f0000a0c0750f18bebe68793fa0b52d3eb5b4343fdddc5c3e9190103e0000803f000080bf6c190f3f0000c0c076f66abd20c77e3f2ab6a13db6b5353fdddc5c3e9190103e0000803f00000000448b093f0000a0c076f66abd20c77e3f2ab6a13db5b4343fdddc5c3e9190103e0000803f00000000dcda1d3f0000c0c076f66abd20c77e3f2ab6a13db9b8383fe1e0603e9594143e0000803f00000000dcda1d3f0000c0c06ee100be312b7d3fb4b0a03db9b8383fe1e0603e9594143e0000803f00000000448b093f0000a0c06ee100be312b7d3fb4b0a03db5b4343fdddc5c3e9190103e0000803f0000803fde1f2a3f0000a0c06ee100be312b7d3fb4b0a03dbbba3a3fe5e4643e9594143e0000803f00000000dcda1d3f0000c0c0e0e2c1bc64da7f3fb183c6bcb9b8383fe1e0603e9594143e0000803f0000803fde1f2a3f0000a0c0e0e2c1bc64da7f3fb183c6bcbbba3a3fe5e4643e9594143e0000803f0000803fd7ea233f0000c0c0e0e2c1bc64da7f3fb183c6bcbab9393fe5e4643e9594143e0000803f0000803fd7ea233f0000c0c0db8a233c7ae97f3f668fc6bcbab9393fe5e4643e9594143e0000803f0000803fde1f2a3f0000a0c0db8a233c7ae97f3f668fc6bcbbba3a3fe5e4643e9594143e0000803f000000407991273f0000a0c0db8a233c7ae97f3f668fc6bcbbba3a3fe5e4643e9594143e0000803f0000803fd7ea233f0000c0c0d2b44d3df0247f3f7bf683bdbab9393fe5e4643e9594143e0000803f000000407991273f0000a0c0d2b44d3df0247f3f7bf683bdbbba3a3fe5e4643e9594143e0000803f000000408004173f0000c0c0d2b44d3df0247f3f7bf683bdb8b7373fe1e0603e9190103e0000803f000000408004173f0000c0c0799cb23d477e7e3f48a083bdb8b7373fe1e0603e9190103e0000803f000000407991273f0000a0c0799cb23d477e7e3f48a083bdbbba3a3fe5e4643e9594143e0000803f00004040131c113f0000a0c0799cb23d477e7e3f48a083bdb6b5353fe1e0603e9190103e0000803f000000408004173f0000c0c0787b823d70447f3f62b526bdb8b7373fe1e0603e9190103e0000803f00004040131c113f0000a0c0787b823d70447f3f62b526bdb6b5353fe1e0603e9190103e0000803f0000404015a9063f0000c0c0787b823d70447f3f62b526bdb4b3333fdddc5c3e9190103e0000803f0000404015a9063f0000c0c018db5a3ca2c37f3f740827bdb4b3333fdddc5c3e9190103e0000803f00004040131c113f0000a0c018db5a3ca2c37f3f740827bdb6b5353fe1e0603e9190103e0000803f00008040d8af0d3f0000a0c018db5a3ca2c37f3f740827bdb6b5353fdddc5c3e9190103e0000803f0000404015a9063f0000c0c0bfd70c3c0ad37f3f618e13bdb4b3333fdddc5c3e9190103e0000803f00008040d8af0d3f0000a0c0bfd70c3c0ad37f3f618e13bdb6b5353fdddc5c3e9190103e0000803f000080405375043f0000c0c0bfd70c3c0ad37f3f618e13bdb4b3333fdddc5c3e9190103e0000803f000080405375043f0000c0c085d54fbd17817f3f1d5f13bdb4b3333fdddc5c3e9190103e0000803f00008040d8af0d3f0000a0c085d54fbd17817f3f1d5f13bdb6b5353fdddc5c3e9190103e0000803f0000a040a4b31a3f0000a0c085d54fbd17817f3f1d5f13bdb8b7373fe1e0603e9594143e0000803f000080405375043f0000c0c0de811cbc0e3a7f3fb4d89dbdb4b3333fdddc5c3e9190103e0000803f0000a040a4b31a3f0000a0c0de811cbc0e3a7f3fb4d89dbdb8b7373fe1e0603e9594143e0000803f0000a04040e9063f0000c0c0de811cbc0e3a7f3fb4d89dbdb4b3333fdddc5c3e9190103e0000803f0000a04040e9063f0000c0c02717cabbcd3b7f3fc9d99dbdb4b3333fdddc5c3e9190103e0000803f0000a040a4b31a3f0000a0c02717cabbcd3b7f3fc9d99dbdb8b7373fe1e0603e9594143e0000803f0000c04009491c3f0000a0c02717cabbcd3b7f3fc9d99dbdb9b8383fe1e0603e9594143e0000803f0000a04040e9063f0000c0c05737843c1ab47e3f6e2ecbbdb4b3333fdddc5c3e9190103e0000803f0000c04009491c3f0000a0c05737843c1ab47e3f6e2ecbbdb9b8383fe1e0603e9594143e0000803f0000c04023c2023f0000c0c05737843c1ab47e3f6e2ecbbdb3b2323fdddc5c3e9190103e0000803f0000c04023c2023f0000c0c069f3fc3d46c97c3fe2a6c9bdb3b2323fdddc5c3e9190103e0000803f0000c04009491c3f0000a0c069f3fc3d46c97c3fe2a6c9bdb9b8383fe1e0603e9594143e0000803f0000e0406787f83e0000a0c069f3fc3d46c97c3fe2a6c9bdb2b1313fd9d8583e8d8c0c3e0000803f0000c04023c2023f0000c0c047866b3d8b717f3f21d903bdb3b2323fdddc5c3e9190103e0000803f0000e0406787f83e0000a0c047866b3d8b717f3f21d903bdb2b1313fd9d8583e8d8c0c3e0000803f0000e0401203e83e0000c0c047866b3d8b717f3f21d903bdb1b0303fd9d8583e8d8c0c3e0000803f0000e0401203e83e0000c0c0eec1203eb8b17c3fd86d02bdb1b0303fd9d8583e8d8c0c3e0000803f0000e0406787f83e0000a0c0eec1203eb8b17c3fd86d02bdb2b1313fd9d8583e8d8c0c3e0000803f000000413f19a73e0000a0c0eec1203eb8b17c3fd86d02bdaaa9293fd1d0503e8988083e0000803f0000e0401203e83e0000c0c005b2673d67f77e3fe9c18e3db1b0303fd9d8583e8d8c0c3e0000803f000000413f19a73e0000a0c005b2673d67f77e3fe9c18e3daaa9293fd1d0503e8988083e0000803f00000041c3eeca3e0000c0c005b2673d67f77e3fe9c18e3daead2d3fd5d4543e8988083e0000803f00000041c3eeca3e0000c0c0e5818e3d9cc17e3fcba38e3daead2d3fd5d4543e8988083e0000803f000000413f19a73e0000a0c0e5818e3d9cc17e3fcba38e3daaa9293fd1d0503e8988083e0000803f000010413f4c833e0000a0c0e5818e3d9cc17e3fcba38e3da6a5253fcdcc4c3e8584043e0000803f00000041c3eeca3e0000c0c0a39f11bdcbf67b3fb56a313eaead2d3fd5d4543e8988083e0000803f000010413f4c833e0000a0c0a39f11bdcbf67b3fb56a313ea6a5253fcdcc4c3e8584043e0000803f000010415c6ddd3e0000c0c0a39f11bdcbf67b3fb56a313eafae2e3fd5d4543e8d8c0c3e0000803f000010415c6ddd3e0000c0c03b4804bec7027a3fa10a303eafae2e3fd5d4543e8d8c0c3e0000803f000010413f4c833e0000a0c03b4804bec7027a3fa10a303ea6a5253fcdcc4c3e8584043e0000803f00002041fb05c73e0000a0c03b4804bec7027a3fa10a303eadac2c3fd5d4543e8988083e0000803f000010415c6ddd3e0000c0c0b8402fbeaf3e763f5f5a5a3eafae2e3fd5d4543e8d8c0c3e0000803f00002041fb05c73e0000a0c0b8402fbeaf3e763f5f5a5a3eadac2c3fd5d4543e8988083e0000803f0000204132431c3f0000c0c0b8402fbeaf3e763f5f5a5a3eb9b8383fe1e0603e9594143e0000803f000020c1eb210b3f0000a0c0883ac33d718e7d3f24e6cbbdb5b4343fdddc5c3e9190103e0000803f000020c191dd243f000080c0883ac33d718e7d3f24e6cbbdbab9393fe5e4643e9594143e0000803f000010c10b3a0c3f000080c0883ac33d718e7d3f24e6cbbdb5b4343fdddc5c3e9190103e0000803f000020c1eb210b3f0000a0c037f40b3e4b057b3fec3e10beb5b4343fdddc5c3e9190103e0000803f000010c10b3a0c3f000080c037f40b3e4b057b3fec3e10beb5b4343fdddc5c3e9190103e0000803f000010c161e6ce3e0000a0c037f40b3e4b057b3fec3e10beaead2d3fd5d4543e8d8c0c3e0000803f000010c161e6ce3e0000a0c0e7f48e3c255c7d3f0b9711beaead2d3fd5d4543e8d8c0c3e0000803f000010c10b3a0c3f000080c0e7f48e3c255c7d3f0b9711beb5b4343fdddc5c3e9190103e0000803f000000c179b6073f000080c0e7f48e3c255c7d3f0b9711beb4b3333fdddc5c3e9190103e0000803f000010c161e6ce3e0000a0c03110cf3cf1067d3f816f19beaead2d3fd5d4543e8d8c0c3e0000803f000000c179b6073f000080c03110cf3cf1067d3f816f19beb4b3333fdddc5c3e9190103e0000803f000000c171cec13e0000a0c03110cf3cf1067d3f816f19beadac2c3fd5d4543e8988083e0000803f000000c171cec13e0000a0c00a57d43ce0057d3fdb6e19beadac2c3fd5d4543e8988083e0000803f000000c179b6073f000080c00a57d43ce0057d3fdb6e19beb4b3333fdddc5c3e9190103e0000803f0000e0c0c4ff003f000080c00a57d43ce0057d3fdb6e19beb3b2323fdddc5c3e9190103e0000803f000000c171cec13e0000a0c08ccd02bd69c37e3f0c20bebdadac2c3fd5d4543e8988083e0000803f0000e0c0c4ff003f000080c08ccd02bd69c37e3f0c20bebdb3b2323fdddc5c3e9190103e0000803f0000e0c0743cd23e0000a0c08ccd02bd69c37e3f0c20bebdaead2d3fd5d4543e8d8c0c3e0000803f0000e0c0743cd23e0000a0c0ddc5603d5e827e3f82efbdbdaead2d3fd5d4543e8d8c0c3e0000803f0000e0c0c4ff003f000080c0ddc5603d5e827e3f82efbdbdb3b2323fdddc5c3e9190103e0000803f0000c0c0abbce53e000080c0ddc5603d5e827e3f82efbdbdb0af2f3fd9d8583e8d8c0c3e0000803f0000e0c0743cd23e0000a0c068799ebd5e087f3f0088213daead2d3fd5d4543e8d8c0c3e0000803f0000c0c0abbce53e000080c068799ebd5e087f3f0088213db0af2f3fd9d8583e8d8c0c3e0000803f0000c0c04601fa3e0000a0c068799ebd5e087f3f0088213db2b1313fd9d8583e8d8c0c3e0000803f0000c0c04601fa3e0000a0c010ad183d359f7f3f89e7213db2b1313fd9d8583e8d8c0c3e0000803f0000c0c0abbce53e000080c010ad183d359f7f3f89e7213db0af2f3fd9d8583e8d8c0c3e0000803f0000a0c0cf9fd23e000080c010ad183d359f7f3f89e7213daead2d3fd5d4543e8d8c0c3e0000803f0000c0c04601fa3e0000a0c048f764bdfb5a7d3f7530073eb2b1313fd9d8583e8d8c0c3e0000803f0000a0c0cf9fd23e000080c048f764bdfb5a7d3f7530073eaead2d3fd5d4543e8d8c0c3e0000803f0000a0c055760b3f0000a0c048f764bdfb5a7d3f7530073eb5b4343fdddc5c3e9190103e0000803f0000a0c055760b3f0000a0c0e3afc93b53bf7d3f0066073eb5b4343fdddc5c3e9190103e0000803f0000a0c0cf9fd23e000080c0e3afc93b53bf7d3f0066073eaead2d3fd5d4543e8d8c0c3e0000803f000080c0e671cf3e000080c0e3afc93b53bf7d3f0066073eaead2d3fd5d4543e8d8c0c3e0000803f0000a0c055760b3f0000a0c068db36bbfb707d3f2d63103eb5b4343fdddc5c3e9190103e0000803f000080c0e671cf3e000080c068db36bbfb707d3f2d63103eaead2d3fd5d4543e8d8c0c3e0000803f000080c0092f0c3f0000a0c068db36bbfb707d3f2d63103eb5b4343fdddc5c3e9190103e0000803f000080c0092f0c3f0000a0c0108fa23d86a47c3fb2ee0f3eb5b4343fdddc5c3e9190103e0000803f000080c0e671cf3e000080c0108fa23d86a47c3fb2ee0f3eaead2d3fd5d4543e8d8c0c3e0000803f000040c0e143a63e000080c0108fa23d86a47c3fb2ee0f3eaaa9293fd1d0503e8988083e0000803f000080c0092f0c3f0000a0c02018cc3d22da7c3fe8b3f63db5b4343fdddc5c3e9190103e0000803f000040c0e143a63e000080c02018cc3d22da7c3fe8b3f63daaa9293fd1d0503e8988083e0000803f000040c06cb5e43e0000a0c02018cc3d22da7c3fe8b3f63db0af2f3fd9d8583e8d8c0c3e0000803f000040c06cb5e43e0000a0c0f706833db3987d3fd66df73db0af2f3fd9d8583e8d8c0c3e0000803f000040c0e143a63e000080c0f706833db3987d3fd66df73daaa9293fd1d0503e8988083e0000803f000000c0a932853e000080c0f706833db3987d3fd66df73da7a6263fcdcc4c3e8584043e0000803f000040c06cb5e43e0000a0c06938e53d82b47d3fe465953db0af2f3fd9d8583e8d8c0c3e0000803f000000c0a932853e000080c06938e53d82b47d3fe465953da7a6263fcdcc4c3e8584043e0000803f000000c09fe2aa3e0000a0c06938e53d82b47d3fe465953daaa9293fd1d0503e8988083e0000803f000000c09fe2aa3e0000a0c02c30bcbda83a7e3fe3b4953daaa9293fd1d0503e8988083e0000803f000000c0a932853e000080c02c30bcbda83a7e3fe3b4953da7a6263fcdcc4c3e8584043e0000803f000080bf9992b43e000080c02c30bcbda83a7e3fe3b4953dabaa2a3fd1d0503e8988083e0000803f000000c09fe2aa3e0000a0c040ed50bdd4887f3f8491033daaa9293fd1d0503e8988083e0000803f000080bf9992b43e000080c040ed50bdd4887f3f8491033dabaa2a3fd1d0503e8988083e0000803f000080bf750cc53e0000a0c040ed50bdd4887f3f8491033dadac2c3fd5d4543e8988083e0000803f000080bf750cc53e0000a0c0637d27bef46b7c3f3af7013dadac2c3fd5d4543e8988083e0000803f000080bf9992b43e000080c0637d27bef46b7c3f3af7013dabaa2a3fd1d0503e8988083e0000803f000000009ac0043f000080c0637d27bef46b7c3f3af7013db4b3333fdddc5c3e9190103e0000803f000080bf750cc53e0000a0c031451abea9087d3f708e973cadac2c3fd5d4543e8988083e0000803f000000009ac0043f000080c031451abea9087d3f708e973cb4b3333fdddc5c3e9190103e0000803f00000000448b093f0000a0c031451abea9087d3f708e973cb5b4343fdddc5c3e9190103e0000803f00000000448b093f0000a0c00490debd75707e3ff165983cb5b4343fdddc5c3e9190103e0000803f000000009ac0043f000080c00490debd75707e3ff165983cb4b3333fdddc5c3e9190103e0000803f0000803f4abe203f000080c00490debd75707e3ff165983cb9b8383fe5e4643e9594143e0000803f00000000448b093f0000a0c09d3101beb4c87d3fa2cc143db5b4343fdddc5c3e9190103e0000803f0000803f4abe203f000080c09d3101beb4c87d3fa2cc143db9b8383fe5e4643e9594143e0000803f0000803fde1f2a3f0000a0c09d3101beb4c87d3fa2cc143dbbba3a3fe5e4643e9594143e0000803f0000803fde1f2a3f0000a0c06d34883d0c437f3f76aa153dbbba3a3fe5e4643e9594143e0000803f0000803f4abe203f000080c06d34883d0c437f3f76aa153db9b8383fe5e4643e9594143e0000803f0000004022ab0f3f000080c06d34883d0c437f3f76aa153db6b5353fdddc5c3e9190103e0000803f0000803fde1f2a3f0000a0c0dce1223c07e17e3f635cbe3dbbba3a3fe5e4643e9594143e0000803f0000004022ab0f3f000080c0dce1223c07e17e3f635cbe3db6b5353fdddc5c3e9190103e0000803f000000407991273f0000a0c0dce1223c07e17e3f635cbe3dbbba3a3fe5e4643e9594143e0000803f000000407991273f0000a0c0e3c5053e0eb57c3f26bdbc3dbbba3a3fe5e4643e9594143e0000803f0000004022ab0f3f000080c0e3c5053e0eb57c3f26bdbc3db6b5353fdddc5c3e9190103e0000803f000040403694db3e000080c0e3c5053e0eb57c3f26bdbc3dafae2e3fd5d4543e8d8c0c3e0000803f000000407991273f0000a0c07950b13d39a57c3fef6d0b3ebbba3a3fe5e4643e9594143e0000803f000040403694db3e000080c07950b13d39a57c3fef6d0b3eafae2e3fd5d4543e8d8c0c3e0000803f00004040131c113f0000a0c07950b13d39a57c3fef6d0b3eb6b5353fe1e0603e9190103e0000803f00004040131c113f0000a0c0fcb5883cf88f7d3f7cef0b3eb6b5353fe1e0603e9190103e0000803f000040403694db3e000080c0fcb5883cf88f7d3f7cef0b3eafae2e3fd5d4543e8d8c0c3e0000803f00008040cff3d23e000080c0fcb5883cf88f7d3f7cef0b3eaead2d3fd5d4543e8d8c0c3e0000803f00004040131c113f0000a0c02be1583c63747d3f15670f3eb6b5353fe1e0603e9190103e0000803f00008040cff3d23e000080c02be1583c63747d3f15670f3eaead2d3fd5d4543e8d8c0c3e0000803f00008040d8af0d3f0000a0c02be1583c63747d3f15670f3eb6b5353fdddc5c3e9190103e0000803f00008040d8af0d3f0000a0c0234fecbda9c87b3f13750e3eb6b5353fdddc5c3e9190103e0000803f00008040cff3d23e000080c0234fecbda9c87b3f13750e3eaead2d3fd5d4543e8d8c0c3e0000803f0000a0406c82073f000080c0234fecbda9c87b3f13750e3eb4b3333fdddc5c3e9190103e0000803f00008040d8af0d3f0000a0c063634fbdc8f47e3f7ce9983db6b5353fdddc5c3e9190103e0000803f0000a0406c82073f000080c063634fbdc8f47e3f7ce9983db4b3333fdddc5c3e9190103e0000803f0000a040a4b31a3f0000a0c063634fbdc8f47e3f7ce9983db8b7373fe1e0603e9594143e0000803f0000a040a4b31a3f0000a0c09a8a0fbe57c37c3fc198973db8b7373fe1e0603e9594143e0000803f0000a0406c82073f000080c09a8a0fbe57c37c3fc198973db4b3333fdddc5c3e9190103e0000803f0000c040b8da2b3f000080c09a8a0fbe57c37c3fc198973dbcbb3b3fe5e4643e9594143e0000803f0000a040a4b31a3f0000a0c0d151cabbe4857f3f1ea478bdb8b7373fe1e0603e9594143e0000803f0000c040b8da2b3f000080c0d151cabbe4857f3f1ea478bdbcbb3b3fe5e4643e9594143e0000803f0000c04009491c3f0000a0c0d151cabbe4857f3f1ea478bdb9b8383fe1e0603e9594143e0000803f0000c04009491c3f0000a0c07e7e1d3dc4567f3f437678bdb9b8383fe1e0603e9594143e0000803f0000c040b8da2b3f000080c07e7e1d3dc4567f3f437678bdbcbb3b3fe5e4643e9594143e0000803f0000e0404afc213f000080c07e7e1d3dc4567f3f437678bdbab9393fe5e4643e9594143e0000803f0000c04009491c3f0000a0c00e83fb3d28597b3f7b2414beb9b8383fe1e0603e9594143e0000803f0000e0404afc213f000080c00e83fb3d28597b3f7b2414bebab9393fe5e4643e9594143e0000803f0000e0406787f83e0000a0c00e83fb3d28597b3f7b2414beb2b1313fd9d8583e8d8c0c3e0000803f0000e0406787f83e0000a0c0b50d203e10277a3f127013beb2b1313fd9d8583e8d8c0c3e0000803f0000e0404afc213f000080c0b50d203e10277a3f127013bebab9393fe5e4643e9594143e0000803f00000041d612f23e000080c0b50d203e10277a3f127013beb2b1313fd9d8583e8d8c0c3e0000803f0000e0406787f83e0000a0c0e12e1f3e2a387a3f619012beb2b1313fd9d8583e8d8c0c3e0000803f00000041d612f23e000080c0e12e1f3e2a387a3f619012beb2b1313fd9d8583e8d8c0c3e0000803f000000413f19a73e0000a0c0e12e1f3e2a387a3f619012beaaa9293fd1d0503e8988083e0000803f000000413f19a73e0000a0c0b119133ee3ab7a3f29d412beaaa9293fd1d0503e8988083e0000803f00000041d612f23e000080c0b119133ee3ab7a3f29d412beb2b1313fd9d8583e8d8c0c3e0000803f00001041bef5a63e000080c0b119133ee3ab7a3f29d412beaaa9293fd1d0503e8988083e0000803f000000413f19a73e0000a0c0c0828e3d22c37e3f6bf58dbdaaa9293fd1d0503e8988083e0000803f00001041bef5a63e000080c0c0828e3d22c37e3f6bf58dbdaaa9293fd1d0503e8988083e0000803f000010413f4c833e0000a0c0c0828e3d22c37e3f6bf58dbda6a5253fcdcc4c3e8584043e0000803f000010413f4c833e0000a0c0cf2e693cfb5a7f3f084a8ebda6a5253fcdcc4c3e8584043e0000803f00001041bef5a63e000080c0cf2e693cfb5a7f3f084a8ebdaaa9293fd1d0503e8988083e0000803f0000204192a79f3e000080c0cf2e693cfb5a7f3f084a8ebda9a8283fcdcc4c3e8988083e0000803f000010413f4c833e0000a0c097e405be200e7d3fe7a99b3da6a5253fcdcc4c3e8584043e0000803f0000204192a79f3e000080c097e405be200e7d3fe7a99b3da9a8283fcdcc4c3e8988083e0000803f00002041fb05c73e0000a0c097e405be200e7d3fe7a99b3dadac2c3fd5d4543e8988083e0000803f000020c191dd243f000080c097c00d3d55457d3f56da10bebab9393fe5e4643e9594143e0000803f000020c10c78493f000040c097c00d3d55457d3f56da10bec2c1413fedec6c3e9998183e0000803f000010c19283403f000040c097c00d3d55457d3f56da10bec0bf3f3fedec6c3e9998183e0000803f000020c191dd243f000080c02245c03dc2b6793f61034cbebab9393fe5e4643e9594143e0000803f000010c19283403f000040c02245c03dc2b6793f61034cbec0bf3f3fedec6c3e9998183e0000803f000010c10b3a0c3f000080c02245c03dc2b6793f61034cbeb5b4343fdddc5c3e9190103e0000803f000010c10b3a0c3f000080c0b58d393c3ece7a3fb7e74cbeb5b4343fdddc5c3e9190103e0000803f000010c19283403f000040c0b58d393c3ece7a3fb7e74cbec0bf3f3fedec6c3e9998183e0000803f000000c1fc8d3d3f000040c0b58d393c3ece7a3fb7e74cbebfbe3e3fe9e8683e9998183e0000803f000010c10b3a0c3f000080c02e558d3c5d7b7a3fa0b952beb5b4343fdddc5c3e9190103e0000803f000000c1fc8d3d3f000040c02e558d3c5d7b7a3fa0b952bebfbe3e3fe9e8683e9998183e0000803f000000c179b6073f000080c02e558d3c5d7b7a3fa0b952beb4b3333fdddc5c3e9190103e0000803f000000c179b6073f000080c0f3f6bd3d6b70793f0dd951beb4b3333fdddc5c3e9190103e0000803f000000c1fc8d3d3f000040c0f3f6bd3d6b70793f0dd951bebfbe3e3fe9e8683e9998183e0000803f0000e0c03a2f253f000040c0f3f6bd3d6b70793f0dd951bebab9393fe5e4643e9594143e0000803f000000c179b6073f000080c0f2a6d43c17657d3fc7440fbeb4b3333fdddc5c3e9190103e0000803f0000e0c03a2f253f000040c0f2a6d43c17657d3fc7440fbebab9393fe5e4643e9594143e0000803f0000e0c0c4ff003f000080c0f2a6d43c17657d3fc7440fbeb3b2323fdddc5c3e9190103e0000803f0000e0c0c4ff003f000080c0257c323ea099793f831f0dbeb3b2323fdddc5c3e9190103e0000803f0000e0c03a2f253f000040c0257c323ea099793f831f0dbebab9393fe5e4643e9594143e0000803f0000c0c098d6ee3e000040c0257c323ea099793f831f0dbeb1b0303fd9d8583e8d8c0c3e0000803f0000e0c0c4ff003f000080c0d5b5613d15927f3f4a6091bcb3b2323fdddc5c3e9190103e0000803f0000c0c098d6ee3e000040c0d5b5613d15927f3f4a6091bcb1b0303fd9d8583e8d8c0c3e0000803f0000c0c0abbce53e000080c0d5b5613d15927f3f4a6091bcb0af2f3fd9d8583e8d8c0c3e0000803f0000c0c0abbce53e000080c0840dbe3de5da7e3f16f890bcb0af2f3fd9d8583e8d8c0c3e0000803f0000c0c098d6ee3e000040c0840dbe3de5da7e3f16f890bcb1b0303fd9d8583e8d8c0c3e0000803f0000a0c0921cbf3e000040c0840dbe3de5da7e3f16f890bcacab2b3fd1d0503e8988083e0000803f0000c0c0abbce53e000080c04caf183df2a27f3f2ae11b3db0af2f3fd9d8583e8d8c0c3e0000803f0000a0c0921cbf3e000040c04caf183df2a27f3f2ae11b3dacab2b3fd1d0503e8988083e0000803f0000a0c0cf9fd23e000080c04caf183df2a27f3f2ae11b3daead2d3fd5d4543e8d8c0c3e0000803f0000a0c0cf9fd23e000080c0980cabbc2fc27f3f36f41b3daead2d3fd5d4543e8d8c0c3e0000803f0000a0c0921cbf3e000040c0980cabbc2fc27f3f36f41b3dacab2b3fd1d0503e8988083e0000803f000080c0f1cfc93e000040c0980cabbc2fc27f3f36f41b3dadac2c3fd5d4543e8988083e0000803f0000a0c0cf9fd23e000080c01976cb3bc6fa7f3ff23a343caead2d3fd5d4543e8d8c0c3e0000803f000080c0f1cfc93e000040c01976cb3bc6fa7f3ff23a343cadac2c3fd5d4543e8988083e0000803f000080c0e671cf3e000080c01976cb3bc6fa7f3ff23a343caead2d3fd5d4543e8d8c0c3e0000803f000080c0e671cf3e000080c010b18d3d015f7f3f46cd333caead2d3fd5d4543e8d8c0c3e0000803f000080c0f1cfc93e000040c010b18d3d015f7f3f46cd333cadac2c3fd5d4543e8988083e0000803f000040c0584da63e000040c010b18d3d015f7f3f46cd333caaa9293fd1d0503e8988083e0000803f000080c0e671cf3e000080c05830a43d0c2d7f3f36f396b8aead2d3fd5d4543e8d8c0c3e0000803f000040c0584da63e000040c05830a43d0c2d7f3f36f396b8aaa9293fd1d0503e8988083e0000803f000040c0e143a63e000080c05830a43d0c2d7f3f36f396b8aaa9293fd1d0503e8988083e0000803f000040c0e143a63e000080c0223fd73d09957e3f4a9996b8aaa9293fd1d0503e8988083e0000803f000040c0584da63e000040c0223fd73d09957e3f4a9996b8aaa9293fd1d0503e8988083e0000803f000000c0ae61603e000040c0223fd73d09957e3f4a9996b8a5a4243fc9c8483e8584043e0000803f000040c0e143a63e000080c030e2833dff407f3f2c91273daaa9293fd1d0503e8988083e0000803f000000c0ae61603e000040c030e2833dff407f3f2c91273da5a4243fc9c8483e8584043e0000803f000000c0a932853e000080c030e2833dff407f3f2c91273da7a6263fcdcc4c3e8584043e0000803f000000c0a932853e000080c068da39bd77857f3f1fbe273da7a6263fcdcc4c3e8584043e0000803f000000c0ae61603e000040c068da39bd77857f3f1fbe273da5a4243fc9c8483e8584043e0000803f000080bf4877873e000040c068da39bd77857f3f1fbe273da7a6263fcdcc4c3e8584043e0000803f000000c0a932853e000080c09bf8bbbd98ef7d3fd9f8b23da7a6263fcdcc4c3e8584043e0000803f000080bf4877873e000040c09bf8bbbd98ef7d3fd9f8b23da7a6263fcdcc4c3e8584043e0000803f000080bf9992b43e000080c09bf8bbbd98ef7d3fd9f8b23dabaa2a3fd1d0503e8988083e0000803f000080bf9992b43e000080c02be620be35d87b3f847fb13dabaa2a3fd1d0503e8988083e0000803f000080bf4877873e000040c02be620be35d87b3f847fb13da7a6263fcdcc4c3e8584043e0000803f000000002f3ed93e000040c02be620be35d87b3f847fb13dafae2e3fd5d4543e8d8c0c3e0000803f000080bf9992b43e000080c0b4da26bec6767b3f69a0bd3dabaa2a3fd1d0503e8988083e0000803f000000002f3ed93e000040c0b4da26bec6767b3f69a0bd3dafae2e3fd5d4543e8d8c0c3e0000803f000000009ac0043f000080c0b4da26bec6767b3f69a0bd3db4b3333fdddc5c3e9190103e0000803f000000009ac0043f000080c06870fbbd2df17c3fc2bdbe3db4b3333fdddc5c3e9190103e0000803f000000002f3ed93e000040c06870fbbd2df17c3fc2bdbe3dafae2e3fd5d4543e8d8c0c3e0000803f0000803f6a6e0c3f000040c06870fbbd2df17c3fc2bdbe3db5b4343fdddc5c3e9190103e0000803f000000009ac0043f000080c072e9ddbd08b27d3f8408a13db4b3333fdddc5c3e9190103e0000803f0000803f6a6e0c3f000040c072e9ddbd08b27d3f8408a13db5b4343fdddc5c3e9190103e0000803f0000803f4abe203f000080c072e9ddbd08b27d3f8408a13db9b8383fe5e4643e9594143e0000803f0000803f4abe203f000080c0ad5b0e3d350b7f3f9ee3a13db9b8383fe5e4643e9594143e0000803f0000803f6a6e0c3f000040c0ad5b0e3d350b7f3f9ee3a13db5b4343fdddc5c3e9190103e0000803f000000402580033f000040c0ad5b0e3d350b7f3f9ee3a13db4b3333fdddc5c3e9190103e0000803f0000803f4abe203f000080c08d24883d4b257f3f7d09423db9b8383fe5e4643e9594143e0000803f000000402580033f000040c08d24883d4b257f3f7d09423db4b3333fdddc5c3e9190103e0000803f0000004022ab0f3f000080c08d24883d4b257f3f7d09423db6b5353fdddc5c3e9190103e0000803f0000004022ab0f3f000080c09044e03d6c2c7e3f394c413db6b5353fdddc5c3e9190103e0000803f000000402580033f000040c09044e03d6c2c7e3f394c413db4b3333fdddc5c3e9190103e0000803f000040400288ce3e000040c09044e03d6c2c7e3f394c413daead2d3fd5d4543e8d8c0c3e0000803f0000004022ab0f3f000080c0464d063ecfb47d3f68e4ce3cb6b5353fdddc5c3e9190103e0000803f000040400288ce3e000040c0464d063ecfb47d3f68e4ce3caead2d3fd5d4543e8d8c0c3e0000803f000040403694db3e000080c0464d063ecfb47d3f68e4ce3cafae2e3fd5d4543e8d8c0c3e0000803f000040403694db3e000080c0f7c4623c75e47f3fcaacd03cafae2e3fd5d4543e8d8c0c3e0000803f000040400288ce3e000040c0f7c4623c75e47f3fcaacd03caead2d3fd5d4543e8d8c0c3e0000803f000080401771c73e000040c0f7c4623c75e47f3fcaacd03cadac2c3fd5d4543e8988083e0000803f000040403694db3e000080c080f8893c27e67f3fe718b83cafae2e3fd5d4543e8d8c0c3e0000803f000080401771c73e000040c080f8893c27e67f3fe718b83cadac2c3fd5d4543e8988083e0000803f00008040cff3d23e000080c080f8893c27e67f3fe718b83caead2d3fd5d4543e8d8c0c3e0000803f00008040cff3d23e000080c0e95414be673c7d3f722eb63caead2d3fd5d4543e8d8c0c3e0000803f000080401771c73e000040c0e95414be673c7d3f722eb63cadac2c3fd5d4543e8988083e0000803f0000a0406435093f000040c0e95414be673c7d3f722eb63cb5b4343fdddc5c3e9190103e0000803f00008040cff3d23e000080c0da9feebd31407e3f90ffd7bbaead2d3fd5d4543e8d8c0c3e0000803f0000a0406435093f000040c0da9feebd31407e3f90ffd7bbb5b4343fdddc5c3e9190103e0000803f0000a0406c82073f000080c0da9feebd31407e3f90ffd7bbb4b3333fdddc5c3e9190103e0000803f0000a0406c82073f000080c0b33a63beb09c793fb90ed4bbb4b3333fdddc5c3e9190103e0000803f0000a0406435093f000040c0b33a63beb09c793fb90ed4bbb5b4343fdddc5c3e9190103e0000803f0000c0403c78433f000040c0b33a63beb09c793fb90ed4bbc0bf3f3fedec6c3e9998183e0000803f0000a0406c82073f000080c0f6560fbe68687c3f7c45babdb4b3333fdddc5c3e9190103e0000803f0000c0403c78433f000040c0f6560fbe68687c3f7c45babdc0bf3f3fedec6c3e9998183e0000803f0000c040b8da2b3f000080c0f6560fbe68687c3f7c45babdbcbb3b3fe5e4643e9594143e0000803f0000c040b8da2b3f000080c0efd84dbd78987e3fcce2bbbdbcbb3b3fe5e4643e9594143e0000803f0000c0403c78433f000040c0efd84dbd78987e3fcce2bbbdc0bf3f3fedec6c3e9998183e0000803f0000e040f667503f000040c0efd84dbd78987e3fcce2bbbdc3c2423ff1f0703e9d9c1c3e0000803f0000c040b8da2b3f000080c0ae411b3d17b67b3f599236bebcbb3b3fe5e4643e9594143e0000803f0000e040f667503f000040c0ae411b3d17b67b3f599236bec3c2423ff1f0703e9d9c1c3e0000803f0000e0404afc213f000080c0ae411b3d17b67b3f599236bebab9393fe5e4643e9594143e0000803f0000e0404afc213f000080c0be42ee3d8d2e7a3f5c7635bebab9393fe5e4643e9594143e0000803f0000e040f667503f000040c0be42ee3d8d2e7a3f5c7635bec3c2423ff1f0703e9d9c1c3e0000803f000000414fee313f000040c0be42ee3d8d2e7a3f5c7635bebdbc3c3fe9e8683e9594143e0000803f0000e0404afc213f000080c0bdfa1d3e31e9763f197f5bbebab9393fe5e4643e9594143e0000803f000000414fee313f000040c0bdfa1d3e31e9763f197f5bbebdbc3c3fe9e8683e9594143e0000803f00000041d612f23e000080c0bdfa1d3e31e9763f197f5bbeb2b1313fd9d8583e8d8c0c3e0000803f00000041d612f23e000080c055154d3ef1d6743fb9a759beb2b1313fd9d8583e8d8c0c3e0000803f000000414fee313f000040c055154d3ef1d6743fb9a759bebdbc3c3fe9e8683e9594143e0000803f0000104162a5f83e000040c055154d3ef1d6743fb9a759beb2b1313fd9d8583e8d8c0c3e0000803f00000041d612f23e000080c07fd1123edc307a3f3aaa1fbeb2b1313fd9d8583e8d8c0c3e0000803f0000104162a5f83e000040c07fd1123edc307a3f3aaa1fbeb2b1313fd9d8583e8d8c0c3e0000803f00001041bef5a63e000080c07fd1123edc307a3f3aaa1fbeaaa9293fd1d0503e8988083e0000803f00001041bef5a63e000080c0580d3c3ed980783f88961ebeaaa9293fd1d0503e8988083e0000803f0000104162a5f83e000040c0580d3c3ed980783f88961ebeb2b1313fd9d8583e8d8c0c3e0000803f0000204190c8973e000040c0580d3c3ed980783f88961ebea8a7273fcdcc4c3e8584043e0000803f00001041bef5a63e000080c057b8693c97f17f3f12d27b3caaa9293fd1d0503e8988083e0000803f0000204190c8973e000040c057b8693c97f17f3f12d27b3ca8a7273fcdcc4c3e8584043e0000803f0000204192a79f3e000080c057b8693c97f17f3f12d27b3ca9a8283fcdcc4c3e8988083e0000803f000020c10c78493f000040c03f4416bbb8fe7f3f8c8dbe3bc2c1413fedec6c3e9998183e0000803f000020c1effa473f000000c03f4416bbb8fe7f3f8c8dbe3bc1c0403fedec6c3e9998183e0000803f000010c13491483f000000c03f4416bbb8fe7f3f8c8dbe3bc1c0403fedec6c3e9998183e0000803f000020c10c78493f000040c01a1f0f3d99b77f3fafb500bdc2c1413fedec6c3e9998183e0000803f000010c13491483f000000c01a1f0f3d99b77f3fafb500bdc1c0403fedec6c3e9998183e0000803f000010c19283403f000040c01a1f0f3d99b77f3fafb500bdc0bf3f3fedec6c3e9998183e0000803f000010c19283403f000040c0ea4eb83b90de7f3f4cc900bdc0bf3f3fedec6c3e9998183e0000803f000010c13491483f000000c0ea4eb83b90de7f3f4cc900bdc1c0403fedec6c3e9998183e0000803f000000c16620473f000000c0ea4eb83b90de7f3f4cc900bdc1c0403fedec6c3e9998183e0000803f000010c19283403f000040c069403d3cdecd7f3fa20819bdc0bf3f3fedec6c3e9998183e0000803f000000c16620473f000000c069403d3cdecd7f3fa20819bdc1c0403fedec6c3e9998183e0000803f000000c1fc8d3d3f000040c069403d3cdecd7f3fa20819bdbfbe3e3fe9e8683e9998183e0000803f000000c1fc8d3d3f000040c00c8aed3d3c187e3fd20218bdbfbe3e3fe9e8683e9998183e0000803f000000c16620473f000000c00c8aed3d3c187e3fd20218bdc1c0403fedec6c3e9998183e0000803f0000e0c02536293f000000c00c8aed3d3c187e3fd20218bdbbba3a3fe5e4643e9594143e0000803f000000c1fc8d3d3f000040c05a0fc23d0ed17e3fe14480bcbfbe3e3fe9e8683e9998183e0000803f0000e0c02536293f000000c05a0fc23d0ed17e3fe14480bcbbba3a3fe5e4643e9594143e0000803f0000e0c03a2f253f000040c05a0fc23d0ed17e3fe14480bcbab9393fe5e4643e9594143e0000803f0000e0c03a2f253f000040c07cde313ec7137c3fbec77dbcbab9393fe5e4643e9594143e0000803f0000e0c02536293f000000c07cde313ec7137c3fbec77dbcbbba3a3fe5e4643e9594143e0000803f0000c0c0c01af83e000000c07cde313ec7137c3fbec77dbcb2b1313fd9d8583e8d8c0c3e0000803f0000e0c03a2f253f000040c0062d343efbf67b3f3dec91bcbab9393fe5e4643e9594143e0000803f0000c0c0c01af83e000000c0062d343efbf67b3f3dec91bcb2b1313fd9d8583e8d8c0c3e0000803f0000c0c098d6ee3e000040c0062d343efbf67b3f3dec91bcb1b0303fd9d8583e8d8c0c3e0000803f0000c0c098d6ee3e000040c074a7f63c90d77f3f152b94bcb1b0303fd9d8583e8d8c0c3e0000803f0000c0c0c01af83e000000c074a7f63c90d77f3f152b94bcb2b1313fd9d8583e8d8c0c3e0000803f0000a0c0d9ade83e000000c074a7f63c90d77f3f152b94bcb1b0303fd9d8583e8d8c0c3e0000803f0000c0c098d6ee3e000040c0ed76bd3df5107e3f9503a5bdb1b0303fd9d8583e8d8c0c3e0000803f0000a0c0d9ade83e000000c0ed76bd3df5107e3f9503a5bdb1b0303fd9d8583e8d8c0c3e0000803f0000a0c0921cbf3e000040c0ed76bd3df5107e3f9503a5bdacab2b3fd1d0503e8988083e0000803f0000a0c0921cbf3e000040c0dd71c3bdf4fe7d3fe4f7a4bdacab2b3fd1d0503e8988083e0000803f0000a0c0d9ade83e000000c0dd71c3bdf4fe7d3fe4f7a4bdb1b0303fd9d8583e8d8c0c3e0000803f000080c081f60c3f000000c0dd71c3bdf4fe7d3fe4f7a4bdb5b4343fdddc5c3e9190103e0000803f0000a0c0921cbf3e000040c0cf1da9bc5dde7c3f66441ebeacab2b3fd1d0503e8988083e0000803f000080c081f60c3f000000c0cf1da9bc5dde7c3f66441ebeb5b4343fdddc5c3e9190103e0000803f000080c0f1cfc93e000040c0cf1da9bc5dde7c3f66441ebeadac2c3fd5d4543e8988083e0000803f000080c0f1cfc93e000040c0b910763d39777c3fd8031ebeadac2c3fd5d4543e8988083e0000803f000080c081f60c3f000000c0b910763d39777c3fd8031ebeb5b4343fdddc5c3e9190103e0000803f000040c0b0bcfa3e000000c0b910763d39777c3fd8031ebeb2b1313fd9d8583e8d8c0c3e0000803f000080c0f1cfc93e000040c016d28b3dbfff7b3f0a3b26beadac2c3fd5d4543e8988083e0000803f000040c0b0bcfa3e000000c016d28b3dbfff7b3f0a3b26beb2b1313fd9d8583e8d8c0c3e0000803f000040c0584da63e000040c016d28b3dbfff7b3f0a3b26beaaa9293fd1d0503e8988083e0000803f000040c0584da63e000040c0427c5a3e9cc5763f57c822beaaa9293fd1d0503e8988083e0000803f000040c0b0bcfa3e000000c0427c5a3e9cc5763f57c822beb2b1313fd9d8583e8d8c0c3e0000803f000000c0c268893e000000c0427c5a3e9cc5763f57c822bea7a6263fcdcc4c3e8584043e0000803f000040c0584da63e000040c027fdd63dff467e3fcc6348bdaaa9293fd1d0503e8988083e0000803f000000c0c268893e000000c027fdd63dff467e3fcc6348bda7a6263fcdcc4c3e8584043e0000803f000000c0ae61603e000040c027fdd63dff467e3fcc6348bda5a4243fc9c8483e8584043e0000803f000000c0ae61603e000040c07c15953dfd027f3ff4f748bda5a4243fc9c8483e8584043e0000803f000000c0c268893e000000c07c15953dfd027f3ff4f748bda7a6263fcdcc4c3e8584043e0000803f000080bfd1fc473e000000c07c15953dfd027f3ff4f748bda3a2223fc9c8483e8180003e0000803f000000c0ae61603e000040c0b79039bd26207f3f6c678d3da5a4243fc9c8483e8584043e0000803f000080bfd1fc473e000000c0b79039bd26207f3f6c678d3da3a2223fc9c8483e8180003e0000803f000080bf4877873e000040c0b79039bd26207f3f6c678d3da7a6263fcdcc4c3e8584043e0000803f000080bf4877873e000040c097a012be8dc17c3f36178c3da7a6263fcdcc4c3e8584043e0000803f000080bfd1fc473e000000c097a012be8dc17c3f36178c3da3a2223fc9c8483e8180003e0000803f00000000953fae3e000000c097a012be8dc17c3f36178c3dabaa2a3fd1d0503e8988083e0000803f000080bf4877873e000040c053f420be5fee7b3fa63ea93da7a6263fcdcc4c3e8584043e0000803f00000000953fae3e000000c053f420be5fee7b3fa63ea93dabaa2a3fd1d0503e8988083e0000803f000000002f3ed93e000040c053f420be5fee7b3fa63ea93dafae2e3fd5d4543e8d8c0c3e0000803f000000002f3ed93e000040c0f4892abe1c8a7b3f4cfba83dafae2e3fd5d4543e8d8c0c3e0000803f00000000953fae3e000000c0f4892abe1c8a7b3f4cfba83dabaa2a3fd1d0503e8988083e0000803f0000803fd383023f000000c0f4892abe1c8a7b3f4cfba83db3b2323fdddc5c3e9190103e0000803f000000002f3ed93e000040c0af59fcbddadb7d3fb6551d3dafae2e3fd5d4543e8d8c0c3e0000803f0000803fd383023f000000c0af59fcbddadb7d3fb6551d3db3b2323fdddc5c3e9190103e0000803f0000803f6a6e0c3f000040c0af59fcbddadb7d3fb6551d3db5b4343fdddc5c3e9190103e0000803f0000803f6a6e0c3f000040c030997bbd3b537f3f5c3e1e3db5b4343fdddc5c3e9190103e0000803f0000803fd383023f000000c030997bbd3b537f3f5c3e1e3db3b2323fdddc5c3e9190103e0000803f000000400a48123f000000c030997bbd3b537f3f5c3e1e3db7b6363fe1e0603e9190103e0000803f0000803f6a6e0c3f000040c05d910e3d646b7f3f07f56bbdb5b4343fdddc5c3e9190103e0000803f000000400a48123f000000c05d910e3d646b7f3f07f56bbdb7b6363fe1e0603e9190103e0000803f000000402580033f000040c05d910e3d646b7f3f07f56bbdb4b3333fdddc5c3e9190103e0000803f000000402580033f000040c07671313d9c557f3fe7e06bbdb4b3333fdddc5c3e9190103e0000803f000000400a48123f000000c07671313d9c557f3fe7e06bbdb7b6363fe1e0603e9190103e0000803f000040408c29073f000000c07671313d9c557f3fe7e06bbdb4b3333fdddc5c3e9190103e0000803f000000402580033f000040c0d3d0de3d1d877c3f54b6fbbdb4b3333fdddc5c3e9190103e0000803f000040408c29073f000000c0d3d0de3d1d877c3f54b6fbbdb4b3333fdddc5c3e9190103e0000803f000040400288ce3e000040c0d3d0de3d1d877c3f54b6fbbdaead2d3fd5d4543e8d8c0c3e0000803f000040400288ce3e000040c04ba30a3cd3067e3fcc34fdbdaead2d3fd5d4543e8d8c0c3e0000803f000040408c29073f000000c04ba30a3cd3067e3fcc34fdbdb4b3333fdddc5c3e9190103e0000803f00008040b0fa043f000000c04ba30a3cd3067e3fcc34fdbdb4b3333fdddc5c3e9190103e0000803f000040400288ce3e000040c0f2f3603cb8d77d3f92e903beaead2d3fd5d4543e8d8c0c3e0000803f00008040b0fa043f000000c0f2f3603cb8d77d3f92e903beb4b3333fdddc5c3e9190103e0000803f000080401771c73e000040c0f2f3603cb8d77d3f92e903beadac2c3fd5d4543e8988083e0000803f000080401771c73e000040c01a9cadbdeaf37c3f307303beadac2c3fd5d4543e8988083e0000803f00008040b0fa043f000000c01a9cadbdeaf37c3f307303beb4b3333fdddc5c3e9190103e0000803f0000a04020f11a3f000000c01a9cadbdeaf37c3f307303beb8b7373fe1e0603e9594143e0000803f000080401771c73e000040c0670514beaab47c3f870a8cbdadac2c3fd5d4543e8988083e0000803f0000a04020f11a3f000000c0670514beaab47c3f870a8cbdb8b7373fe1e0603e9594143e0000803f0000a0406435093f000040c0670514beaab47c3f870a8cbdb5b4343fdddc5c3e9190103e0000803f0000a0406435093f000040c0876414be32b17c3f9a088cbdb5b4343fdddc5c3e9190103e0000803f0000a04020f11a3f000000c0876414be32b17c3f9a088cbdb8b7373fe1e0603e9594143e0000803f0000c0409486403f000000c0876414be32b17c3f9a088cbdc0bf3f3fedec6c3e9998183e0000803f0000a0406435093f000040c0443863be039a793f74b4373cb5b4343fdddc5c3e9190103e0000803f0000c0409486403f000000c0443863be039a793f74b4373cc0bf3f3fedec6c3e9998183e0000803f0000c0403c78433f000040c0443863be039a793f74b4373cc0bf3f3fedec6c3e9998183e0000803f0000c0403c78433f000040c0d20465bd27957f3f5c1b3c3cc0bf3f3fedec6c3e9998183e0000803f0000c0409486403f000000c0d20465bd27957f3f5c1b3c3cc0bf3f3fedec6c3e9998183e0000803f0000e040dddc4e3f000000c0d20465bd27957f3f5c1b3c3cc3c2423fedec6c3e9d9c1c3e0000803f0000c0403c78433f000040c024b74ebd4cab7f3f234bc53bc0bf3f3fedec6c3e9998183e0000803f0000e040dddc4e3f000000c024b74ebd4cab7f3f234bc53bc3c2423fedec6c3e9d9c1c3e0000803f0000e040f667503f000040c024b74ebd4cab7f3f234bc53bc3c2423ff1f0703e9d9c1c3e0000803f0000e040f667503f000040c05b1d4e3dc8ab7f3f824bc53bc3c2423ff1f0703e9d9c1c3e0000803f0000e040dddc4e3f000000c05b1d4e3dc8ab7f3f824bc53bc3c2423fedec6c3e9d9c1c3e0000803f00000041c9f6413f000000c05b1d4e3dc8ab7f3f824bc53bc0bf3f3fedec6c3e9998183e0000803f0000e040f667503f000040c01ea0f13d07b77d3f713d7ebdc3c2423ff1f0703e9d9c1c3e0000803f00000041c9f6413f000000c01ea0f13d07b77d3f713d7ebdc0bf3f3fedec6c3e9998183e0000803f000000414fee313f000040c01ea0f13d07b77d3f713d7ebdbdbc3c3fe9e8683e9594143e0000803f000000414fee313f000040c086bf433ea6c97a3f834e7bbdbdbc3c3fe9e8683e9594143e0000803f00000041c9f6413f000000c086bf433ea6c97a3f834e7bbdc0bf3f3fedec6c3e9998183e0000803f000010418702103f000000c086bf433ea6c97a3f834e7bbdb6b5353fe1e0603e9190103e0000803f000000414fee313f000040c08549513ec1db793f6cb799bdbdbc3c3fe9e8683e9594143e0000803f000010418702103f000000c08549513ec1db793f6cb799bdb6b5353fe1e0603e9190103e0000803f0000104162a5f83e000040c08549513ec1db793f6cb799bdb2b1313fd9d8583e8d8c0c3e0000803f0000104162a5f83e000040c058ea713e6e05783f119698bdb2b1313fd9d8583e8d8c0c3e0000803f000010418702103f000000c058ea713e6e05783f119698bdb6b5353fe1e0603e9190103e0000803f00002041bd2ba33e000000c058ea713e6e05783f119698bdaaa9293fd1d0503e8988083e0000803f0000104162a5f83e000040c0a54d3e3e697a7b3ff1fab2bcb2b1313fd9d8583e8d8c0c3e0000803f00002041bd2ba33e000000c0a54d3e3e697a7b3ff1fab2bcaaa9293fd1d0503e8988083e0000803f0000204190c8973e000040c0a54d3e3e697a7b3ff1fab2bca8a7273fcdcc4c3e8584043e0000803f000020c1effa473f000000c04d13e9ba612e7b3f78bd453ec1c0403fedec6c3e9998183e0000803f000020c1c798153f000080bf4d13e9ba612e7b3f78bd453eb7b6363fe1e0603e9190103e0000803f000010c18d0f163f000080bf4d13e9ba612e7b3f78bd453eb7b6363fe1e0603e9190103e0000803f000020c1effa473f000000c0666d13bb74287b3f6734463ec1c0403fedec6c3e9998183e0000803f000010c18d0f163f000080bf666d13bb74287b3f6734463eb7b6363fe1e0603e9190103e0000803f000010c13491483f000000c0666d13bb74287b3f6734463ec1c0403fedec6c3e9998183e0000803f000010c13491483f000000c08462623b3c287b3f3b34463ec1c0403fedec6c3e9998183e0000803f000010c18d0f163f000080bf8462623b3c287b3f3b34463eb7b6363fe1e0603e9190103e0000803f000000c1cd28153f000080bf8462623b3c287b3f3b34463eb7b6363fe1e0603e9190103e0000803f000010c13491483f000000c0fafbb43b3b417b3ffa29443ec1c0403fedec6c3e9998183e0000803f000000c1cd28153f000080bffafbb43b3b417b3ffa29443eb7b6363fe1e0603e9190103e0000803f000000c16620473f000000c0fafbb43b3b417b3ffa29443ec1c0403fedec6c3e9998183e0000803f000000c16620473f000000c083a5c13d09227a3fc049433ec1c0403fedec6c3e9998183e0000803f000000c1cd28153f000080bf83a5c13d09227a3fc049433eb7b6363fe1e0603e9190103e0000803f0000e0c087c5f83e000080bf83a5c13d09227a3fc049433eb2b1313fd9d8583e8d8c0c3e0000803f000000c16620473f000000c00730ea3d6b827a3f0d752f3ec1c0403fedec6c3e9998183e0000803f0000e0c087c5f83e000080bf0730ea3d6b827a3f0d752f3eb2b1313fd9d8583e8d8c0c3e0000803f0000e0c02536293f000000c00730ea3d6b827a3f0d752f3ebbba3a3fe5e4643e9594143e0000803f0000e0c02536293f000000c04d51ca3d17ee7a3f77c02f3ebbba3a3fe5e4643e9594143e0000803f0000e0c087c5f83e000080bf4d51ca3d17ee7a3f77c02f3eb2b1313fd9d8583e8d8c0c3e0000803f0000c0c0962bc53e000080bf4d51ca3d17ee7a3f77c02f3eadac2c3fd5d4543e8988083e0000803f0000e0c02536293f000000c0f70a313e03e87a3fe1aec73dbbba3a3fe5e4643e9594143e0000803f0000c0c0962bc53e000080bff70a313e03e87a3fe1aec73dadac2c3fd5d4543e8988083e0000803f0000c0c0c01af83e000000c0f70a313e03e87a3fe1aec73db2b1313fd9d8583e8d8c0c3e0000803f0000c0c0c01af83e000000c02fb381bd323b7e3f4b54ca3db2b1313fd9d8583e8d8c0c3e0000803f0000c0c0962bc53e000080bf2fb381bd323b7e3f4b54ca3dadac2c3fd5d4543e8988083e0000803f0000a0c022d2e53e000080bf2fb381bd323b7e3f4b54ca3db0af2f3fd9d8583e8d8c0c3e0000803f0000c0c0c01af83e000000c0ccb0f63c42e17f3fc8d7b63bb2b1313fd9d8583e8d8c0c3e0000803f0000a0c022d2e53e000080bfccb0f63c42e17f3fc8d7b63bb0af2f3fd9d8583e8d8c0c3e0000803f0000a0c0d9ade83e000000c0ccb0f63c42e17f3fc8d7b63bb1b0303fd9d8583e8d8c0c3e0000803f0000a0c0d9ade83e000000c0839c1bbedc057d3f26cdb43bb1b0303fd9d8583e8d8c0c3e0000803f0000a0c022d2e53e000080bf839c1bbedc057d3f26cdb43bb0af2f3fd9d8583e8d8c0c3e0000803f000080c060451a3f000080bf839c1bbedc057d3f26cdb43bb8b7373fe1e0603e9594143e0000803f0000a0c0d9ade83e000000c0e7d1c3bdc47b7e3f06ab53bdb1b0303fd9d8583e8d8c0c3e0000803f000080c060451a3f000080bfe7d1c3bdc47b7e3f06ab53bdb8b7373fe1e0603e9594143e0000803f000080c081f60c3f000000c0e7d1c3bdc47b7e3f06ab53bdb5b4343fdddc5c3e9190103e0000803f000080c081f60c3f000000c0803e763c3ca07f3f499e54bdb5b4343fdddc5c3e9190103e0000803f000080c060451a3f000080bf803e763c3ca07f3f499e54bdb8b7373fe1e0603e9594143e0000803f000040c0f56a163f000080bf803e763c3ca07f3f499e54bdb7b6363fe1e0603e9190103e0000803f000080c081f60c3f000000c074de773df7507e3f7f13c7bdb5b4343fdddc5c3e9190103e0000803f000040c0f56a163f000080bf74de773df7507e3f7f13c7bdb7b6363fe1e0603e9190103e0000803f000040c0b0bcfa3e000000c074de773df7507e3f7f13c7bdb2b1313fd9d8583e8d8c0c3e0000803f000040c0b0bcfa3e000000c01c1b553e6d34793f3013c3bdb2b1313fd9d8583e8d8c0c3e0000803f000040c0f56a163f000080bf1c1b553e6d34793f3013c3bdb7b6363fe1e0603e9190103e0000803f000000c09160bf3e000080bf1c1b553e6d34793f3013c3bdacab2b3fd1d0503e8988083e0000803f000040c0b0bcfa3e000000c001235c3e16a3783fc7a9d1bdb2b1313fd9d8583e8d8c0c3e0000803f000000c09160bf3e000080bf01235c3e16a3783fc7a9d1bdacab2b3fd1d0503e8988083e0000803f000000c0c268893e000000c001235c3e16a3783fc7a9d1bda7a6263fcdcc4c3e8584043e0000803f000000c0c268893e000000c0b821be3d777d7d3f6ac1d5bda7a6263fcdcc4c3e8584043e0000803f000000c09160bf3e000080bfb821be3d777d7d3f6ac1d5bdacab2b3fd1d0503e8988083e0000803f000080bfa75f8f3e000080bfb821be3d777d7d3f6ac1d5bda8a7273fcdcc4c3e8584043e0000803f000000c0c268893e000000c0cfbb943d99697e3f8371acbda7a6263fcdcc4c3e8584043e0000803f000080bfa75f8f3e000080bfcfbb943d99697e3f8371acbda8a7273fcdcc4c3e8584043e0000803f000080bfd1fc473e000000c0cfbb943d99697e3f8371acbda3a2223fc9c8483e8180003e0000803f000080bfd1fc473e000000c02d0d0ebea69e7c3f6f3aabbda3a2223fc9c8483e8180003e0000803f000080bfa75f8f3e000080bf2d0d0ebea69e7c3f6f3aabbda8a7273fcdcc4c3e8584043e0000803f000000008a59d73e000080bf2d0d0ebea69e7c3f6f3aabbdafae2e3fd5d4543e8d8c0c3e0000803f000080bfd1fc473e000000c08c8212bec28d7c3f3e31a2bda3a2223fc9c8483e8180003e0000803f000000008a59d73e000080bf8c8212bec28d7c3f3e31a2bdafae2e3fd5d4543e8d8c0c3e0000803f00000000953fae3e000000c08c8212bec28d7c3f3e31a2bdabaa2a3fd1d0503e8988083e0000803f00000000953fae3e000000c0ce2721bec9ff7b3f11d6a1bdabaa2a3fd1d0503e8988083e0000803f000000008a59d73e000080bfce2721bec9ff7b3f11d6a1bdafae2e3fd5d4543e8d8c0c3e0000803f0000803f789a143f000080bfce2721bec9ff7b3f11d6a1bdb7b6363fe1e0603e9190103e0000803f00000000953fae3e000000c069b52abe36ca7b3feb538ebdabaa2a3fd1d0503e8988083e0000803f0000803f789a143f000080bf69b52abe36ca7b3feb538ebdb7b6363fe1e0603e9190103e0000803f0000803fd383023f000000c069b52abe36ca7b3feb538ebdb3b2323fdddc5c3e9190103e0000803f0000803fd383023f000000c08db027bd36267f3f0c3a90bdb3b2323fdddc5c3e9190103e0000803f0000803f789a143f000080bf8db027bd36267f3f0c3a90bdb7b6363fe1e0603e9190103e0000803f00000040731e1f3f000080bf8db027bd36267f3f0c3a90bdb9b8383fe1e0603e9594143e0000803f0000803fd383023f000000c0b9787bbd48327f3f81c14cbdb3b2323fdddc5c3e9190103e0000803f00000040731e1f3f000080bfb9787bbd48327f3f81c14cbdb9b8383fe1e0603e9594143e0000803f000000400a48123f000000c0b9787bbd48327f3f81c14cbdb7b6363fe1e0603e9190103e0000803f000000400a48123f000000c0b1716b3d88417f3fbecd4cbdb7b6363fe1e0603e9190103e0000803f00000040731e1f3f000080bfb1716b3d88417f3fbecd4cbdb9b8383fe1e0603e9594143e0000803f000040405d5c103f000080bfb1716b3d88417f3fbecd4cbdb6b5353fe1e0603e9190103e0000803f000000400a48123f000000c0b09f313d20987f3f58f112bdb7b6363fe1e0603e9190103e0000803f000040405d5c103f000080bfb09f313d20987f3f58f112bdb6b5353fe1e0603e9190103e0000803f000040408c29073f000000c0b09f313d20987f3f58f112bdb4b3333fdddc5c3e9190103e0000803f000040408c29073f000000c02e2e4b3cb3d07f3fde1113bdb4b3333fdddc5c3e9190103e0000803f000040405d5c103f000080bf2e2e4b3cb3d07f3fde1113bdb6b5353fe1e0603e9190103e0000803f000080400e2f0d3f000080bf2e2e4b3cb3d07f3fde1113bdb6b5353fdddc5c3e9190103e0000803f000040408c29073f000000c059a30b3cfddb7f3f693303bdb4b3333fdddc5c3e9190103e0000803f000080400e2f0d3f000080bf59a30b3cfddb7f3f693303bdb6b5353fdddc5c3e9190103e0000803f00008040b0fa043f000000c059a30b3cfddb7f3f693303bdb4b3333fdddc5c3e9190103e0000803f00008040b0fa043f000000c0c4e925bc03db7f3fe93203bdb4b3333fdddc5c3e9190103e0000803f000080400e2f0d3f000080bfc4e925bc03db7f3fe93203bdb6b5353fdddc5c3e9190103e0000803f0000a04015c70f3f000080bfc4e925bc03db7f3fe93203bdb6b5353fdddc5c3e9190103e0000803f00008040b0fa043f000000c0a3e4aebd99d27e3f61ce313db4b3333fdddc5c3e9190103e0000803f0000a04015c70f3f000080bfa3e4aebd99d27e3f61ce313db6b5353fdddc5c3e9190103e0000803f0000a04020f11a3f000000c0a3e4aebd99d27e3f61ce313db8b7373fe1e0603e9594143e0000803f0000a04020f11a3f000000c00d5895bce3b67f3fac6d323db8b7373fe1e0603e9594143e0000803f0000a04015c70f3f000080bf0d5895bce3b67f3fac6d323db6b5353fdddc5c3e9190103e0000803f0000c0402b73143f000080bf0d5895bce3b67f3fac6d323db7b6363fe1e0603e9190103e0000803f0000a04020f11a3f000000c0eda012be2db0793fd9f42b3eb8b7373fe1e0603e9594143e0000803f0000c0402b73143f000080bfeda012be2db0793fd9f42b3eb7b6363fe1e0603e9190103e0000803f0000c0409486403f000000c0eda012be2db0793fd9f42b3ec0bf3f3fedec6c3e9998183e0000803f0000c0409486403f000000c072a007bc86477c3fafbd2d3ec0bf3f3fedec6c3e9998183e0000803f0000c0402b73143f000080bf72a007bc86477c3fafbd2d3eb7b6363fe1e0603e9190103e0000803f0000e040ad99163f000080bf72a007bc86477c3fafbd2d3eb7b6363fe1e0603e9190103e0000803f0000c0409486403f000000c01cb65fbdd9a8793fd6795b3ec0bf3f3fedec6c3e9998183e0000803f0000e040ad99163f000080bf1cb65fbdd9a8793fd6795b3eb7b6363fe1e0603e9190103e0000803f0000e040dddc4e3f000000c01cb65fbdd9a8793fd6795b3ec3c2423fedec6c3e9d9c1c3e0000803f0000e040dddc4e3f000000c0947aff3b71067a3f1dcc5b3ec3c2423fedec6c3e9d9c1c3e0000803f0000e040ad99163f000080bf947aff3b71067a3f1dcc5b3eb7b6363fe1e0603e9190103e0000803f00000041828e143f000080bf947aff3b71067a3f1dcc5b3eb7b6363fe1e0603e9190103e0000803f0000e040dddc4e3f000000c05ef54a3d87c17b3f459e323ec3c2423fedec6c3e9d9c1c3e0000803f00000041828e143f000080bf5ef54a3d87c17b3f459e323eb7b6363fe1e0603e9190103e0000803f00000041c9f6413f000000c05ef54a3d87c17b3f459e323ec0bf3f3fedec6c3e9998183e0000803f00000041c9f6413f000000c0fb4ff43dff437a3f938f313ec0bf3f3fedec6c3e9998183e0000803f00000041828e143f000080bffb4ff43dff437a3f938f313eb7b6363fe1e0603e9190103e0000803f00001041c0a2ea3e000080bffb4ff43dff437a3f938f313eb1b0303fd9d8583e8d8c0c3e0000803f00000041c9f6413f000000c04519433ea5f4793f887ed03dc0bf3f3fedec6c3e9998183e0000803f00001041c0a2ea3e000080bf4519433ea5f4793f887ed03db1b0303fd9d8583e8d8c0c3e0000803f000010418702103f000000c04519433ea5f4793f887ed03db6b5353fe1e0603e9190103e0000803f000010418702103f000000c04a90123e89ff7b3fb032d23db6b5353fe1e0603e9190103e0000803f00001041c0a2ea3e000080bf4a90123e89ff7b3fb032d23db1b0303fd9d8583e8d8c0c3e0000803f00002041b030a03e000080bf4a90123e89ff7b3fb032d23da9a8283fd1d0503e8988083e0000803f000010418702103f000000c0f595723e60b5783f4d54b93bb6b5353fe1e0603e9190103e0000803f00002041b030a03e000080bff595723e60b5783f4d54b93ba9a8283fd1d0503e8988083e0000803f00002041bd2ba33e000000c0f595723e60b5783f4d54b93baaa9293fd1d0503e8988083e0000803f000020c1c798153f000080bf36dd24bb6bf37b3f5c63353eb7b6363fe1e0603e9190103e0000803f000020c1bd0acf3e0000000036dd24bb6bf37b3f5c63353eaead2d3fd5d4543e8d8c0c3e0000803f000010c1c459d03e0000000036dd24bb6bf37b3f5c63353eaead2d3fd5d4543e8d8c0c3e0000803f000020c1c798153f000080bff9d1e9baddfb7b3f8aa9343eb7b6363fe1e0603e9190103e0000803f000010c1c459d03e00000000f9d1e9baddfb7b3f8aa9343eaead2d3fd5d4543e8d8c0c3e0000803f000010c18d0f163f000080bff9d1e9baddfb7b3f8aa9343eb7b6363fe1e0603e9190103e0000803f000010c18d0f163f000080bf36be063bd5fb7b3f84a9343eb7b6363fe1e0603e9190103e0000803f000010c1c459d03e0000000036be063bd5fb7b3f84a9343eaead2d3fd5d4543e8d8c0c3e0000803f000000c1fc47cf3e0000000036be063bd5fb7b3f84a9343eaead2d3fd5d4543e8d8c0c3e0000803f000010c18d0f163f000080bf6d2f633b910b7c3f2943333eb7b6363fe1e0603e9190103e0000803f000000c1fc47cf3e000000006d2f633b910b7c3f2943333eaead2d3fd5d4543e8d8c0c3e0000803f000000c1cd28153f000080bf6d2f633b910b7c3f2943333eb7b6363fe1e0603e9190103e0000803f000000c1cd28153f000080bf8180b93db9027b3fcc86323eb7b6363fe1e0603e9190103e0000803f000000c1fc47cf3e000000008180b93db9027b3fcc86323eaead2d3fd5d4543e8d8c0c3e0000803f0000e0c0e0fb9f3e000000008180b93db9027b3fcc86323ea9a8283fcdcc4c3e8988083e0000803f000000c1cd28153f000080bf8064c23dbb187b3f952c2e3eb7b6363fe1e0603e9190103e0000803f0000e0c0e0fb9f3e000000008064c23dbb187b3f952c2e3ea9a8283fcdcc4c3e8988083e0000803f0000e0c087c5f83e000080bf8064c23dbb187b3f952c2e3eb2b1313fd9d8583e8d8c0c3e0000803f0000e0c087c5f83e000080bfa307b53d843f7b3f7c472e3eb2b1313fd9d8583e8d8c0c3e0000803f0000e0c0e0fb9f3e00000000a307b53d843f7b3f7c472e3ea9a8283fcdcc4c3e8988083e0000803f0000c0c0afbd633e00000000a307b53d843f7b3f7c472e3ea5a4243fc9c8483e8584043e0000803f0000e0c087c5f83e000080bfe2b9ca3dce6f7b3f41a1233eb2b1313fd9d8583e8d8c0c3e0000803f0000c0c0afbd633e00000000e2b9ca3dce6f7b3f41a1233ea5a4243fc9c8483e8584043e0000803f0000c0c0962bc53e000080bfe2b9ca3dce6f7b3f41a1233eadac2c3fd5d4543e8988083e0000803f0000c0c0962bc53e000080bfa7ee96bd97fd7b3f85fd233eadac2c3fd5d4543e8988083e0000803f0000c0c0afbd633e00000000a7ee96bd97fd7b3f85fd233ea5a4243fc9c8483e8584043e0000803f0000a0c03334983e00000000a7ee96bd97fd7b3f85fd233ea9a8283fcdcc4c3e8584043e0000803f0000c0c0962bc53e000080bfffde80bd489b7c3f172d193eadac2c3fd5d4543e8988083e0000803f0000a0c03334983e00000000ffde80bd489b7c3f172d193ea9a8283fcdcc4c3e8584043e0000803f0000a0c022d2e53e000080bfffde80bd489b7c3f172d193eb0af2f3fd9d8583e8d8c0c3e0000803f0000a0c022d2e53e000080bfe57121be4ff1793f8e8f173eb0af2f3fd9d8583e8d8c0c3e0000803f0000a0c03334983e00000000e57121be4ff1793f8e8f173ea9a8283fcdcc4c3e8584043e0000803f000080c0f7e1ea3e00000000e57121be4ff1793f8e8f173eb1b0303fd9d8583e8d8c0c3e0000803f0000a0c022d2e53e000080bf61101abec0817a3f5328103eb0af2f3fd9d8583e8d8c0c3e0000803f000080c0f7e1ea3e0000000061101abec0817a3f5328103eb1b0303fd9d8583e8d8c0c3e0000803f000080c060451a3f000080bf61101abec0817a3f5328103eb8b7373fe1e0603e9594143e0000803f000080c060451a3f000080bf9c7259bda9087d3f999c113eb8b7373fe1e0603e9594143e0000803f000080c0f7e1ea3e000000009c7259bda9087d3f999c113eb1b0303fd9d8583e8d8c0c3e0000803f000040c0ee30033f000000009c7259bda9087d3f999c113eb4b3333fdddc5c3e9190103e0000803f000080c060451a3f000080bf5ce2753c96407f3f365d993db8b7373fe1e0603e9594143e0000803f000040c0ee30033f000000005ce2753c96407f3f365d993db4b3333fdddc5c3e9190103e0000803f000040c0f56a163f000080bf5ce2753c96407f3f365d993db7b6363fe1e0603e9190103e0000803f000040c0f56a163f000080bfa78c9b3d2c8b7e3f36f0983db7b6363fe1e0603e9190103e0000803f000040c0ee30033f00000000a78c9b3d2c8b7e3f36f0983db4b3333fdddc5c3e9190103e0000803f000000c0bd45df3e00000000a78c9b3d2c8b7e3f36f0983db0af2f3fd5d4543e8d8c0c3e0000803f000040c0f56a163f000080bfe1ae553e3ae1793fbb0f79bdb7b6363fe1e0603e9190103e0000803f000000c0bd45df3e00000000e1ae553e3ae1793fbb0f79bdb0af2f3fd5d4543e8d8c0c3e0000803f000000c09160bf3e000080bfe1ae553e3ae1793fbb0f79bdacab2b3fd1d0503e8988083e0000803f000000c09160bf3e000080bfc78d9b3a29817f3ff3aa7ebdacab2b3fd1d0503e8988083e0000803f000000c0bd45df3e00000000c78d9b3a29817f3ff3aa7ebdb0af2f3fd5d4543e8d8c0c3e0000803f000080bfe2a9de3e00000000c78d9b3a29817f3ff3aa7ebdb0af2f3fd5d4543e8d8c0c3e0000803f000000c09160bf3e000080bf70f1bc3dcae77b3f250b1cbeacab2b3fd1d0503e8988083e0000803f000080bfe2a9de3e0000000070f1bc3dcae77b3f250b1cbeb0af2f3fd5d4543e8d8c0c3e0000803f000080bfa75f8f3e000080bf70f1bc3dcae77b3f250b1cbea8a7273fcdcc4c3e8584043e0000803f000080bfa75f8f3e000080bf6c0b15be4e4a7a3f030b1bbea8a7273fcdcc4c3e8584043e0000803f000080bfe2a9de3e000000006c0b15be4e4a7a3f030b1bbeb0af2f3fd5d4543e8d8c0c3e0000803f000000006771153f000000006c0b15be4e4a7a3f030b1bbeb7b6363fe1e0603e9190103e0000803f000080bfa75f8f3e000080bfc3b90cbe0c437a3fdb5323bea8a7273fcdcc4c3e8584043e0000803f000000006771153f00000000c3b90cbe0c437a3fdb5323beb7b6363fe1e0603e9190103e0000803f000000008a59d73e000080bfc3b90cbe0c437a3fdb5323beafae2e3fd5d4543e8d8c0c3e0000803f000000008a59d73e000080bfa78ac0bd448a7b3f682924beafae2e3fd5d4543e8d8c0c3e0000803f000000006771153f00000000a78ac0bd448a7b3f682924beb7b6363fe1e0603e9190103e0000803f0000803ffaef2d3f00000000a78ac0bd448a7b3f682924bebcbb3b3fe5e4643e9594143e0000803f000000008a59d73e000080bf06e520be5d977b3f892ec7bdafae2e3fd5d4543e8d8c0c3e0000803f0000803ffaef2d3f0000000006e520be5d977b3f892ec7bdbcbb3b3fe5e4643e9594143e0000803f0000803f789a143f000080bf06e520be5d977b3f892ec7bdb7b6363fe1e0603e9190103e0000803f0000803f789a143f000080bf716ac23dea9a7d3fb1c6c8bdb7b6363fe1e0603e9190103e0000803f0000803ffaef2d3f00000000716ac23dea9a7d3fb1c6c8bdbcbb3b3fe5e4643e9594143e0000803f00000040ec67153f00000000716ac23dea9a7d3fb1c6c8bdb7b6363fe1e0603e9190103e0000803f0000803f789a143f000080bf81fc27bdc7997f3f622a1b3db7b6363fe1e0603e9190103e0000803f00000040ec67153f0000000081fc27bdc7997f3f622a1b3db7b6363fe1e0603e9190103e0000803f00000040731e1f3f000080bf81fc27bdc7997f3f622a1b3db9b8383fe1e0603e9594143e0000803f00000040731e1f3f000080bfdb4a1a3e34e57c3ff285193db9b8383fe1e0603e9594143e0000803f00000040ec67153f00000000db4a1a3e34e57c3ff285193db7b6363fe1e0603e9190103e0000803f00004040f6b7dc3e00000000db4a1a3e34e57c3ff285193dafae2e3fd5d4543e8d8c0c3e0000803f00000040731e1f3f000080bf88b1693da95b7d3f369a063eb9b8383fe1e0603e9594143e0000803f00004040f6b7dc3e0000000088b1693da95b7d3f369a063eafae2e3fd5d4543e8d8c0c3e0000803f000040405d5c103f000080bf88b1693da95b7d3f369a063eb6b5353fe1e0603e9190103e0000803f000040405d5c103f000080bf0fb0bc3c40b47d3f46c9063eb6b5353fe1e0603e9190103e0000803f00004040f6b7dc3e000000000fb0bc3c40b47d3f46c9063eafae2e3fd5d4543e8d8c0c3e0000803f00008040a3d1d03e000000000fb0bc3c40b47d3f46c9063eaead2d3fd5d4543e8d8c0c3e0000803f000040405d5c103f000080bffc3e493c38617d3f8497113eb6b5353fe1e0603e9190103e0000803f00008040a3d1d03e00000000fc3e493c38617d3f8497113eaead2d3fd5d4543e8d8c0c3e0000803f000080400e2f0d3f000080bffc3e493c38617d3f8497113eb6b5353fdddc5c3e9190103e0000803f000080400e2f0d3f000080bf6d10173bf1657d3f3a9a113eb6b5353fdddc5c3e9190103e0000803f00008040a3d1d03e000000006d10173bf1657d3f3a9a113eaead2d3fd5d4543e8d8c0c3e0000803f0000a04068a0cf3e000000006d10173bf1657d3f3a9a113eaead2d3fd5d4543e8d8c0c3e0000803f000080400e2f0d3f000080bf130324bc7cec7c3fc2ef1d3eb6b5353fdddc5c3e9190103e0000803f0000a04068a0cf3e00000000130324bc7cec7c3fc2ef1d3eaead2d3fd5d4543e8d8c0c3e0000803f0000a04015c70f3f000080bf130324bc7cec7c3fc2ef1d3eb6b5353fdddc5c3e9190103e0000803f0000a04015c70f3f000080bfb125893b29ef7c3f6ef11d3eb6b5353fdddc5c3e9190103e0000803f0000a04068a0cf3e00000000b125893b29ef7c3f6ef11d3eaead2d3fd5d4543e8d8c0c3e0000803f0000c0402b75cd3e00000000b125893b29ef7c3f6ef11d3eaead2d3fd5d4543e8988083e0000803f0000a04015c70f3f000080bf782893bcbff87b3f9e01343eb6b5353fdddc5c3e9190103e0000803f0000c0402b75cd3e00000000782893bcbff87b3f9e01343eaead2d3fd5d4543e8988083e0000803f0000c0402b73143f000080bf782893bcbff87b3f9e01343eb7b6363fe1e0603e9190103e0000803f0000c0402b73143f000080bfa9cb013b06037c3ff608343eb7b6363fe1e0603e9190103e0000803f0000c0402b75cd3e00000000a9cb013b06037c3ff608343eaead2d3fd5d4543e8988083e0000803f0000e040786dcc3e00000000a9cb013b06037c3ff608343eaead2d3fd5d4543e8988083e0000803f0000c0402b73143f000080bf5d3a07bca4897b3f192c3e3eb7b6363fe1e0603e9190103e0000803f0000e040786dcc3e000000005d3a07bca4897b3f192c3e3eaead2d3fd5d4543e8988083e0000803f0000e040ad99163f000080bf5d3a07bca4897b3f192c3e3eb7b6363fe1e0603e9190103e0000803f0000e040ad99163f000080bf12b70d3baf8b7b3fa52d3e3eb7b6363fe1e0603e9190103e0000803f0000e040786dcc3e0000000012b70d3baf8b7b3fa52d3e3eaead2d3fd5d4543e8988083e0000803f00000041054dcb3e0000000012b70d3baf8b7b3fa52d3e3eaead2d3fd5d4543e8988083e0000803f0000e040ad99163f000080bf75a5003cddcc7b3f038c383eb7b6363fe1e0603e9190103e0000803f00000041054dcb3e0000000075a5003cddcc7b3f038c383eaead2d3fd5d4543e8988083e0000803f00000041828e143f000080bf75a5003cddcc7b3f038c383eb7b6363fe1e0603e9190103e0000803f00000041828e143f000080bf0a74993da4197b3fa908383eb7b6363fe1e0603e9190103e0000803f00000041054dcb3e000000000a74993da4197b3fa908383eaead2d3fd5d4543e8988083e0000803f000010415e30a43e000000000a74993da4197b3fa908383eaaa9293fd1d0503e8988083e0000803f00000041828e143f000080bfd7c9f53d11c77b3fdb910a3eb7b6363fe1e0603e9190103e0000803f000010415e30a43e00000000d7c9f53d11c77b3fdb910a3eaaa9293fd1d0503e8988083e0000803f00001041c0a2ea3e000080bfd7c9f53d11c77b3fdb910a3eb1b0303fd9d8583e8d8c0c3e0000803f00001041c0a2ea3e000080bf67b8653d25367d3fe25b0b3eb1b0303fd9d8583e8d8c0c3e0000803f000010415e30a43e0000000067b8653d25367d3fe25b0b3eaaa9293fd1d0503e8988083e0000803f000020415d28873e0000000067b8653d25367d3fe25b0b3ea7a6263fcdcc4c3e8584043e0000803f00001041c0a2ea3e000080bf692b133e3f0a7d3fd4f1453db1b0303fd9d8583e8d8c0c3e0000803f000020415d28873e00000000692b133e3f0a7d3fd4f1453da7a6263fcdcc4c3e8584043e0000803f00002041b030a03e000080bf692b133e3f0a7d3fd4f1453da9a8283fd1d0503e8988083e0000803f000020c1bd0acf3e00000000cf9f94bdb8607d3f47c8fb3daead2d3fd5d4543e8d8c0c3e0000803f000020c1e8718f3e0000803fcf9f94bdb8607d3f47c8fb3da8a7273fcdcc4c3e8584043e0000803f000010c14cfcb43e0000803fcf9f94bdb8607d3f47c8fb3dabaa2a3fd1d0503e8988083e0000803f000020c1bd0acf3e000000003e4627bb62a27f3fb19b5a3daead2d3fd5d4543e8d8c0c3e0000803f000010c14cfcb43e0000803f3e4627bb62a27f3fb19b5a3dabaa2a3fd1d0503e8988083e0000803f000010c1c459d03e000000003e4627bb62a27f3fb19b5a3daead2d3fd5d4543e8d8c0c3e0000803f000010c1c459d03e00000000fe6824bdda6d7f3fc56e5a3daead2d3fd5d4543e8d8c0c3e0000803f000010c14cfcb43e0000803ffe6824bdda6d7f3fc56e5a3dabaa2a3fd1d0503e8988083e0000803f000000c12e95c93e0000803ffe6824bdda6d7f3fc56e5a3dadac2c3fd5d4543e8988083e0000803f000010c1c459d03e00000000c1e1083bccfb7f3fc256363caead2d3fd5d4543e8d8c0c3e0000803f000000c12e95c93e0000803fc1e1083bccfb7f3fc256363cadac2c3fd5d4543e8988083e0000803f000000c1fc47cf3e00000000c1e1083bccfb7f3fc256363caead2d3fd5d4543e8d8c0c3e0000803f000000c1fc47cf3e0000000061afaf3d610a7f3fcbaa353caead2d3fd5d4543e8d8c0c3e0000803f000000c12e95c93e0000803f61afaf3d610a7f3fcbaa353cadac2c3fd5d4543e8988083e0000803f0000e0c0097f9d3e0000803f61afaf3d610a7f3fcbaa353ca9a8283fcdcc4c3e8988083e0000803f000000c1fc47cf3e000000008962bc3d63e97e3f7a889e3baead2d3fd5d4543e8d8c0c3e0000803f0000e0c0097f9d3e0000803f8962bc3d63e97e3f7a889e3ba9a8283fcdcc4c3e8988083e0000803f0000e0c0e0fb9f3e000000008962bc3d63e97e3f7a889e3ba9a8283fcdcc4c3e8988083e0000803f0000e0c0e0fb9f3e00000000ca5f0f3eac797d3fcaa39d3ba9a8283fcdcc4c3e8988083e0000803f0000e0c0097f9d3e0000803fca5f0f3eac797d3fcaa39d3ba9a8283fcdcc4c3e8988083e0000803f0000c0c0b2302a3e0000803fca5f0f3eac797d3fcaa39d3ba2a1213fc5c4443e8180003e0000803f0000e0c0e0fb9f3e00000000446cb73dc9917e3fa4ea643da9a8283fcdcc4c3e8988083e0000803f0000c0c0b2302a3e0000803f446cb73dc9917e3fa4ea643da2a1213fc5c4443e8180003e0000803f0000c0c0afbd633e00000000446cb73dc9917e3fa4ea643da5a4243fc9c8483e8584043e0000803f0000c0c0afbd633e000000004d4ba9bcc48a7f3f88ca653da5a4243fc9c8483e8584043e0000803f0000c0c0b2302a3e0000803f4d4ba9bcc48a7f3f88ca653da2a1213fc5c4443e8180003e0000803f0000a0c0d1633f3e0000803f4d4ba9bcc48a7f3f88ca653da3a2223fc5c4443e8180003e0000803f0000c0c0afbd633e00000000ebfc97bdd2c07d3f4f0de03da5a4243fc9c8483e8584043e0000803f0000a0c0d1633f3e0000803febfc97bdd2c07d3f4f0de03da3a2223fc5c4443e8180003e0000803f0000a0c03334983e00000000ebfc97bdd2c07d3f4f0de03da9a8283fcdcc4c3e8584043e0000803f0000a0c03334983e000000006a5d1cbe86787b3f6709de3da9a8283fcdcc4c3e8584043e0000803f0000a0c0d1633f3e0000803f6a5d1cbe86787b3f6709de3da3a2223fc5c4443e8180003e0000803f000080c01949af3e0000803f6a5d1cbe86787b3f6709de3dabaa2a3fd1d0503e8988083e0000803f0000a0c03334983e00000000f52c22bee8127b3f22cde93da9a8283fcdcc4c3e8584043e0000803f000080c01949af3e0000803ff52c22bee8127b3f22cde93dabaa2a3fd1d0503e8988083e0000803f000080c0f7e1ea3e00000000f52c22bee8127b3f22cde93db1b0303fd9d8583e8d8c0c3e0000803f000080c0f7e1ea3e0000000032f3cfbd0af87c3fe490eb3db1b0303fd9d8583e8d8c0c3e0000803f000080c01949af3e0000803f32f3cfbd0af87c3fe490eb3dabaa2a3fd1d0503e8988083e0000803f000040c05de5e33e0000803f32f3cfbd0af87c3fe490eb3db0af2f3fd9d8583e8d8c0c3e0000803f000080c0f7e1ea3e00000000532f5bbd270e7f3faa6f893db1b0303fd9d8583e8d8c0c3e0000803f000040c05de5e33e0000803f532f5bbd270e7f3faa6f893db0af2f3fd9d8583e8d8c0c3e0000803f000040c0ee30033f00000000532f5bbd270e7f3faa6f893db4b3333fdddc5c3e9190103e0000803f000040c0ee30033f00000000cb71e6bcf7517f3f3494893db4b3333fdddc5c3e9190103e0000803f000040c05de5e33e0000803fcb71e6bcf7517f3f3494893db0af2f3fd9d8583e8d8c0c3e0000803f000000c04b56f23e0000803fcb71e6bcf7517f3f3494893db2b1313fd9d8583e8d8c0c3e0000803f000040c0ee30033f00000000a9e09b3da5147f3f38f817bdb4b3333fdddc5c3e9190103e0000803f000000c04b56f23e0000803fa9e09b3da5147f3f38f817bdb2b1313fd9d8583e8d8c0c3e0000803f000000c0bd45df3e00000000a9e09b3da5147f3f38f817bdb0af2f3fd5d4543e8d8c0c3e0000803f000000c0bd45df3e000000002f8b91bd062d7f3fbf0618bdb0af2f3fd5d4543e8d8c0c3e0000803f000000c04b56f23e0000803f2f8b91bd062d7f3fbf0618bdb2b1313fd9d8583e8d8c0c3e0000803f000080bf966b0b3f0000803f2f8b91bd062d7f3fbf0618bdb5b4343fdddc5c3e9190103e0000803f000000c0bd45df3e00000000f5ec9a3a01797e3ff45ddfbdb0af2f3fd5d4543e8d8c0c3e0000803f000080bf966b0b3f0000803ff5ec9a3a01797e3ff45ddfbdb5b4343fdddc5c3e9190103e0000803f000080bfe2a9de3e00000000f5ec9a3a01797e3ff45ddfbdb0af2f3fd5d4543e8d8c0c3e0000803f000080bfe2a9de3e0000000069fe1cbede767b3ff4b9dcbdb0af2f3fd5d4543e8d8c0c3e0000803f000080bf966b0b3f0000803f69fe1cbede767b3ff4b9dcbdb5b4343fdddc5c3e9190103e0000803f000000006b60333f0000803f69fe1cbede767b3ff4b9dcbdbdbc3c3fe9e8683e9594143e0000803f000080bfe2a9de3e00000000d9c815be67887b3f604aebbdb0af2f3fd5d4543e8d8c0c3e0000803f000000006b60333f0000803fd9c815be67887b3f604aebbdbdbc3c3fe9e8683e9594143e0000803f000000006771153f00000000d9c815be67887b3f604aebbdb7b6363fe1e0603e9190103e0000803f000000006771153f00000000d7af86bd9eb77d3f7a55edbdb7b6363fe1e0603e9190103e0000803f000000006b60333f0000803fd7af86bd9eb77d3f7a55edbdbdbc3c3fe9e8683e9594143e0000803f0000803f2d5d443f0000803fd7af86bd9eb77d3f7a55edbdc1c0403fedec6c3e9998183e0000803f000000006771153f00000000bb53c2bd66df7d3fecebb1bdb7b6363fe1e0603e9190103e0000803f0000803f2d5d443f0000803fbb53c2bd66df7d3fecebb1bdc1c0403fedec6c3e9998183e0000803f0000803ffaef2d3f00000000bb53c2bd66df7d3fecebb1bdbcbb3b3fe5e4643e9594143e0000803f0000803ffaef2d3f0000000069921f3e67e87b3f688bb0bdbcbb3b3fe5e4643e9594143e0000803f0000803f2d5d443f0000803f69921f3e67e87b3f688bb0bdc1c0403fedec6c3e9998183e0000803f00000040acd21b3f0000803f69921f3e67e87b3f688bb0bdb8b7373fe1e0603e9594143e0000803f0000803ffaef2d3f00000000c84bc33ddcc07e3f0258ccbcbcbb3b3fe5e4643e9594143e0000803f00000040acd21b3f0000803fc84bc33ddcc07e3f0258ccbcb8b7373fe1e0603e9594143e0000803f00000040ec67153f00000000c84bc33ddcc07e3f0258ccbcb7b6363fe1e0603e9190103e0000803f00000040ec67153f0000000071c4443e81267b3f2b74c9bcb7b6363fe1e0603e9190103e0000803f00000040acd21b3f0000803f71c4443e81267b3f2b74c9bcb8b7373fe1e0603e9594143e0000803f00004040ca5cd33e0000803f71c4443e81267b3f2b74c9bcaead2d3fd5d4543e8d8c0c3e0000803f00000040ec67153f0000000030601a3e2a087d3f6ef6933cb7b6363fe1e0603e9190103e0000803f00004040ca5cd33e0000803f30601a3e2a087d3f6ef6933caead2d3fd5d4543e8d8c0c3e0000803f00004040f6b7dc3e0000000030601a3e2a087d3f6ef6933cafae2e3fd5d4543e8d8c0c3e0000803f00004040f6b7dc3e00000000bc1df43cf6d77f3f569b953cafae2e3fd5d4543e8d8c0c3e0000803f00004040ca5cd33e0000803fbc1df43cf6d77f3f569b953caead2d3fd5d4543e8d8c0c3e0000803f000080408b18c43e0000803fbc1df43cf6d77f3f569b953cadac2c3fd5d4543e8988083e0000803f00004040f6b7dc3e000000000049be3c1ada7f3f5d73cb3cafae2e3fd5d4543e8d8c0c3e0000803f000080408b18c43e0000803f0049be3c1ada7f3f5d73cb3cadac2c3fd5d4543e8988083e0000803f00008040a3d1d03e000000000049be3c1ada7f3f5d73cb3caead2d3fd5d4543e8d8c0c3e0000803f00008040a3d1d03e00000000c2247c3d866f7f3f9d1ecb3caead2d3fd5d4543e8d8c0c3e0000803f000080408b18c43e0000803fc2247c3d866f7f3f9d1ecb3cadac2c3fd5d4543e8988083e0000803f0000a0401f82a43e0000803fc2247c3d866f7f3f9d1ecb3caaa9293fd1d0503e8988083e0000803f00008040a3d1d03e000000009513183ba8187f3f47ddab3daead2d3fd5d4543e8d8c0c3e0000803f0000a0401f82a43e0000803f9513183ba8187f3f47ddab3daaa9293fd1d0503e8988083e0000803f0000a04068a0cf3e000000009513183ba8187f3f47ddab3daead2d3fd5d4543e8d8c0c3e0000803f0000a04068a0cf3e000000007dc9d93d88a67d3febe3aa3daead2d3fd5d4543e8d8c0c3e0000803f0000a0401f82a43e0000803f7dc9d93d88a67d3febe3aa3daaa9293fd1d0503e8988083e0000803f0000c040491d5b3e0000803f7dc9d93d88a67d3febe3aa3da4a3233fc9c8483e8584043e0000803f0000a04068a0cf3e00000000896f883b389f7b3f56853c3eaead2d3fd5d4543e8d8c0c3e0000803f0000c040491d5b3e0000803f896f883b389f7b3f56853c3ea4a3233fc9c8483e8584043e0000803f0000c0402b75cd3e00000000896f883b389f7b3f56853c3eaead2d3fd5d4543e8988083e0000803f0000c0402b75cd3e0000000048c92f3d6f647b3f4b593c3eaead2d3fd5d4543e8988083e0000803f0000c040491d5b3e0000803f48c92f3d6f647b3f4b593c3ea4a3233fc9c8483e8584043e0000803f0000e040c35c2e3e0000803f48c92f3d6f647b3f4b593c3ea2a1213fc5c4443e8180003e0000803f0000c0402b75cd3e00000000c785003b4b8a793f6793643eaead2d3fd5d4543e8988083e0000803f0000e040c35c2e3e0000803fc785003b4b8a793f6793643ea2a1213fc5c4443e8180003e0000803f0000e040786dcc3e00000000c785003b4b8a793f6793643eaead2d3fd5d4543e8988083e0000803f0000e040786dcc3e00000000a115eabc5570793f9e7b643eaead2d3fd5d4543e8988083e0000803f0000e040c35c2e3e0000803fa115eabc5570793f9e7b643ea2a1213fc5c4443e8180003e0000803f0000004180644c3e0000803fa115eabc5570793f9e7b643ea4a3233fc9c8483e8180003e0000803f0000e040786dcc3e00000000f17d0d3b47267b3fbb60463eaead2d3fd5d4543e8988083e0000803f0000004180644c3e0000803ff17d0d3b47267b3fbb60463ea4a3233fc9c8483e8180003e0000803f00000041054dcb3e00000000f17d0d3b47267b3fbb60463eaead2d3fd5d4543e8988083e0000803f00000041054dcb3e00000000827f06bdc1037b3f7545463eaead2d3fd5d4543e8988083e0000803f0000004180644c3e0000803f827f06bdc1037b3f7545463ea4a3233fc9c8483e8180003e0000803f0000104156af6e3e0000803f827f06bdc1037b3f7545463ea5a4243fc9c8483e8584043e0000803f00000041054dcb3e00000000d3669b3dd1497e3fc02fb23daead2d3fd5d4543e8988083e0000803f0000104156af6e3e0000803fd3669b3dd1497e3fc02fb23da5a4243fc9c8483e8584043e0000803f000010415e30a43e00000000d3669b3dd1497e3fc02fb23daaa9293fd1d0503e8988083e0000803f000010415e30a43e0000000038aab5bdaf047e3f4fffb13daaa9293fd1d0503e8988083e0000803f0000104156af6e3e0000803f38aab5bdaf047e3f4fffb13da5a4243fc9c8483e8584043e0000803f00002041ed1ca53e0000803f38aab5bdaf047e3f4fffb13daaa9293fd1d0503e8988083e0000803f000010415e30a43e00000000ac7b673d90277f3fe4d96ebdaaa9293fd1d0503e8988083e0000803f00002041ed1ca53e0000803fac7b673d90277f3fe4d96ebdaaa9293fd1d0503e8988083e0000803f000020415d28873e00000000ac7b673d90277f3fe4d96ebda7a6263fcdcc4c3e8584043e0000803f000020c1e8718f3e0000803f06a23abec1847b3ff0ed1d3da8a7273fcdcc4c3e8584043e0000803f000020c13db4763e0000004006a23abec1847b3ff0ed1d3da6a5253fc9c8483e8584043e0000803f000010c1c654da3e0000004006a23abec1847b3ff0ed1d3dafae2e3fd5d4543e8d8c0c3e0000803f000020c1e8718f3e0000803f9a5d95bd49a47e3f019794bda8a7273fcdcc4c3e8584043e0000803f000010c1c654da3e000000409a5d95bd49a47e3f019794bdafae2e3fd5d4543e8d8c0c3e0000803f000010c14cfcb43e0000803f9a5d95bd49a47e3f019794bdabaa2a3fd1d0503e8988083e0000803f000010c14cfcb43e0000803f975afcbd41607d3fedd993bdabaa2a3fd1d0503e8988083e0000803f000010c1c654da3e00000040975afcbd41607d3fedd993bdafae2e3fd5d4543e8d8c0c3e0000803f000000c157090d3f00000040975afcbd41607d3fedd993bdb6b5353fdddc5c3e9190103e0000803f000010c14cfcb43e0000803f67a622bdd0b17c3fe4e61ebeabaa2a3fd1d0503e8988083e0000803f000000c157090d3f0000004067a622bdd0b17c3fe4e61ebeb6b5353fdddc5c3e9190103e0000803f000000c12e95c93e0000803f67a622bdd0b17c3fe4e61ebeadac2c3fd5d4543e8988083e0000803f000000c12e95c93e0000803f55c54a3d7e957c3f15d51ebeadac2c3fd5d4543e8988083e0000803f000000c157090d3f0000004055c54a3d7e957c3f15d51ebeb6b5353fdddc5c3e9190103e0000803f0000e0c02131003f0000004055c54a3d7e957c3f15d51ebeb3b2323fdddc5c3e9190103e0000803f000000c12e95c93e0000803fd887ac3d15767a3f057f41beadac2c3fd5d4543e8988083e0000803f0000e0c02131003f00000040d887ac3d15767a3f057f41beb3b2323fdddc5c3e9190103e0000803f0000e0c0097f9d3e0000803fd887ac3d15767a3f057f41bea9a8283fcdcc4c3e8988083e0000803f0000e0c0097f9d3e0000803f6bd4433e32b7763f399a3ebea9a8283fcdcc4c3e8988083e0000803f0000e0c02131003f000000406bd4433e32b7763f399a3ebeb3b2323fdddc5c3e9190103e0000803f0000c0c0c2c89a3e000000406bd4433e32b7763f399a3ebea9a8283fcdcc4c3e8988083e0000803f0000e0c0097f9d3e0000803f5c170e3e07357b3fcdc408bea9a8283fcdcc4c3e8988083e0000803f0000c0c0c2c89a3e000000405c170e3e07357b3fcdc408bea9a8283fcdcc4c3e8988083e0000803f0000c0c0b2302a3e0000803f5c170e3e07357b3fcdc408bea2a1213fc5c4443e8180003e0000803f0000c0c0b2302a3e0000803f6ac9673d2e417d3f2ce209bea2a1213fc5c4443e8180003e0000803f0000c0c0c2c89a3e000000406ac9673d2e417d3f2ce209bea9a8283fcdcc4c3e8988083e0000803f0000a0c05afe7a3e000000406ac9673d2e417d3f2ce209bea6a5253fc9c8483e8584043e0000803f0000c0c0b2302a3e0000803f5a46a9bc4b837f3f00f66dbda2a1213fc5c4443e8180003e0000803f0000a0c05afe7a3e000000405a46a9bc4b837f3f00f66dbda6a5253fc9c8483e8584043e0000803f0000a0c0d1633f3e0000803f5a46a9bc4b837f3f00f66dbda3a2223fc5c4443e8180003e0000803f0000a0c0d1633f3e0000803f283811be04fc7c3f2f9b6bbda3a2223fc5c4443e8180003e0000803f0000a0c05afe7a3e00000040283811be04fc7c3f2f9b6bbda6a5253fc9c8483e8584043e0000803f000080c0d3f8c63e00000040283811be04fc7c3f2f9b6bbdadac2c3fd5d4543e8988083e0000803f0000a0c0d1633f3e0000803fc2201dbeaeb27c3f1b0c3bbda3a2223fc5c4443e8180003e0000803f000080c0d3f8c63e00000040c2201dbeaeb27c3f1b0c3bbdadac2c3fd5d4543e8988083e0000803f000080c01949af3e0000803fc2201dbeaeb27c3f1b0c3bbdabaa2a3fd1d0503e8988083e0000803f000080c01949af3e0000803fbbc0a9bdb6d87e3f3da33cbdabaa2a3fd1d0503e8988083e0000803f000080c0d3f8c63e00000040bbc0a9bdb6d87e3f3da33cbdadac2c3fd5d4543e8988083e0000803f000040c02e9af13e00000040bbc0a9bdb6d87e3f3da33cbdb1b0303fd9d8583e8d8c0c3e0000803f000080c01949af3e0000803fe443d1bda1917e3f3713dabcabaa2a3fd1d0503e8988083e0000803f000040c02e9af13e00000040e443d1bda1917e3f3713dabcb1b0303fd9d8583e8d8c0c3e0000803f000040c05de5e33e0000803fe443d1bda1917e3f3713dabcb0af2f3fd9d8583e8d8c0c3e0000803f000040c05de5e33e0000803fedda5a3cafe27f3ff333dbbcb0af2f3fd9d8583e8d8c0c3e0000803f000040c02e9af13e00000040edda5a3cafe27f3ff333dbbcb1b0303fd9d8583e8d8c0c3e0000803f000000c08ec2ea3e00000040edda5a3cafe27f3ff333dbbcb1b0303fd9d8583e8d8c0c3e0000803f000040c05de5e33e0000803fe5f0e6bcc8de7f3f2a58723cb0af2f3fd9d8583e8d8c0c3e0000803f000000c08ec2ea3e00000040e5f0e6bcc8de7f3f2a58723cb1b0303fd9d8583e8d8c0c3e0000803f000000c04b56f23e0000803fe5f0e6bcc8de7f3f2a58723cb2b1313fd9d8583e8d8c0c3e0000803f000000c04b56f23e0000803f0ada2dbdc5bd7f3fe538723cb2b1313fd9d8583e8d8c0c3e0000803f000000c08ec2ea3e000000400ada2dbdc5bd7f3fe538723cb1b0303fd9d8583e8d8c0c3e0000803f000080bfb841003f000000400ada2dbdc5bd7f3fe538723cb3b2323fdddc5c3e9190103e0000803f000000c04b56f23e0000803fa78191bd511c7f3f04ff313db2b1313fd9d8583e8d8c0c3e0000803f000080bfb841003f00000040a78191bd511c7f3f04ff313db3b2323fdddc5c3e9190103e0000803f000080bf966b0b3f0000803fa78191bd511c7f3f04ff313db5b4343fdddc5c3e9190103e0000803f000080bf966b0b3f0000803f6c9d1bbe53c97c3fe15f303db5b4343fdddc5c3e9190103e0000803f000080bfb841003f000000406c9d1bbe53c97c3fe15f303db3b2323fdddc5c3e9190103e0000803f00000000afa7273f000000406c9d1bbe53c97c3fe15f303dbbba3a3fe5e4643e9594143e0000803f000080bf966b0b3f0000803f94c01dbee0ad7c3ff31c393db5b4343fdddc5c3e9190103e0000803f00000000afa7273f0000004094c01dbee0ad7c3ff31c393dbbba3a3fe5e4643e9594143e0000803f000000006b60333f0000803f94c01dbee0ad7c3ff31c393dbdbc3c3fe9e8683e9594143e0000803f000000006b60333f0000803f78d0d2bda45f7e3fb95a3a3dbdbc3c3fe9e8683e9594143e0000803f00000000afa7273f0000004078d0d2bda45f7e3fb95a3a3dbbba3a3fe5e4643e9594143e0000803f0000803fe02c423f0000004078d0d2bda45f7e3fb95a3a3dc0bf3f3fedec6c3e9998183e0000803f000000006b60333f0000803f759887bdd06d7f3f43c30b3cbdbc3c3fe9e8683e9594143e0000803f0000803fe02c423f00000040759887bdd06d7f3f43c30b3cc0bf3f3fedec6c3e9998183e0000803f0000803f2d5d443f0000803f759887bdd06d7f3f43c30b3cc1c0403fedec6c3e9998183e0000803f0000803f2d5d443f0000803f722ea13d56327f3fb7a20b3cc1c0403fedec6c3e9998183e0000803f0000803fe02c423f00000040722ea13d56327f3fb7a20b3cc0bf3f3fedec6c3e9998183e0000803f00000040d5f62d3f00000040722ea13d56327f3fb7a20b3cbcbb3b3fe5e4643e9594143e0000803f0000803f2d5d443f0000803ffac61f3e633b7c3f6efe8ebdc1c0403fedec6c3e9998183e0000803f00000040d5f62d3f00000040fac61f3e633b7c3f6efe8ebdbcbb3b3fe5e4643e9594143e0000803f00000040acd21b3f0000803ffac61f3e633b7c3f6efe8ebdb8b7373fe1e0603e9594143e0000803f00000040acd21b3f0000803f6a730e3e6ee07c3ffe5b8fbdb8b7373fe1e0603e9594143e0000803f00000040d5f62d3f000000406a730e3e6ee07c3ffe5b8fbdbcbb3b3fe5e4643e9594143e0000803f0000404060e9093f000000406a730e3e6ee07c3ffe5b8fbdb5b4343fdddc5c3e9190103e0000803f00000040acd21b3f0000803f7157433ea054793f2d20fbbdb8b7373fe1e0603e9594143e0000803f0000404060e9093f000000407157433ea054793f2d20fbbdb5b4343fdddc5c3e9190103e0000803f00004040ca5cd33e0000803f7157433ea054793f2d20fbbdaead2d3fd5d4543e8d8c0c3e0000803f00004040ca5cd33e0000803f4c1fd53cafe87d3facbcffbdaead2d3fd5d4543e8d8c0c3e0000803f0000404060e9093f000000404c1fd53cafe87d3facbcffbdb5b4343fdddc5c3e9190103e0000803f000080405b32033f000000404c1fd53cafe87d3facbcffbdb4b3333fdddc5c3e9190103e0000803f00004040ca5cd33e0000803f1b23f23cffc47d3f967003beaead2d3fd5d4543e8d8c0c3e0000803f000080405b32033f000000401b23f23cffc47d3f967003beb4b3333fdddc5c3e9190103e0000803f000080408b18c43e0000803f1b23f23cffc47d3f967003beadac2c3fd5d4543e8988083e0000803f000080408b18c43e0000803f902e0b3e3f867b3fe54602beadac2c3fd5d4543e8988083e0000803f000080405b32033f00000040902e0b3e3f867b3fe54602beb4b3333fdddc5c3e9190103e0000803f0000a0406d90bf3e00000040902e0b3e3f867b3fe54602beacab2b3fd1d0503e8988083e0000803f000080408b18c43e0000803ffdde7b3dd7287f3f86bc57bdadac2c3fd5d4543e8988083e0000803f0000a0406d90bf3e00000040fdde7b3dd7287f3f86bc57bdacab2b3fd1d0503e8988083e0000803f0000a0401f82a43e0000803ffdde7b3dd7287f3f86bc57bdaaa9293fd1d0503e8988083e0000803f0000a0401f82a43e0000803f36d65d3e8592793f310353bdaaa9293fd1d0503e8988083e0000803f0000a0406d90bf3e0000004036d65d3e8592793f310353bdacab2b3fd1d0503e8988083e0000803f0000c04007941b3e0000004036d65d3e8592793f310353bda1a0203fc5c4443e8180003e0000803f0000a0401f82a43e0000803f6f22da3d200e7e3fc3367c3daaa9293fd1d0503e8988083e0000803f0000c04007941b3e000000406f22da3d200e7e3fc3367c3da1a0203fc5c4443e8180003e0000803f0000c040491d5b3e0000803f6f22da3d200e7e3fc3367c3da4a3233fc9c8483e8584043e0000803f0000c040491d5b3e0000803fdd7b7c3dd3057f3fac2c7d3da4a3233fc9c8483e8584043e0000803f0000c04007941b3e00000040dd7b7c3dd3057f3fac2c7d3da1a0203fc5c4443e8180003e0000803f0000e040486eb83d00000040dd7b7c3dd3057f3fac2c7d3d9e9d1d3fc1c0403ef9f8f83d0000803f0000c040491d5b3e0000803f1044323d3cf07e3fd49ca33da4a3233fc9c8483e8584043e0000803f0000e040486eb83d000000401044323d3cf07e3fd49ca33d9e9d1d3fc1c0403ef9f8f83d0000803f0000e040c35c2e3e0000803f1044323d3cf07e3fd49ca33da2a1213fc5c4443e8180003e0000803f0000e040c35c2e3e0000803f7b4ac9bdd6f17d3f91f9a23da2a1213fc5c4443e8180003e0000803f0000e040486eb83d000000407b4ac9bdd6f17d3f91f9a23d9e9d1d3fc1c0403ef9f8f83d0000803f00000041eaac413e000000407b4ac9bdd6f17d3f91f9a23da3a2223fc9c8483e8180003e0000803f0000e040c35c2e3e0000803f1c20f0bc40e07f3f1c642b3ca2a1213fc5c4443e8180003e0000803f00000041eaac413e000000401c20f0bc40e07f3f1c642b3ca3a2223fc9c8483e8180003e0000803f0000004180644c3e0000803f1c20f0bc40e07f3f1c642b3ca4a3233fc9c8483e8180003e0000803f0000004180644c3e0000803ffbe91bbe57007d3f2e77293ca4a3233fc9c8483e8180003e0000803f00000041eaac413e00000040fbe91bbe57007d3f2e77293ca3a2223fc9c8483e8180003e0000803f00001041fcb7af3e00000040fbe91bbe57007d3f2e77293cabaa2a3fd1d0503e8988083e0000803f0000004180644c3e0000803f104508bd3a527e3fb006e0bda4a3233fc9c8483e8180003e0000803f00001041fcb7af3e00000040104508bd3a527e3fb006e0bdabaa2a3fd1d0503e8988083e0000803f0000104156af6e3e0000803f104508bd3a527e3fb006e0bda5a4243fc9c8483e8584043e0000803f0000104156af6e3e0000803f351025be66227b3f0b38ddbda5a4243fc9c8483e8584043e0000803f00001041fcb7af3e00000040351025be66227b3f0b38ddbdabaa2a3fd1d0503e8988083e0000803f00002041b8ec013f00000040351025be66227b3f0b38ddbdb3b2323fdddc5c3e9190103e0000803f0000104156af6e3e0000803fb455b3bd98c27a3f369839bea5a4243fc9c8483e8584043e0000803f00002041b8ec013f00000040b455b3bd98c27a3f369839beb3b2323fdddc5c3e9190103e0000803f00002041ed1ca53e0000803fb455b3bd98c27a3f369839beaaa9293fd1d0503e8988083e0000803f000020c13db4763e000000401bb55abeaff2793ff22f083da6a5253fc9c8483e8584043e0000803f000020c136d5533e000040401bb55abeaff2793ff22f083da4a3233fc9c8483e8584043e0000803f000010c1feead93e000040401bb55abeaff2793ff22f083dafae2e3fd5d4543e8d8c0c3e0000803f000020c13db4763e000000408ec53abea4b47b3f7803503aa6a5253fc9c8483e8584043e0000803f000010c1feead93e000040408ec53abea4b47b3f7803503aafae2e3fd5d4543e8d8c0c3e0000803f000010c1c654da3e000000408ec53abea4b47b3f7803503aafae2e3fd5d4543e8d8c0c3e0000803f000010c1c654da3e0000004034f132be960f7c3fa24e503aafae2e3fd5d4543e8d8c0c3e0000803f000010c1feead93e0000404034f132be960f7c3fa24e503aafae2e3fd5d4543e8d8c0c3e0000803f000000c1c5641a3f0000404034f132be960f7c3fa24e503ab8b7373fe1e0603e9594143e0000803f000010c1c654da3e00000040f4acfcbdf4b27d3f20cb53bdafae2e3fd5d4543e8d8c0c3e0000803f000000c1c5641a3f00004040f4acfcbdf4b27d3f20cb53bdb8b7373fe1e0603e9594143e0000803f000000c157090d3f00000040f4acfcbdf4b27d3f20cb53bdb6b5353fdddc5c3e9190103e0000803f000000c157090d3f00000040e36c3abbb5a67f3f556c55bdb6b5353fdddc5c3e9190103e0000803f000000c1c5641a3f00004040e36c3abbb5a67f3f556c55bdb8b7373fe1e0603e9594143e0000803f0000e0c0731f1b3f00004040e36c3abbb5a67f3f556c55bdb8b7373fe1e0603e9594143e0000803f000000c157090d3f00000040a2214c3d5c477e3fb9ffd5bdb6b5353fdddc5c3e9190103e0000803f0000e0c0731f1b3f00004040a2214c3d5c477e3fb9ffd5bdb8b7373fe1e0603e9594143e0000803f0000e0c02131003f00000040a2214c3d5c477e3fb9ffd5bdb3b2323fdddc5c3e9190103e0000803f0000e0c02131003f000000405f2c303e83cc7a3ffe11d3bdb3b2323fdddc5c3e9190103e0000803f0000e0c0731f1b3f000040405f2c303e83cc7a3ffe11d3bdb8b7373fe1e0603e9594143e0000803f0000c0c01055dc3e000040405f2c303e83cc7a3ffe11d3bdafae2e3fd5d4543e8d8c0c3e0000803f0000e0c02131003f0000004081c2453eab25793f742cffbdb3b2323fdddc5c3e9190103e0000803f0000c0c01055dc3e0000404081c2453eab25793f742cffbdafae2e3fd5d4543e8d8c0c3e0000803f0000c0c0c2c89a3e0000004081c2453eab25793f742cffbda9a8283fcdcc4c3e8988083e0000803f0000c0c0c2c89a3e00000040196a883d145d7d3ffcbe01bea9a8283fcdcc4c3e8988083e0000803f0000c0c01055dc3e00004040196a883d145d7d3ffcbe01beafae2e3fd5d4543e8d8c0c3e0000803f0000a0c0b1dfb93e00004040196a883d145d7d3ffcbe01beacab2b3fd1d0503e8988083e0000803f0000c0c0c2c89a3e000000400750683d43d47d3fc875efbda9a8283fcdcc4c3e8988083e0000803f0000a0c0b1dfb93e000040400750683d43d47d3fc875efbdacab2b3fd1d0503e8988083e0000803f0000a0c05afe7a3e000000400750683d43d47d3fc875efbda6a5253fc9c8483e8584043e0000803f0000a0c05afe7a3e00000040b8390cbee4d77b3f3196edbda6a5253fc9c8483e8584043e0000803f0000a0c0b1dfb93e00004040b8390cbee4d77b3f3196edbdacab2b3fd1d0503e8988083e0000803f000080c06692003f00004040b8390cbee4d77b3f3196edbdb3b2323fdddc5c3e9190103e0000803f0000a0c05afe7a3e00000040878c10be05d17b3f71e2e4bda6a5253fc9c8483e8584043e0000803f000080c06692003f00004040878c10be05d17b3f71e2e4bdb3b2323fdddc5c3e9190103e0000803f000080c0d3f8c63e00000040878c10be05d17b3f71e2e4bdadac2c3fd5d4543e8988083e0000803f000080c0d3f8c63e00000040bff10fbdd5347e3f8a0ee7bdadac2c3fd5d4543e8988083e0000803f000080c06692003f00004040bff10fbdd5347e3f8a0ee7bdb3b2323fdddc5c3e9190103e0000803f000040c0c2a1093f00004040bff10fbdd5347e3f8a0ee7bdb5b4343fdddc5c3e9190103e0000803f000080c0d3f8c63e00000040d191a9bd47927e3ffde485bdadac2c3fd5d4543e8988083e0000803f000040c0c2a1093f00004040d191a9bd47927e3ffde485bdb5b4343fdddc5c3e9190103e0000803f000040c02e9af13e00000040d191a9bd47927e3ffde485bdb1b0303fd9d8583e8d8c0c3e0000803f000040c02e9af13e00000040dd63ea3d20c57d3f167985bdb1b0303fd9d8583e8d8c0c3e0000803f000040c0c2a1093f00004040dd63ea3d20c57d3f167985bdb5b4343fdddc5c3e9190103e0000803f000000c0bb26d83e00004040dd63ea3d20c57d3f167985bdafae2e3fd5d4543e8d8c0c3e0000803f000040c02e9af13e0000004006ca5a3cebce7f3f0dc2143db1b0303fd9d8583e8d8c0c3e0000803f000000c0bb26d83e0000404006ca5a3cebce7f3f0dc2143dafae2e3fd5d4543e8d8c0c3e0000803f000000c08ec2ea3e0000004006ca5a3cebce7f3f0dc2143db1b0303fd9d8583e8d8c0c3e0000803f000000c08ec2ea3e00000040374be73ca7ba7f3f44b6143db1b0303fd9d8583e8d8c0c3e0000803f000000c0bb26d83e00004040374be73ca7ba7f3f44b6143dafae2e3fd5d4543e8d8c0c3e0000803f000080bf1caec93e00004040374be73ca7ba7f3f44b6143dadac2c3fd5d4543e8988083e0000803f000000c08ec2ea3e0000004045e22cbd4b517e3f4ce4d93db1b0303fd9d8583e8d8c0c3e0000803f000080bf1caec93e0000404045e22cbd4b517e3f4ce4d93dadac2c3fd5d4543e8988083e0000803f000080bfb841003f0000004045e22cbd4b517e3f4ce4d93db3b2323fdddc5c3e9190103e0000803f000080bfb841003f00000040960714bee3de7b3f9ccbd73db3b2323fdddc5c3e9190103e0000803f000080bf1caec93e00004040960714bee3de7b3f9ccbd73dadac2c3fd5d4543e8988083e0000803f0000000046740a3f00004040960714bee3de7b3f9ccbd73db5b4343fdddc5c3e9190103e0000803f000080bfb841003f0000004066c71abea86d7b3f506fe53db3b2323fdddc5c3e9190103e0000803f0000000046740a3f0000404066c71abea86d7b3f506fe53db5b4343fdddc5c3e9190103e0000803f00000000afa7273f0000004066c71abea86d7b3f506fe53dbbba3a3fe5e4643e9594143e0000803f00000000afa7273f00000040a4d207be731a7c3ffe0ce63dbbba3a3fe5e4643e9594143e0000803f0000000046740a3f00004040a4d207be731a7c3ffe0ce63db5b4343fdddc5c3e9190103e0000803f0000803f4bef2c3f00004040a4d207be731a7c3ffe0ce63dbcbb3b3fe5e4643e9594143e0000803f00000000afa7273f000000405e51d2bd47c67d3f7e72a83dbbba3a3fe5e4643e9594143e0000803f0000803f4bef2c3f000040405e51d2bd47c67d3f7e72a83dbcbb3b3fe5e4643e9594143e0000803f0000803fe02c423f000000405e51d2bd47c67d3f7e72a83dc0bf3f3fedec6c3e9998183e0000803f0000803fe02c423f000000408b554e3c671a7f3f4254a93dc0bf3f3fedec6c3e9998183e0000803f0000803f4bef2c3f000040408b554e3c671a7f3f4254a93dbcbb3b3fe5e4643e9594143e0000803f000000400eb3293f000040408b554e3c671a7f3f4254a93dbbba3a3fe5e4643e9594143e0000803f0000803fe02c423f00000040412aa13db32b7f3fb307883cc0bf3f3fedec6c3e9998183e0000803f000000400eb3293f00004040412aa13db32b7f3fb307883cbbba3a3fe5e4643e9594143e0000803f00000040d5f62d3f00000040412aa13db32b7f3fb307883cbcbb3b3fe5e4643e9594143e0000803f00000040d5f62d3f000000404368c13d0ed27e3fe9d7873cbcbb3b3fe5e4643e9594143e0000803f000000400eb3293f000040404368c13d0ed27e3fe9d7873cbbba3a3fe5e4643e9594143e0000803f000040406069113f000040404368c13d0ed27e3fe9d7873cb6b5353fe1e0603e9190103e0000803f00000040d5f62d3f00000040b6bd0e3e53647d3f0e8eedbcbcbb3b3fe5e4643e9594143e0000803f000040406069113f00004040b6bd0e3e53647d3f0e8eedbcb6b5353fe1e0603e9190103e0000803f0000404060e9093f00000040b6bd0e3e53647d3f0e8eedbcb5b4343fdddc5c3e9190103e0000803f0000404060e9093f00000040ba5dae3c0dd57f3fbcd7efbcb5b4343fdddc5c3e9190103e0000803f000040406069113f00004040ba5dae3c0dd57f3fbcd7efbcb6b5353fe1e0603e9190103e0000803f0000804088f50b3f00004040ba5dae3c0dd57f3fbcd7efbcb5b4343fdddc5c3e9190103e0000803f0000404060e9093f000000408dadd63c26c37f3f7d110cbdb5b4343fdddc5c3e9190103e0000803f0000804088f50b3f000040408dadd63c26c37f3f7d110cbdb5b4343fdddc5c3e9190103e0000803f000080405b32033f000000408dadd63c26c37f3f7d110cbdb4b3333fdddc5c3e9190103e0000803f000080405b32033f00000040bd7f063e35a27d3f0de70abdb4b3333fdddc5c3e9190103e0000803f0000804088f50b3f00004040bd7f063e35a27d3f0de70abdb5b4343fdddc5c3e9190103e0000803f0000a040920ad43e00004040bd7f063e35a27d3f0de70abdafae2e3fd5d4543e8d8c0c3e0000803f000080405b32033f000000404f360c3ee1627d3ffb2422bdb4b3333fdddc5c3e9190103e0000803f0000a040920ad43e000040404f360c3ee1627d3ffb2422bdafae2e3fd5d4543e8d8c0c3e0000803f0000a0406d90bf3e000000404f360c3ee1627d3ffb2422bdacab2b3fd1d0503e8988083e0000803f0000a0406d90bf3e00000040b476323e7de17b3f5d2e21bdacab2b3fd1d0503e8988083e0000803f0000a040920ad43e00004040b476323e7de17b3f5d2e21bdafae2e3fd5d4543e8d8c0c3e0000803f0000c0404ab3723e00004040b476323e7de17b3f5d2e21bda5a4243fc9c8483e8584043e0000803f0000a0406d90bf3e000000409a5e5d3ef50b793ff482a9bdacab2b3fd1d0503e8988083e0000803f0000c0404ab3723e000040409a5e5d3ef50b793ff482a9bda5a4243fc9c8483e8584043e0000803f0000c04007941b3e000000409a5e5d3ef50b793ff482a9bda1a0203fc5c4443e8180003e0000803f0000c04007941b3e000000409f4731bc43107f3f599badbda1a0203fc5c4443e8180003e0000803f0000c0404ab3723e000040409f4731bc43107f3f599badbda5a4243fc9c8483e8584043e0000803f0000e0402ed27d3e000040409f4731bc43107f3f599badbda6a5253fc9c8483e8584043e0000803f0000c04007941b3e00000040f2e2793d38667c3f25551fbea1a0203fc5c4443e8180003e0000803f0000e0402ed27d3e00004040f2e2793d38667c3f25551fbea6a5253fc9c8483e8584043e0000803f0000e040486eb83d00000040f2e2793d38667c3f25551fbe9e9d1d3fc1c0403ef9f8f83d0000803f0000e040486eb83d00000040908f19bec5027a3f27d31dbe9e9d1d3fc1c0403ef9f8f83d0000803f0000e0402ed27d3e00004040908f19bec5027a3f27d31dbea6a5253fc9c8483e8584043e0000803f00000041bd87cd3e00004040908f19bec5027a3f27d31dbeaead2d3fd5d4543e8988083e0000803f0000e040486eb83d000000401d92c5bd5940793f82a753be9e9d1d3fc1c0403ef9f8f83d0000803f00000041bd87cd3e000040401d92c5bd5940793f82a753beaead2d3fd5d4543e8988083e0000803f00000041eaac413e000000401d92c5bd5940793f82a753bea3a2223fc9c8483e8180003e0000803f00000041eaac413e000000409aed1ebe8a62773fc61152bea3a2223fc9c8483e8180003e0000803f00000041bd87cd3e000040409aed1ebe8a62773fc61152beaead2d3fd5d4543e8988083e0000803f000010417ce10f3f000040409aed1ebe8a62773fc61152beb6b5353fdddc5c3e9190103e0000803f00000041eaac413e000000400b6618be054c773fbd7758bea3a2223fc9c8483e8180003e0000803f000010417ce10f3f000040400b6618be054c773fbd7758beb6b5353fdddc5c3e9190103e0000803f00001041fcb7af3e000000400b6618be054c773fbd7758beabaa2a3fd1d0503e8988083e0000803f00001041fcb7af3e00000040f9ae5cbd02b8793f70965abeabaa2a3fd1d0503e8988083e0000803f000010417ce10f3f00004040f9ae5cbd02b8793f70965abeb6b5353fdddc5c3e9190103e0000803f000020413c051e3f00004040f9ae5cbd02b8793f70965abeb9b8383fe1e0603e9594143e0000803f00001041fcb7af3e00000040d31125bedb247b3fa880dcbdabaa2a3fd1d0503e8988083e0000803f000020413c051e3f00004040d31125bedb247b3fa880dcbdb9b8383fe1e0603e9594143e0000803f00002041b8ec013f00000040d31125bedb247b3fa880dcbdb3b2323fdddc5c3e9190103e0000803f000020c136d5533e0000404040a92cbe4f1e7b3fecf5c53da4a3233fc9c8483e8584043e0000803f000020c159dbdd3d0000804040a92cbe4f1e7b3fecf5c53d9f9e1e3fc1c0403e8180003e0000803f000010c116798f3e0000804040a92cbe4f1e7b3fecf5c53da8a7273fcdcc4c3e8584043e0000803f000020c136d5533e000040405ca758bed899773f4701103ea4a3233fc9c8483e8584043e0000803f000010c116798f3e000080405ca758bed899773f4701103ea8a7273fcdcc4c3e8584043e0000803f000010c1feead93e000040405ca758bed899773f4701103eafae2e3fd5d4543e8d8c0c3e0000803f000010c1feead93e0000404080d331bea57c793f141a113eafae2e3fd5d4543e8d8c0c3e0000803f000010c116798f3e0000804080d331bea57c793f141a113ea8a7273fcdcc4c3e8584043e0000803f000000c10eb5ea3e0000804080d331bea57c793f141a113eb1b0303fd9d8583e8d8c0c3e0000803f000010c1feead93e00004040522731be9b8a793f116c103eafae2e3fd5d4543e8d8c0c3e0000803f000000c10eb5ea3e00008040522731be9b8a793f116c103eb1b0303fd9d8583e8d8c0c3e0000803f000000c1c5641a3f00004040522731be9b8a793f116c103eb8b7373fe1e0603e9594143e0000803f000000c1c5641a3f000040400cb125bd84277d3f5c83123eb8b7373fe1e0603e9594143e0000803f000000c10eb5ea3e000080400cb125bd84277d3f5c83123eb1b0303fd9d8583e8d8c0c3e0000803f0000e0c0c9a6ff3e000080400cb125bd84277d3f5c83123eb3b2323fd9d8583e8d8c0c3e0000803f000000c1c5641a3f000040406ba039bb518e7e3f1a25d93db8b7373fe1e0603e9594143e0000803f0000e0c0c9a6ff3e000080406ba039bb518e7e3f1a25d93db3b2323fd9d8583e8d8c0c3e0000803f0000e0c0731f1b3f000040406ba039bb518e7e3f1a25d93db8b7373fe1e0603e9594143e0000803f0000e0c0731f1b3f00004040260cd23dee367d3f2e00d83db8b7373fe1e0603e9594143e0000803f0000e0c0c9a6ff3e00008040260cd23dee367d3f2e00d83db3b2323fd9d8583e8d8c0c3e0000803f0000c0c0df8fca3e00008040260cd23dee367d3f2e00d83daead2d3fd5d4543e8988083e0000803f0000e0c0731f1b3f000040405903313e8dfe7b3f14f00b3db8b7373fe1e0603e9594143e0000803f0000c0c0df8fca3e000080405903313e8dfe7b3f14f00b3daead2d3fd5d4543e8988083e0000803f0000c0c01055dc3e000040405903313e8dfe7b3f14f00b3dafae2e3fd5d4543e8d8c0c3e0000803f0000c0c01055dc3e000040403c9fa43c57cb7f3f4a0c0e3dafae2e3fd5d4543e8d8c0c3e0000803f0000c0c0df8fca3e000080403c9fa43c57cb7f3f4a0c0e3daead2d3fd5d4543e8988083e0000803f0000a0c0cd43c03e000080403c9fa43c57cb7f3f4a0c0e3dadac2c3fd5d4543e8988083e0000803f0000c0c01055dc3e000040401c83893d02677f3f47094cbcafae2e3fd5d4543e8d8c0c3e0000803f0000a0c0cd43c03e000080401c83893d02677f3f47094cbcadac2c3fd5d4543e8988083e0000803f0000a0c0b1dfb93e000040401c83893d02677f3f47094cbcacab2b3fd1d0503e8988083e0000803f0000a0c0b1dfb93e0000404025ff11be6e5d7d3f99684abcacab2b3fd1d0503e8988083e0000803f0000a0c0cd43c03e0000804025ff11be6e5d7d3f99684abcadac2c3fd5d4543e8988083e0000803f000080c0dd02053f0000804025ff11be6e5d7d3f99684abcb4b3333fdddc5c3e9190103e0000803f0000a0c0b1dfb93e0000404069280dbe95847d3f46ae8cbcacab2b3fd1d0503e8988083e0000803f000080c0dd02053f0000804069280dbe95847d3f46ae8cbcb4b3333fdddc5c3e9190103e0000803f000080c06692003f0000404069280dbe95847d3f46ae8cbcb3b2323fdddc5c3e9190103e0000803f000080c06692003f000040407327f2bc84d97f3f85f98dbcb3b2323fdddc5c3e9190103e0000803f000080c0dd02053f000080407327f2bc84d97f3f85f98dbcb4b3333fdddc5c3e9190103e0000803f000040c03c950c3f000080407327f2bc84d97f3f85f98dbcb5b4343fdddc5c3e9190103e0000803f000080c06692003f0000404013dc10bda8d27f3f0cbd3cbcb3b2323fdddc5c3e9190103e0000803f000040c03c950c3f0000804013dc10bda8d27f3f0cbd3cbcb5b4343fdddc5c3e9190103e0000803f000040c0c2a1093f0000404013dc10bda8d27f3f0cbd3cbcb5b4343fdddc5c3e9190103e0000803f000040c0c2a1093f000040408b95023e9ee47d3f8f503bbcb5b4343fdddc5c3e9190103e0000803f000040c03c950c3f000080408b95023e9ee47d3f8f503bbcb5b4343fdddc5c3e9190103e0000803f000000c0fd54d73e000080408b95023e9ee47d3f8f503bbcafae2e3fd5d4543e8d8c0c3e0000803f000040c0c2a1093f00004040a0e3ea3d744f7e3f9c5bd03ab5b4343fdddc5c3e9190103e0000803f000000c0fd54d73e00008040a0e3ea3d744f7e3f9c5bd03aafae2e3fd5d4543e8d8c0c3e0000803f000000c0bb26d83e00004040a0e3ea3d744f7e3f9c5bd03aafae2e3fd5d4543e8d8c0c3e0000803f000000c0bb26d83e000040402eb41c3defcf7f3f9e96d13aafae2e3fd5d4543e8d8c0c3e0000803f000000c0fd54d73e000080402eb41c3defcf7f3f9e96d13aafae2e3fd5d4543e8d8c0c3e0000803f000080bfc9bac33e000080402eb41c3defcf7f3f9e96d13aadac2c3fd5d4543e8988083e0000803f000000c0bb26d83e00004040486ee73c6ce17f3fa1533e3cafae2e3fd5d4543e8d8c0c3e0000803f000080bfc9bac33e00008040486ee73c6ce17f3fa1533e3cadac2c3fd5d4543e8988083e0000803f000080bf1caec93e00004040486ee73c6ce17f3fa1533e3cadac2c3fd5d4543e8988083e0000803f000080bf1caec93e00004040f7fe11be1c5e7d3f21753c3cadac2c3fd5d4543e8988083e0000803f000080bfc9bac33e00008040f7fe11be1c5e7d3f21753c3cadac2c3fd5d4543e8988083e0000803f0000000036be063f00008040f7fe11be1c5e7d3f21753c3cb4b3333fdddc5c3e9190103e0000803f000080bf1caec93e00004040cfd714be2c417d3fecf76a3cadac2c3fd5d4543e8988083e0000803f0000000036be063f00008040cfd714be2c417d3fecf76a3cb4b3333fdddc5c3e9190103e0000803f0000000046740a3f00004040cfd714be2c417d3fecf76a3cb5b4343fdddc5c3e9190103e0000803f0000000046740a3f000040403283d9bd7c867e3fbe256c3cb5b4343fdddc5c3e9190103e0000803f0000000036be063f000080403283d9bd7c867e3fbe256c3cb4b3333fdddc5c3e9190103e0000803f0000803ff016223f000080403283d9bd7c867e3fbe256c3cbab9393fe5e4643e9594143e0000803f0000000046740a3f000040404e9108be587c7d3f68d12b3db5b4343fdddc5c3e9190103e0000803f0000803ff016223f000080404e9108be587c7d3f68d12b3dbab9393fe5e4643e9594143e0000803f0000803f4bef2c3f000040404e9108be587c7d3f68d12b3dbcbb3b3fe5e4643e9594143e0000803f0000803f4bef2c3f0000404075ff8e3d77257f3f8ff12c3dbcbb3b3fe5e4643e9594143e0000803f0000803ff016223f0000804075ff8e3d77257f3f8ff12c3dbab9393fe5e4643e9594143e0000803f00000040b227103f0000804075ff8e3d77257f3f8ff12c3db6b5353fe1e0603e9190103e0000803f0000803f4bef2c3f0000404026054e3c01b77e3f4054cb3dbcbb3b3fe5e4643e9594143e0000803f00000040b227103f0000804026054e3c01b77e3f4054cb3db6b5353fe1e0603e9190103e0000803f000000400eb3293f0000404026054e3c01b77e3f4054cb3dbbba3a3fe5e4643e9594143e0000803f000000400eb3293f00004040fc6d073e507f7c3f168fc93dbbba3a3fe5e4643e9594143e0000803f00000040b227103f00008040fc6d073e507f7c3f168fc93db6b5353fe1e0603e9190103e0000803f00004040eda7db3e00008040fc6d073e507f7c3f168fc93dafae2e3fd5d4543e8d8c0c3e0000803f000000400eb3293f00004040ac9bbf3d36737c3f5e5c0c3ebbba3a3fe5e4643e9594143e0000803f00004040eda7db3e00008040ac9bbf3d36737c3f5e5c0c3eafae2e3fd5d4543e8d8c0c3e0000803f000040406069113f00004040ac9bbf3d36737c3f5e5c0c3eb6b5353fe1e0603e9190103e0000803f000040406069113f00004040a042c13cdd7d7d3fa0f00c3eb6b5353fe1e0603e9190103e0000803f00004040eda7db3e00008040a042c13cdd7d7d3fa0f00c3eafae2e3fd5d4543e8d8c0c3e0000803f000080402a75cf3e00008040a042c13cdd7d7d3fa0f00c3eaead2d3fd5d4543e8d8c0c3e0000803f000040406069113f0000404074b8ac3cf46a7d3f95750f3eb6b5353fe1e0603e9190103e0000803f000080402a75cf3e0000804074b8ac3cf46a7d3f95750f3eaead2d3fd5d4543e8d8c0c3e0000803f0000804088f50b3f0000404074b8ac3cf46a7d3f95750f3eb5b4343fdddc5c3e9190103e0000803f0000804088f50b3f00004040443c863dd8ed7c3fc12e0f3eb5b4343fdddc5c3e9190103e0000803f000080402a75cf3e00008040443c863dd8ed7c3fc12e0f3eaead2d3fd5d4543e8d8c0c3e0000803f0000a040ca7dad3e00008040443c863dd8ed7c3fc12e0f3eabaa2a3fd1d0503e8988083e0000803f0000804088f50b3f00004040fc33063e5b137d3f2f70983db5b4343fdddc5c3e9190103e0000803f0000a040ca7dad3e00008040fc33063e5b137d3f2f70983dabaa2a3fd1d0503e8988083e0000803f0000a040920ad43e00004040fc33063e5b137d3f2f70983dafae2e3fd5d4543e8d8c0c3e0000803f0000a040920ad43e00004040e1bf0a3d84217f3f1dad993dafae2e3fd5d4543e8d8c0c3e0000803f0000a040ca7dad3e00008040e1bf0a3d84217f3f1dad993dabaa2a3fd1d0503e8988083e0000803f0000c040ae169c3e00008040e1bf0a3d84217f3f1dad993da9a8283fcdcc4c3e8988083e0000803f0000a040920ad43e000040406b34323eee837b3ffc8488bdafae2e3fd5d4543e8d8c0c3e0000803f0000c040ae169c3e000080406b34323eee837b3ffc8488bda9a8283fcdcc4c3e8988083e0000803f0000c0404ab3723e000040406b34323eee837b3ffc8488bda5a4243fc9c8483e8584043e0000803f0000c0404ab3723e00004040ee5be4bdefd17d3f3bc589bda5a4243fc9c8483e8584043e0000803f0000c040ae169c3e00008040ee5be4bdefd17d3f3bc589bda9a8283fcdcc4c3e8988083e0000803f0000e0402fabd53e00008040ee5be4bdefd17d3f3bc589bdafae2e3fd5d4543e8d8c0c3e0000803f0000c0404ab3723e000040407c6b2fbc37637c3f5e112bbea5a4243fc9c8483e8584043e0000803f0000e0402fabd53e000080407c6b2fbc37637c3f5e112bbeafae2e3fd5d4543e8d8c0c3e0000803f0000e0402ed27d3e000040407c6b2fbc37637c3f5e112bbea6a5253fc9c8483e8584043e0000803f0000e0402ed27d3e000040402b1225bed819793f17d728bea6a5253fc9c8483e8584043e0000803f0000e0402fabd53e000080402b1225bed819793f17d728beafae2e3fd5d4543e8d8c0c3e0000803f00000041ba3e153f000080402b1225bed819793f17d728beb7b6363fe1e0603e9190103e0000803f0000e0402ed27d3e000040405bf918be380e793f52e034bea6a5253fc9c8483e8584043e0000803f00000041ba3e153f000080405bf918be380e793f52e034beb7b6363fe1e0603e9190103e0000803f00000041bd87cd3e000040405bf918be380e793f52e034beaead2d3fd5d4543e8988083e0000803f00000041bd87cd3e0000404079bebcbd60cf7a3f852636beaead2d3fd5d4543e8988083e0000803f00000041ba3e153f0000804079bebcbd60cf7a3f852636beb7b6363fe1e0603e9190103e0000803f0000104184532d3f0000804079bebcbd60cf7a3f852636bebcbb3b3fe5e4643e9594143e0000803f00000041bd87cd3e000040403a5821be7b257b3fec18e7bdaead2d3fd5d4543e8988083e0000803f0000104184532d3f000080403a5821be7b257b3fec18e7bdbcbb3b3fe5e4643e9594143e0000803f000010417ce10f3f000040403a5821be7b257b3fec18e7bdb6b5353fdddc5c3e9190103e0000803f000010417ce10f3f000040403feec03d33317d3fd4fae8bdb6b5353fdddc5c3e9190103e0000803f0000104184532d3f000080403feec03d33317d3fd4fae8bdbcbb3b3fe5e4643e9594143e0000803f0000204145f1143f000080403feec03d33317d3fd4fae8bdb7b6363fe1e0603e9190103e0000803f000010417ce10f3f00004040a6bf61bd4a737f3f9aef103db6b5353fdddc5c3e9190103e0000803f0000204145f1143f00008040a6bf61bd4a737f3f9aef103db7b6363fe1e0603e9190103e0000803f000020413c051e3f00004040a6bf61bd4a737f3f9aef103db9b8383fe1e0603e9594143e0000803f000020c159dbdd3d00008040d14da6bd401f7f3f4552823c9f9e1e3fc1c0403e8180003e0000803f000020c1142abd3d0000a040d14da6bd401f7f3f4552823c9e9d1d3fc1c0403ef9f8f83d0000803f000010c13305323e0000a040d14da6bd401f7f3f4552823ca2a1213fc5c4443e8180003e0000803f000020c159dbdd3d0000804027872cbeb8ec7a3f4988d53d9f9e1e3fc1c0403e8180003e0000803f000010c13305323e0000a04027872cbeb8ec7a3f4988d53da2a1213fc5c4443e8180003e0000803f000010c116798f3e0000804027872cbeb8ec7a3f4988d53da8a7273fcdcc4c3e8584043e0000803f000010c116798f3e00008040633f28beb01a7b3f66afd53da8a7273fcdcc4c3e8584043e0000803f000010c13305323e0000a040633f28beb01a7b3f66afd53da2a1213fc5c4443e8180003e0000803f000000c12cc6ae3e0000a040633f28beb01a7b3f66afd53dabaa2a3fd1d0503e8988083e0000803f000010c116798f3e000080402d7532be785f7a3f8a76ea3da8a7273fcdcc4c3e8584043e0000803f000000c12cc6ae3e0000a0402d7532be785f7a3f8a76ea3dabaa2a3fd1d0503e8988083e0000803f000000c10eb5ea3e000080402d7532be785f7a3f8a76ea3db1b0303fd9d8583e8d8c0c3e0000803f000000c10eb5ea3e0000804053cf84bd8eba7d3f099bed3db1b0303fd9d8583e8d8c0c3e0000803f000000c12cc6ae3e0000a04053cf84bd8eba7d3f099bed3dabaa2a3fd1d0503e8988083e0000803f0000e0c01746d03e0000a04053cf84bd8eba7d3f099bed3daead2d3fd5d4543e8d8c0c3e0000803f000000c10eb5ea3e00008040fbb326bd23b37e3f5f8cbc3db1b0303fd9d8583e8d8c0c3e0000803f0000e0c01746d03e0000a040fbb326bd23b37e3f5f8cbc3daead2d3fd5d4543e8d8c0c3e0000803f0000e0c0c9a6ff3e00008040fbb326bd23b37e3f5f8cbc3db3b2323fd9d8583e8d8c0c3e0000803f0000e0c0c9a6ff3e00008040ce57513ded937e3f4475bc3db3b2323fd9d8583e8d8c0c3e0000803f0000e0c01746d03e0000a040ce57513ded937e3f4475bc3daead2d3fd5d4543e8d8c0c3e0000803f0000c0c0b1f5b53e0000a040ce57513ded937e3f4475bc3dabaa2a3fd1d0503e8988083e0000803f0000e0c0c9a6ff3e000080407b0ed33d5a6e7e3fd9ce233db3b2323fd9d8583e8d8c0c3e0000803f0000c0c0b1f5b53e0000a0407b0ed33d5a6e7e3fd9ce233dabaa2a3fd1d0503e8988083e0000803f0000c0c0df8fca3e000080407b0ed33d5a6e7e3fd9ce233daead2d3fd5d4543e8988083e0000803f0000c0c0df8fca3e00008040220584bc81c27f3fd8a9243daead2d3fd5d4543e8988083e0000803f0000c0c0b1f5b53e0000a040220584bc81c27f3fd8a9243dabaa2a3fd1d0503e8988083e0000803f0000a0c0ff37be3e0000a040220584bc81c27f3fd8a9243dacab2b3fd1d0503e8988083e0000803f0000c0c0df8fca3e0000804043b8a43c3bf27f3f75ec823baead2d3fd5d4543e8988083e0000803f0000a0c0ff37be3e0000a04043b8a43c3bf27f3f75ec823bacab2b3fd1d0503e8988083e0000803f0000a0c0cd43c03e0000804043b8a43c3bf27f3f75ec823badac2c3fd5d4543e8988083e0000803f0000a0c0cd43c03e00008040a63a17bed9307d3fa283813badac2c3fd5d4543e8988083e0000803f0000a0c0ff37be3e0000a040a63a17bed9307d3fa283813bacab2b3fd1d0503e8988083e0000803f000080c00c56053f0000a040a63a17bed9307d3fa283813bb4b3333fdddc5c3e9190103e0000803f0000a0c0cd43c03e00008040f80112be56627d3fceaaa4baadac2c3fd5d4543e8988083e0000803f000080c00c56053f0000a040f80112be56627d3fceaaa4bab4b3333fdddc5c3e9190103e0000803f000080c0dd02053f00008040f80112be56627d3fceaaa4bab4b3333fdddc5c3e9190103e0000803f000080c0dd02053f00008040246e8dbd7e637f3f4af8a5bab4b3333fdddc5c3e9190103e0000803f000080c00c56053f0000a040246e8dbd7e637f3f4af8a5bab4b3333fdddc5c3e9190103e0000803f000040c0a60e173f0000a040246e8dbd7e637f3f4af8a5bab8b7373fe1e0603e9190103e0000803f000080c0dd02053f00008040fafcf1bca3ac7f3f0d6027bdb4b3333fdddc5c3e9190103e0000803f000040c0a60e173f0000a040fafcf1bca3ac7f3f0d6027bdb8b7373fe1e0603e9190103e0000803f000040c03c950c3f00008040fafcf1bca3ac7f3f0d6027bdb5b4343fdddc5c3e9190103e0000803f000040c03c950c3f00008040a6e7893d98347f3f781127bdb5b4343fdddc5c3e9190103e0000803f000040c0a60e173f0000a040a6e7893d98347f3f781127bdb8b7373fe1e0603e9190103e0000803f000000c0f4c3053f0000a040a6e7893d98347f3f781127bdb4b3333fdddc5c3e9190103e0000803f000040c03c950c3f000080401bee013e139f7c3f3c0acebdb5b4343fdddc5c3e9190103e0000803f000000c0f4c3053f0000a0401bee013e139f7c3f3c0acebdb4b3333fdddc5c3e9190103e0000803f000000c0fd54d73e000080401bee013e139f7c3f3c0acebdafae2e3fd5d4543e8d8c0c3e0000803f000000c0fd54d73e000080405ab3d13cad987e3f9ba6cfbdafae2e3fd5d4543e8d8c0c3e0000803f000000c0f4c3053f0000a0405ab3d13cad987e3f9ba6cfbdb4b3333fdddc5c3e9190103e0000803f000080bf335afe3e0000a0405ab3d13cad987e3f9ba6cfbdb3b2323fd9d8583e8d8c0c3e0000803f000000c0fd54d73e0000804037b01b3d8c277e3fe6cce8bdafae2e3fd5d4543e8d8c0c3e0000803f000080bf335afe3e0000a04037b01b3d8c277e3fe6cce8bdb3b2323fd9d8583e8d8c0c3e0000803f000080bfc9bac33e0000804037b01b3d8c277e3fe6cce8bdadac2c3fd5d4543e8988083e0000803f000080bfc9bac33e00008040e6b6e0bd78cd7c3fe68fe7bdadac2c3fd5d4543e8988083e0000803f000080bf335afe3e0000a040e6b6e0bd78cd7c3fe68fe7bdb3b2323fd9d8583e8d8c0c3e0000803f00000000e99e1b3f0000a040e6b6e0bd78cd7c3fe68fe7bdb8b7373fe1e0603e9594143e0000803f000080bfc9bac33e00008040418811be19907c3f85c7a4bdadac2c3fd5d4543e8988083e0000803f00000000e99e1b3f0000a040418811be19907c3f85c7a4bdb8b7373fe1e0603e9594143e0000803f0000000036be063f00008040418811be19907c3f85c7a4bdb4b3333fdddc5c3e9190103e0000803f0000000036be063f00008040b88465bd83c07e3f2635a6bdb4b3333fdddc5c3e9190103e0000803f00000000e99e1b3f0000a040b88465bd83c07e3f2635a6bdb8b7373fe1e0603e9594143e0000803f0000803f32092a3f0000a040b88465bd83c07e3f2635a6bdbbba3a3fe5e4643e9594143e0000803f0000000036be063f00008040796ed9bd3c6e7e3f2fb9fcbcb4b3333fdddc5c3e9190103e0000803f0000803f32092a3f0000a040796ed9bd3c6e7e3f2fb9fcbcbbba3a3fe5e4643e9594143e0000803f0000803ff016223f00008040796ed9bd3c6e7e3f2fb9fcbcbab9393fe5e4643e9594143e0000803f0000803ff016223f00008040b5fae53d22427e3f608dfcbcbab9393fe5e4643e9594143e0000803f0000803f32092a3f0000a040b5fae53d22427e3f608dfcbcbbba3a3fe5e4643e9594143e0000803f0000004072170d3f0000a040b5fae53d22427e3f608dfcbcb6b5353fdddc5c3e9190103e0000803f0000803ff016223f00008040861d8f3d1c5b7f3fb791433cbab9393fe5e4643e9594143e0000803f0000004072170d3f0000a040861d8f3d1c5b7f3fb791433cb6b5353fdddc5c3e9190103e0000803f00000040b227103f00008040861d8f3d1c5b7f3fb791433cb6b5353fe1e0603e9190103e0000803f00000040b227103f00008040a83d133e52527d3fdc02423cb6b5353fe1e0603e9190103e0000803f0000004072170d3f0000a040a83d133e52527d3fdc02423cb6b5353fdddc5c3e9190103e0000803f00004040cac8cf3e0000a040a83d133e52527d3fdc02423caead2d3fd5d4543e8d8c0c3e0000803f00000040b227103f00008040ec0d083e82a97d3f1f36bc3cb6b5353fe1e0603e9190103e0000803f00004040cac8cf3e0000a040ec0d083e82a97d3f1f36bc3caead2d3fd5d4543e8d8c0c3e0000803f00004040eda7db3e00008040ec0d083e82a97d3f1f36bc3cafae2e3fd5d4543e8d8c0c3e0000803f00004040eda7db3e00008040a168af3c5edf7f3ffad9bd3cafae2e3fd5d4543e8d8c0c3e0000803f00004040cac8cf3e0000a040a168af3c5edf7f3ffad9bd3caead2d3fd5d4543e8d8c0c3e0000803f00008040dad0c43e0000a040a168af3c5edf7f3ffad9bd3cadac2c3fd5d4543e8988083e0000803f00004040eda7db3e000080403b13c33c44df7f3f3a2faa3cafae2e3fd5d4543e8d8c0c3e0000803f00008040dad0c43e0000a0403b13c33c44df7f3f3a2faa3cadac2c3fd5d4543e8988083e0000803f000080402a75cf3e000080403b13c33c44df7f3f3a2faa3caead2d3fd5d4543e8d8c0c3e0000803f000080402a75cf3e000080408ad239bb97f17f3f6a3baa3caead2d3fd5d4543e8d8c0c3e0000803f00008040dad0c43e0000a0408ad239bb97f17f3f6a3baa3cadac2c3fd5d4543e8988083e0000803f0000a0409444c63e0000a0408ad239bb97f17f3f6a3baa3cadac2c3fd5d4543e8988083e0000803f000080402a75cf3e00008040d468873d29247f3f198c45bdaead2d3fd5d4543e8d8c0c3e0000803f0000a0409444c63e0000a040d468873d29247f3f198c45bdadac2c3fd5d4543e8988083e0000803f0000a040ca7dad3e00008040d468873d29247f3f198c45bdabaa2a3fd1d0503e8988083e0000803f0000a040ca7dad3e0000804058c187bd6f237f3f898b45bdabaa2a3fd1d0503e8988083e0000803f0000a0409444c63e0000a04058c187bd6f237f3f898b45bdadac2c3fd5d4543e8988083e0000803f0000c0404152e83e0000a04058c187bd6f237f3f898b45bdb1b0303fd9d8583e8d8c0c3e0000803f0000a040ca7dad3e000080405ca0093dd4107d3fc6b716beabaa2a3fd1d0503e8988083e0000803f0000c0404152e83e0000a0405ca0093dd4107d3fc6b716beb1b0303fd9d8583e8d8c0c3e0000803f0000c040ae169c3e000080405ca0093dd4107d3fc6b716bea9a8283fcdcc4c3e8988083e0000803f0000c040ae169c3e00008040d68cf6bd005e7b3fceb415bea9a8283fcdcc4c3e8988083e0000803f0000c0404152e83e0000a040d68cf6bd005e7b3fceb415beb1b0303fd9d8583e8d8c0c3e0000803f0000e040248c133f0000a040d68cf6bd005e7b3fceb415beb7b6363fe1e0603e9190103e0000803f0000c040ae169c3e000080405d12e2bd14477b3f26d91fbea9a8283fcdcc4c3e8988083e0000803f0000e040248c133f0000a0405d12e2bd14477b3f26d91fbeb7b6363fe1e0603e9190103e0000803f0000e0402fabd53e000080405d12e2bd14477b3f26d91fbeafae2e3fd5d4543e8d8c0c3e0000803f0000e0402fabd53e00008040b39ac6bd93a17b3fb81220beafae2e3fd5d4543e8d8c0c3e0000803f0000e040248c133f0000a040b39ac6bd93a17b3fb81220beb7b6363fe1e0603e9190103e0000803f00000041d2cd2c3f0000a040b39ac6bd93a17b3fb81220bebcbb3b3fe5e4643e9594143e0000803f0000e0402fabd53e0000804015ad26bef0857b3f002db9bdafae2e3fd5d4543e8d8c0c3e0000803f00000041d2cd2c3f0000a04015ad26bef0857b3f002db9bdbcbb3b3fe5e4643e9594143e0000803f00000041ba3e153f0000804015ad26bef0857b3f002db9bdb7b6363fe1e0603e9190103e0000803f00000041ba3e153f00008040bd2b50bcf8e67e3fd9a9bbbdb7b6363fe1e0603e9190103e0000803f00000041d2cd2c3f0000a040bd2b50bcf8e67e3fd9a9bbbdbcbb3b3fe5e4643e9594143e0000803f000010411712303f0000a040bd2b50bcf8e67e3fd9a9bbbdbdbc3c3fe9e8683e9594143e0000803f00000041ba3e153f00008040c1cabfbd3edc7e3f93dc2ebcb7b6363fe1e0603e9190103e0000803f000010411712303f0000a040c1cabfbd3edc7e3f93dc2ebcbdbc3c3fe9e8683e9594143e0000803f0000104184532d3f00008040c1cabfbd3edc7e3f93dc2ebcbcbb3b3fe5e4643e9594143e0000803f0000104184532d3f000080402c2e0d3e698a7d3fc9f42dbcbcbb3b3fe5e4643e9594143e0000803f000010411712303f0000a0402c2e0d3e698a7d3fc9f42dbcbdbc3c3fe9e8683e9594143e0000803f00002041e76e0c3f0000a0402c2e0d3e698a7d3fc9f42dbcb5b4343fdddc5c3e9190103e0000803f0000104184532d3f00008040c715c23d0ab57e3fdc75073dbcbb3b3fe5e4643e9594143e0000803f00002041e76e0c3f0000a040c715c23d0ab57e3fdc75073db5b4343fdddc5c3e9190103e0000803f0000204145f1143f00008040c715c23d0ab57e3fdc75073db7b6363fe1e0603e9190103e0000803f000020c1142abd3d0000a040fb3b92bce5217e3f7535f4bd9e9d1d3fc1c0403ef9f8f83d0000803f000020c17c95593e0000c040fb3b92bce5217e3f7535f4bda4a3233fc9c8483e8584043e0000803f000010c15fff6b3e0000c040fb3b92bce5217e3f7535f4bda5a4243fc9c8483e8584043e0000803f000020c1142abd3d0000a040920fa6bdc3bf7e3f95c666bd9e9d1d3fc1c0403ef9f8f83d0000803f000010c15fff6b3e0000c040920fa6bdc3bf7e3f95c666bda5a4243fc9c8483e8584043e0000803f000010c13305323e0000a040920fa6bdc3bf7e3f95c666bda2a1213fc5c4443e8180003e0000803f000010c13305323e0000a04040fb1ebed17d7c3f07bb64bda2a1213fc5c4443e8180003e0000803f000010c15fff6b3e0000c04040fb1ebed17d7c3f07bb64bda5a4243fc9c8483e8584043e0000803f000000c11598c63e0000c04040fb1ebed17d7c3f07bb64bdadac2c3fd5d4543e8988083e0000803f000010c13305323e0000a0403ffe28be8b377c3f63be3bbda2a1213fc5c4443e8180003e0000803f000000c11598c63e0000c0403ffe28be8b377c3f63be3bbdadac2c3fd5d4543e8988083e0000803f000000c12cc6ae3e0000a0403ffe28be8b377c3f63be3bbdabaa2a3fd1d0503e8988083e0000803f000000c12cc6ae3e0000a0409e7a63bd28547f3f5d0f3ebdabaa2a3fd1d0503e8988083e0000803f000000c11598c63e0000c0409e7a63bd28547f3f5d0f3ebdadac2c3fd5d4543e8988083e0000803f0000e0c08c1ae33e0000c0409e7a63bd28547f3f5d0f3ebdb0af2f3fd9d8583e8d8c0c3e0000803f000000c12cc6ae3e0000a040759f85bd2e487f3f7e3716bdabaa2a3fd1d0503e8988083e0000803f0000e0c08c1ae33e0000c040759f85bd2e487f3f7e3716bdb0af2f3fd9d8583e8d8c0c3e0000803f0000e0c01746d03e0000a040759f85bd2e487f3f7e3716bdaead2d3fd5d4543e8d8c0c3e0000803f0000e0c01746d03e0000a0402957933d052a7f3fbe2516bdaead2d3fd5d4543e8d8c0c3e0000803f0000e0c08c1ae33e0000c0402957933d052a7f3fbe2516bdb0af2f3fd9d8583e8d8c0c3e0000803f0000c0c0de25be3e0000c0402957933d052a7f3fbe2516bdacab2b3fd1d0503e8988083e0000803f0000e0c01746d03e0000a0404a35523d45a17f3f55d282bcaead2d3fd5d4543e8d8c0c3e0000803f0000c0c0de25be3e0000c0404a35523d45a17f3f55d282bcacab2b3fd1d0503e8988083e0000803f0000c0c0b1f5b53e0000a0404a35523d45a17f3f55d282bcabaa2a3fd1d0503e8988083e0000803f0000c0c0b1f5b53e0000a0408248e2ba86f77f3f7afe82bcabaa2a3fd1d0503e8988083e0000803f0000c0c0de25be3e0000c0408248e2ba86f77f3f7afe82bcacab2b3fd1d0503e8988083e0000803f0000a0c02e08bf3e0000c0408248e2ba86f77f3f7afe82bcacab2b3fd1d0503e8988083e0000803f0000c0c0b1f5b53e0000a0406e2084bc64f77f3f0028d0baabaa2a3fd1d0503e8988083e0000803f0000a0c02e08bf3e0000c0406e2084bc64f77f3f0028d0baacab2b3fd1d0503e8988083e0000803f0000a0c0ff37be3e0000a0406e2084bc64f77f3f0028d0baacab2b3fd1d0503e8988083e0000803f0000a0c0ff37be3e0000a040e6a417be4f2d7d3f4be3cdbaacab2b3fd1d0503e8988083e0000803f0000a0c02e08bf3e0000c040e6a417be4f2d7d3f4be3cdbaacab2b3fd1d0503e8988083e0000803f000080c088d9053f0000c040e6a417be4f2d7d3f4be3cdbab4b3333fdddc5c3e9190103e0000803f0000a0c0ff37be3e0000a040e13a17be3a317d3fd50a02bbacab2b3fd1d0503e8988083e0000803f000080c088d9053f0000c040e13a17be3a317d3fd50a02bbb4b3333fdddc5c3e9190103e0000803f000080c00c56053f0000a040e13a17be3a317d3fd50a02bbb4b3333fdddc5c3e9190103e0000803f000080c00c56053f0000a040c82102be84ec7d3f066b02bbb4b3333fdddc5c3e9190103e0000803f000080c088d9053f0000c040c82102be84ec7d3f066b02bbb4b3333fdddc5c3e9190103e0000803f000040c012a6263f0000c040c82102be84ec7d3f066b02bbbbba3a3fe5e4643e9594143e0000803f000080c00c56053f0000a040862b8dbd33eb7e3f046978bdb4b3333fdddc5c3e9190103e0000803f000040c012a6263f0000c040862b8dbd33eb7e3f046978bdbbba3a3fe5e4643e9594143e0000803f000040c0a60e173f0000a040862b8dbd33eb7e3f046978bdb8b7373fe1e0603e9190103e0000803f000040c0a60e173f0000a040045b1bbcda837f3fc6fd78bdb8b7373fe1e0603e9190103e0000803f000040c012a6263f0000c040045b1bbcda837f3fc6fd78bdbbba3a3fe5e4643e9594143e0000803f000000c0ac14293f0000c040045b1bbcda837f3fc6fd78bdbbba3a3fe5e4643e9594143e0000803f000040c0a60e173f0000a0400fbb883d53087d3faf9f0bbeb8b7373fe1e0603e9190103e0000803f000000c0ac14293f0000c0400fbb883d53087d3faf9f0bbebbba3a3fe5e4643e9594143e0000803f000000c0f4c3053f0000a0400fbb883d53087d3faf9f0bbeb4b3333fdddc5c3e9190103e0000803f000000c0f4c3053f0000a0404f09093dd5747d3f8fdb0bbeb4b3333fdddc5c3e9190103e0000803f000000c0ac14293f0000c0404f09093dd5747d3f8fdb0bbebbba3a3fe5e4643e9594143e0000803f000080bf166e203f0000c0404f09093dd5747d3f8fdb0bbeb9b8383fe5e4643e9594143e0000803f000000c0f4c3053f0000a0402908d13cd6c87d3f40dd03beb4b3333fdddc5c3e9190103e0000803f000080bf166e203f0000c0402908d13cd6c87d3f40dd03beb9b8383fe5e4643e9594143e0000803f000080bf335afe3e0000a0402908d13cd6c87d3f40dd03beb3b2323fd9d8583e8d8c0c3e0000803f000080bf335afe3e0000a0404f2d26bd7da87d3f72cc03beb3b2323fd9d8583e8d8c0c3e0000803f000080bf166e203f0000c0404f2d26bd7da87d3f72cc03beb9b8383fe5e4643e9594143e0000803f0000000077e92a3f0000c0404f2d26bd7da87d3f72cc03bebbba3a3fe5e4643e9594143e0000803f000080bf335afe3e0000a0406dc4e1bdb0fc7d3f63bc72bdb3b2323fd9d8583e8d8c0c3e0000803f0000000077e92a3f0000c0406dc4e1bdb0fc7d3f63bc72bdbbba3a3fe5e4643e9594143e0000803f00000000e99e1b3f0000a0406dc4e1bdb0fc7d3f63bc72bdb8b7373fe1e0603e9594143e0000803f00000000e99e1b3f0000a0402e6a4abc68867f3fab3474bdb8b7373fe1e0603e9594143e0000803f0000000077e92a3f0000c0402e6a4abc68867f3fab3474bdbbba3a3fe5e4643e9594143e0000803f0000803fa1142e3f0000c0402e6a4abc68867f3fab3474bdbcbb3b3fe5e4643e9594143e0000803f00000000e99e1b3f0000a040d83f66bd35907f3f5b3581bcb8b7373fe1e0603e9594143e0000803f0000803fa1142e3f0000c040d83f66bd35907f3f5b3581bcbcbb3b3fe5e4643e9594143e0000803f0000803f32092a3f0000a040d83f66bd35907f3f5b3581bcbbba3a3fe5e4643e9594143e0000803f0000803f32092a3f0000a0405948953d82497f3f9c1181bcbbba3a3fe5e4643e9594143e0000803f0000803fa1142e3f0000c0405948953d82497f3f9c1181bcbcbb3b3fe5e4643e9594143e0000803f000000403f5e1b3f0000c0405948953d82497f3f9c1181bcb8b7373fe1e0603e9594143e0000803f0000803f32092a3f0000a0407abce53d55fd7d3f95a162bdbbba3a3fe5e4643e9594143e0000803f000000403f5e1b3f0000c0407abce53d55fd7d3f95a162bdb8b7373fe1e0603e9594143e0000803f0000004072170d3f0000a0407abce53d55fd7d3f95a162bdb6b5353fdddc5c3e9190103e0000803f0000004072170d3f0000a040d580a13d8cce7e3f435c63bdb6b5353fdddc5c3e9190103e0000803f000000403f5e1b3f0000c040d580a13d8cce7e3f435c63bdb8b7373fe1e0603e9594143e0000803f00004040f115073f0000c040d580a13d8cce7e3f435c63bdb4b3333fdddc5c3e9190103e0000803f0000004072170d3f0000a0403231123e72847b3fbd2df5bdb6b5353fdddc5c3e9190103e0000803f00004040f115073f0000c0403231123e72847b3fbd2df5bdb4b3333fdddc5c3e9190103e0000803f00004040cac8cf3e0000a0403231123e72847b3fbd2df5bdaead2d3fd5d4543e8d8c0c3e0000803f00004040cac8cf3e0000a040283c163c191c7e3fabb4f7bdaead2d3fd5d4543e8d8c0c3e0000803f00004040f115073f0000c040283c163c191c7e3fabb4f7bdb4b3333fdddc5c3e9190103e0000803f0000804088b8043f0000c040283c163c191c7e3fabb4f7bdb4b3333fdddc5c3e9190103e0000803f00004040cac8cf3e0000a040c3e6ad3c7eac7d3f260108beaead2d3fd5d4543e8d8c0c3e0000803f0000804088b8043f0000c040c3e6ad3c7eac7d3f260108beb4b3333fdddc5c3e9190103e0000803f00008040dad0c43e0000a040c3e6ad3c7eac7d3f260108beadac2c3fd5d4543e8988083e0000803f00008040dad0c43e0000a040d93f42bd0b727d3fd0e107beadac2c3fd5d4543e8988083e0000803f0000804088b8043f0000c040d93f42bd0b727d3fd0e107beb4b3333fdddc5c3e9190103e0000803f0000a040d9fb103f0000c040d93f42bd0b727d3fd0e107beb6b5353fe1e0603e9190103e0000803f00008040dad0c43e0000a04091f336bb45fd7b3faf8634beadac2c3fd5d4543e8988083e0000803f0000a040d9fb103f0000c04091f336bb45fd7b3faf8634beb6b5353fe1e0603e9190103e0000803f0000a0409444c63e0000a04091f336bb45fd7b3faf8634beadac2c3fd5d4543e8988083e0000803f0000a0409444c63e0000a0401dc583bddc777b3f1b2734beadac2c3fd5d4543e8988083e0000803f0000a040d9fb103f0000c0401dc583bddc777b3f1b2734beb6b5353fe1e0603e9190103e0000803f0000c0407ac0213f0000c0401dc583bddc777b3f1b2734bebab9393fe5e4643e9594143e0000803f0000a0409444c63e0000a0402bd185bded7e7b3ffe2733beadac2c3fd5d4543e8988083e0000803f0000c0407ac0213f0000c0402bd185bded7e7b3ffe2733bebab9393fe5e4643e9594143e0000803f0000c0404152e83e0000a0402bd185bded7e7b3ffe2733beb1b0303fd9d8583e8d8c0c3e0000803f0000c0404152e83e0000a04006b27f3ac5087c3f308a33beb1b0303fd9d8583e8d8c0c3e0000803f0000c0407ac0213f0000c04006b27f3ac5087c3f308a33bebab9393fe5e4643e9594143e0000803f0000e0408c7f213f0000c04006b27f3ac5087c3f308a33bebab9393fe5e4643e9594143e0000803f0000c0404152e83e0000a0403bddf8bdf7b97d3f023b5dbdb1b0303fd9d8583e8d8c0c3e0000803f0000e0408c7f213f0000c0403bddf8bdf7b97d3f023b5dbdbab9393fe5e4643e9594143e0000803f0000e040248c133f0000a0403bddf8bdf7b97d3f023b5dbdb7b6363fe1e0603e9190103e0000803f0000e040248c133f0000a0400fad583d48437f3ff3915ebdb7b6363fe1e0603e9190103e0000803f0000e0408c7f213f0000c0400fad583d48437f3ff3915ebdbab9393fe5e4643e9594143e0000803f00000041b8ea133f0000c0400fad583d48437f3ff3915ebdb7b6363fe1e0603e9190103e0000803f0000e040248c133f0000a0404e24c8bd45947d3fd536c53db7b6363fe1e0603e9190103e0000803f00000041b8ea133f0000c0404e24c8bd45947d3fd536c53db7b6363fe1e0603e9190103e0000803f00000041d2cd2c3f0000a0404e24c8bd45947d3fd536c53dbcbb3b3fe5e4643e9594143e0000803f00000041d2cd2c3f0000a0403d74693d76627e3f32d7c53dbcbb3b3fe5e4643e9594143e0000803f00000041b8ea133f0000c0403d74693d76627e3f32d7c53db7b6363fe1e0603e9190103e0000803f00001041bc3b053f0000c0403d74693d76627e3f32d7c53db4b3333fdddc5c3e9190103e0000803f00000041d2cd2c3f0000a040242f4ebc32787c3f79fc283ebcbb3b3fe5e4643e9594143e0000803f00001041bc3b053f0000c040242f4ebc32787c3f79fc283eb4b3333fdddc5c3e9190103e0000803f000010411712303f0000a040242f4ebc32787c3f79fc283ebdbc3c3fe9e8683e9594143e0000803f000010411712303f0000a040a416ad3ce16e7c3f3df6283ebdbc3c3fe9e8683e9594143e0000803f00001041bc3b053f0000c040a416ad3ce16e7c3f3df6283eb4b3333fdddc5c3e9190103e0000803f00002041ec7eff3e0000c040a416ad3ce16e7c3f3df6283eb3b2323fd9d8583e8d8c0c3e0000803f000010411712303f0000a040c2040d3e09407d3ff0c8483dbdbc3c3fe9e8683e9594143e0000803f00002041ec7eff3e0000c040c2040d3e09407d3ff0c8483db3b2323fd9d8583e8d8c0c3e0000803f00002041e76e0c3f0000a040c2040d3e09407d3ff0c8483db5b4343fdddc5c3e9190103e0000803f000020c17c95593e0000c040ca5330bdebc27e3ffddfb4bda4a3233fc9c8483e8584043e0000803f000020c1053b9a3e0000e040ca5330bdebc27e3ffddfb4bda9a8283fcdcc4c3e8988083e0000803f000010c1ed60b03e0000e040ca5330bdebc27e3ffddfb4bdabaa2a3fd1d0503e8988083e0000803f000020c17c95593e0000c040555692bcb14f7e3f9dfae7bda4a3233fc9c8483e8584043e0000803f000010c1ed60b03e0000e040555692bcb14f7e3f9dfae7bdabaa2a3fd1d0503e8988083e0000803f000010c15fff6b3e0000c040555692bcb14f7e3f9dfae7bda5a4243fc9c8483e8584043e0000803f000010c15fff6b3e0000c04087751ebebe497b3fa238e5bda5a4243fc9c8483e8584043e0000803f000010c1ed60b03e0000e04087751ebebe497b3fa238e5bdabaa2a3fd1d0503e8988083e0000803f000000c1028c003f0000e04087751ebebe497b3fa238e5bdb3b2323fdddc5c3e9190103e0000803f000010c15fff6b3e0000c040ac391ebe604a7b3fb7b1e5bda5a4243fc9c8483e8584043e0000803f000000c1028c003f0000e040ac391ebe604a7b3fb7b1e5bdb3b2323fdddc5c3e9190103e0000803f000000c11598c63e0000c040ac391ebe604a7b3fb7b1e5bdadac2c3fd5d4543e8988083e0000803f000000c11598c63e0000c040902101bd00387e3fec5ee8bdadac2c3fd5d4543e8988083e0000803f000000c1028c003f0000e040902101bd00387e3fec5ee8bdb3b2323fdddc5c3e9190103e0000803f0000e0c095ac083f0000e040902101bd00387e3fec5ee8bdb5b4343fdddc5c3e9190103e0000803f000000c11598c63e0000c040c9cd62bd2a927e3f20f2b7bdadac2c3fd5d4543e8988083e0000803f0000e0c095ac083f0000e040c9cd62bd2a927e3f20f2b7bdb5b4343fdddc5c3e9190103e0000803f0000e0c08c1ae33e0000c040c9cd62bd2a927e3f20f2b7bdb0af2f3fd9d8583e8d8c0c3e0000803f0000e0c08c1ae33e0000c040fb77f93d41107d3f47dbb6bdb0af2f3fd9d8583e8d8c0c3e0000803f0000e0c095ac083f0000e040fb77f93d41107d3f47dbb6bdb5b4343fdddc5c3e9190103e0000803f0000c0c0e741d23e0000e040fb77f93d41107d3f47dbb6bdaead2d3fd5d4543e8d8c0c3e0000803f0000e0c08c1ae33e0000c0409953933dda237f3fef5520bdb0af2f3fd9d8583e8d8c0c3e0000803f0000c0c0e741d23e0000e0409953933dda237f3fef5520bdaead2d3fd5d4543e8d8c0c3e0000803f0000c0c0de25be3e0000c0409953933dda237f3fef5520bdacab2b3fd1d0503e8988083e0000803f0000c0c0de25be3e0000c04077a4093d86a87f3f4fa920bdacab2b3fd1d0503e8988083e0000803f0000c0c0e741d23e0000e04077a4093d86a87f3f4fa920bdaead2d3fd5d4543e8d8c0c3e0000803f0000a0c07507c13e0000e04077a4093d86a87f3f4fa920bdadac2c3fd5d4543e8988083e0000803f0000c0c0de25be3e0000c0407a4fe2ba68ff7f3fe8a27fbbacab2b3fd1d0503e8988083e0000803f0000a0c07507c13e0000e0407a4fe2ba68ff7f3fe8a27fbbadac2c3fd5d4543e8988083e0000803f0000a0c02e08bf3e0000c0407a4fe2ba68ff7f3fe8a27fbbacab2b3fd1d0503e8988083e0000803f0000a0c02e08bf3e0000c040505b14be0e4c7d3f88f07cbbacab2b3fd1d0503e8988083e0000803f0000a0c07507c13e0000e040505b14be0e4c7d3f88f07cbbadac2c3fd5d4543e8988083e0000803f000080c0e0ff053f0000e040505b14be0e4c7d3f88f07cbbb4b3333fdddc5c3e9190103e0000803f0000a0c02e08bf3e0000c040f1a417be612d7d3f10af17baacab2b3fd1d0503e8988083e0000803f000080c0e0ff053f0000e040f1a417be612d7d3f10af17bab4b3333fdddc5c3e9190103e0000803f000080c088d9053f0000c040f1a417be612d7d3f10af17bab4b3333fdddc5c3e9190103e0000803f000080c088d9053f0000c040971c0dbebe8e7d3f65e917bab4b3333fdddc5c3e9190103e0000803f000080c0e0ff053f0000e040971c0dbebe8e7d3f65e917bab4b3333fdddc5c3e9190103e0000803f000040c0049e293f0000e040971c0dbebe8e7d3f65e917babbba3a3fe5e4643e9594143e0000803f000080c088d9053f0000c040a41f02be58e87d3ff96e3cbcb4b3333fdddc5c3e9190103e0000803f000040c0049e293f0000e040a41f02be58e87d3ff96e3cbcbbba3a3fe5e4643e9594143e0000803f000040c012a6263f0000c040a41f02be58e87d3ff96e3cbcbbba3a3fe5e4643e9594143e0000803f000040c012a6263f0000c04087dc49b998fb7f3f3bf93dbcbbba3a3fe5e4643e9594143e0000803f000040c0049e293f0000e04087dc49b998fb7f3f3bf93dbcbbba3a3fe5e4643e9594143e0000803f000000c0a2aa293f0000e04087dc49b998fb7f3f3bf93dbcbbba3a3fe5e4643e9594143e0000803f000040c012a6263f0000c0409aa41bbce0fc7f3f2bf415bbbbba3a3fe5e4643e9594143e0000803f000000c0a2aa293f0000e0409aa41bbce0fc7f3f2bf415bbbbba3a3fe5e4643e9594143e0000803f000000c0ac14293f0000c0409aa41bbce0fc7f3f2bf415bbbbba3a3fe5e4643e9594143e0000803f000000c0ac14293f0000c040c7d5a63d04267f3f4f7615bbbbba3a3fe5e4643e9594143e0000803f000000c0a2aa293f0000e040c7d5a63d04267f3f4f7615bbbbba3a3fe5e4643e9594143e0000803f000080bf18be143f0000e040c7d5a63d04267f3f4f7615bbb7b6363fe1e0603e9190103e0000803f000000c0ac14293f0000c0405b300a3d8a967f3fd7b23a3dbbba3a3fe5e4643e9594143e0000803f000080bf18be143f0000e0405b300a3d8a967f3fd7b23a3db7b6363fe1e0603e9190103e0000803f000080bf166e203f0000c0405b300a3d8a967f3fd7b23a3db9b8383fe5e4643e9594143e0000803f000080bf166e203f0000c040b7682e3c1ab87f3f5bcb3a3db9b8383fe5e4643e9594143e0000803f000080bf18be143f0000e040b7682e3c1ab87f3f5bcb3a3db7b6363fe1e0603e9190103e0000803f00000000b103123f0000e040b7682e3c1ab87f3f5bcb3a3db7b6363fe1e0603e9190103e0000803f000080bf166e203f0000c04000c926bd24967e3fa514c63db9b8383fe5e4643e9594143e0000803f00000000b103123f0000e04000c926bd24967e3fa514c63db7b6363fe1e0603e9190103e0000803f0000000077e92a3f0000c04000c926bd24967e3fa514c63dbbba3a3fe5e4643e9594143e0000803f0000000077e92a3f0000c04009b68cb83ccc7e3fbb3ec63dbbba3a3fe5e4643e9594143e0000803f00000000b103123f0000e04009b68cb83ccc7e3fbb3ec63db7b6363fe1e0603e9190103e0000803f0000803f1c08123f0000e04009b68cb83ccc7e3fbb3ec63db7b6363fe1e0603e9190103e0000803f0000000077e92a3f0000c040c39149bc35757e3f1c0adf3dbbba3a3fe5e4643e9594143e0000803f0000803f1c08123f0000e040c39149bc35757e3f1c0adf3db7b6363fe1e0603e9190103e0000803f0000803fa1142e3f0000c040c39149bc35757e3f1c0adf3dbcbb3b3fe5e4643e9594143e0000803f0000803fa1142e3f0000c0403b25143c79777e3f190cdf3dbcbb3b3fe5e4643e9594143e0000803f0000803f1c08123f0000e0403b25143c79777e3f190cdf3db7b6363fe1e0603e9190103e0000803f00000040f5b30f3f0000e0403b25143c79777e3f190cdf3db6b5353fdddc5c3e9190103e0000803f0000803fa1142e3f0000c040af25953d3b0e7f3f5cf4393dbcbb3b3fe5e4643e9594143e0000803f00000040f5b30f3f0000e040af25953d3b0e7f3f5cf4393db6b5353fdddc5c3e9190103e0000803f000000403f5e1b3f0000c040af25953d3b0e7f3f5cf4393db8b7373fe1e0603e9594143e0000803f000000403f5e1b3f0000c0400d9b123c71b97f3f2f713a3db8b7373fe1e0603e9594143e0000803f00000040f5b30f3f0000e0400d9b123c71b97f3f2f713a3db6b5353fdddc5c3e9190103e0000803f00004040e7680d3f0000e0400d9b123c71b97f3f2f713a3db6b5353fdddc5c3e9190103e0000803f000000403f5e1b3f0000c04021b4a13d7a1f7f3f43adc9bcb8b7373fe1e0603e9594143e0000803f00004040e7680d3f0000e04021b4a13d7a1f7f3f43adc9bcb6b5353fdddc5c3e9190103e0000803f00004040f115073f0000c04021b4a13d7a1f7f3f43adc9bcb4b3333fdddc5c3e9190103e0000803f00004040f115073f0000c040f262d9baeceb7f3fe04ecabcb4b3333fdddc5c3e9190103e0000803f00004040e7680d3f0000e040f262d9baeceb7f3fe04ecabcb6b5353fdddc5c3e9190103e0000803f00008040a1d50d3f0000e040f262d9baeceb7f3fe04ecabcb6b5353fdddc5c3e9190103e0000803f00004040f115073f0000c0401240173cb8d37f3f57b811bdb4b3333fdddc5c3e9190103e0000803f00008040a1d50d3f0000e0401240173cb8d37f3f57b811bdb6b5353fdddc5c3e9190103e0000803f0000804088b8043f0000c0401240173cb8d37f3f57b811bdb4b3333fdddc5c3e9190103e0000803f0000804088b8043f0000c040a3c293bdd22b7f3fb45811bdb4b3333fdddc5c3e9190103e0000803f00008040a1d50d3f0000e040a3c293bdd22b7f3fb45811bdb6b5353fdddc5c3e9190103e0000803f0000a040515d203f0000e040a3c293bdd22b7f3fb45811bdb9b8383fe5e4643e9594143e0000803f0000804088b8043f0000c0406fa143bd613f7f3f565e75bdb4b3333fdddc5c3e9190103e0000803f0000a040515d203f0000e0406fa143bd613f7f3f565e75bdb9b8383fe5e4643e9594143e0000803f0000a040d9fb103f0000c0406fa143bd613f7f3f565e75bdb6b5353fe1e0603e9190103e0000803f0000a040d9fb103f0000c040e2d954bda5317f3f215175bdb6b5353fe1e0603e9190103e0000803f0000a040515d203f0000e040e2d954bda5317f3f215175bdb9b8383fe5e4643e9594143e0000803f0000c040b1b52d3f0000e040e2d954bda5317f3f215175bdbcbb3b3fe5e4643e9594143e0000803f0000a040d9fb103f0000c04070b685bdf32c7f3fb4b53ebdb6b5353fe1e0603e9190103e0000803f0000c040b1b52d3f0000e04070b685bdf32c7f3fb4b53ebdbcbb3b3fe5e4643e9594143e0000803f0000c0407ac0213f0000c04070b685bdf32c7f3fb4b53ebdbab9393fe5e4643e9594143e0000803f0000c0407ac0213f0000c04079edbd3d819e7e3f3f4b3ebdbab9393fe5e4643e9594143e0000803f0000c040b1b52d3f0000e04079edbd3d819e7e3f3f4b3ebdbcbb3b3fe5e4643e9594143e0000803f0000e0400cd7153f0000e04079edbd3d819e7e3f3f4b3ebdb7b6363fe1e0603e9190103e0000803f0000c0407ac0213f0000c04091b9813a1ebc7f3f8a563a3dbab9393fe5e4643e9594143e0000803f0000e0400cd7153f0000e04091b9813a1ebc7f3f8a563a3db7b6363fe1e0603e9190103e0000803f0000e0408c7f213f0000c04091b9813a1ebc7f3f8a563a3dbab9393fe5e4643e9594143e0000803f0000e0408c7f213f0000c040c2f91d3e62ac7c3f7b1b383dbab9393fe5e4643e9594143e0000803f0000e0400cd7153f0000e040c2f91d3e62ac7c3f7b1b383db7b6363fe1e0603e9190103e0000803f00000041fea6db3e0000e040c2f91d3e62ac7c3f7b1b383dafae2e3fd5d4543e8d8c0c3e0000803f0000e0408c7f213f0000c040e7a3563d50dd7c3f287f163ebab9393fe5e4643e9594143e0000803f00000041fea6db3e0000e040e7a3563d50dd7c3f287f163eafae2e3fd5d4543e8d8c0c3e0000803f00000041b8ea133f0000c040e7a3563d50dd7c3f287f163eb7b6363fe1e0603e9190103e0000803f00000041b8ea133f0000c0406619c73d54037c3f6bfd153eb7b6363fe1e0603e9190103e0000803f00000041fea6db3e0000e0406619c73d54037c3f6bfd153eafae2e3fd5d4543e8d8c0c3e0000803f000010410d17a93e0000e0406619c73d54037c3f6bfd153eaaa9293fd1d0503e8988083e0000803f00000041b8ea133f0000c040116f663df9177b3f4f053f3eb7b6363fe1e0603e9190103e0000803f000010410d17a93e0000e040116f663df9177b3f4f053f3eaaa9293fd1d0503e8988083e0000803f00001041bc3b053f0000c040116f663df9177b3f4f053f3eb4b3333fdddc5c3e9190103e0000803f00001041bc3b053f0000c040eb158ebdd0e27a3fdddc3e3eb4b3333fdddc5c3e9190103e0000803f000010410d17a93e0000e040eb158ebdd0e27a3fdddc3e3eaaa9293fd1d0503e8988083e0000803f00002041e455cd3e0000e040eb158ebdd0e27a3fdddc3e3eaead2d3fd5d4543e8988083e0000803f00001041bc3b053f0000c04079a8ae3ceab87e3fc5a3c73db4b3333fdddc5c3e9190103e0000803f00002041e455cd3e0000e04079a8ae3ceab87e3fc5a3c73daead2d3fd5d4543e8988083e0000803f00002041ec7eff3e0000c04079a8ae3ceab87e3fc5a3c73db3b2323fd9d8583e8d8c0c3e0000803f000020c1053b9a3e0000e0402c8ebfbdcda87e3fb2c7283da9a8283fcdcc4c3e8988083e0000803f000020c1a005853e000000412c8ebfbdcda87e3fb2c7283da7a6263fcdcc4c3e8584043e0000803f000010c1b529b53e000000412c8ebfbdcda87e3fb2c7283dabaa2a3fd1d0503e8988083e0000803f000020c1053b9a3e0000e040e50231bdeabf7f3fadf218bca9a8283fcdcc4c3e8988083e0000803f000010c1b529b53e00000041e50231bdeabf7f3fadf218bcabaa2a3fd1d0503e8988083e0000803f000010c1ed60b03e0000e040e50231bdeabf7f3fadf218bcabaa2a3fd1d0503e8988083e0000803f000010c1ed60b03e0000e0403fa622be2ebd7c3fbf2517bcabaa2a3fd1d0503e8988083e0000803f000010c1b529b53e000000413fa622be2ebd7c3fbf2517bcabaa2a3fd1d0503e8988083e0000803f000000c1bac4033f000000413fa622be2ebd7c3fbf2517bcb4b3333fdddc5c3e9190103e0000803f000010c1ed60b03e0000e040df721fbe80db7c3f10a64bbcabaa2a3fd1d0503e8988083e0000803f000000c1bac4033f00000041df721fbe80db7c3f10a64bbcb4b3333fdddc5c3e9190103e0000803f000000c1028c003f0000e040df721fbe80db7c3f10a64bbcb3b2323fdddc5c3e9190103e0000803f000000c1028c003f0000e0400a07eabc10e07f3f47144ebcb3b2323fdddc5c3e9190103e0000803f000000c1bac4033f000000410a07eabc10e07f3f47144ebcb4b3333fdddc5c3e9190103e0000803f0000e0c0dc150b3f000000410a07eabc10e07f3f47144ebcb5b4343fdddc5c3e9190103e0000803f000000c1028c003f0000e040f3f601bd19dc7f3f1c3c1abcb3b2323fdddc5c3e9190103e0000803f0000e0c0dc150b3f00000041f3f601bd19dc7f3f1c3c1abcb5b4343fdddc5c3e9190103e0000803f0000e0c095ac083f0000e040f3f601bd19dc7f3f1c3c1abcb5b4343fdddc5c3e9190103e0000803f0000e0c095ac083f0000e040e76b013e94ef7d3f361319bcb5b4343fdddc5c3e9190103e0000803f0000e0c0dc150b3f00000041e76b013e94ef7d3f361319bcb5b4343fdddc5c3e9190103e0000803f0000c0c01cefd43e00000041e76b013e94ef7d3f361319bcafae2e3fd5d4543e8d8c0c3e0000803f0000e0c095ac083f0000e0403677fa3d2a137e3f7803aabbb5b4343fdddc5c3e9190103e0000803f0000c0c01cefd43e000000413677fa3d2a137e3f7803aabbafae2e3fd5d4543e8d8c0c3e0000803f0000c0c0e741d23e0000e0403677fa3d2a137e3f7803aabbaead2d3fd5d4543e8d8c0c3e0000803f0000c0c0e741d23e0000e0400075183db2d17f3f442eabbbaead2d3fd5d4543e8d8c0c3e0000803f0000c0c01cefd43e000000410075183db2d17f3f442eabbbafae2e3fd5d4543e8d8c0c3e0000803f0000a0c009ddc13e000000410075183db2d17f3f442eabbbadac2c3fd5d4543e8988083e0000803f0000c0c0e741d23e0000e0408fbf093dd7da7f3f0075d5baaead2d3fd5d4543e8d8c0c3e0000803f0000a0c009ddc13e000000418fbf093dd7da7f3f0075d5baadac2c3fd5d4543e8988083e0000803f0000a0c07507c13e0000e0408fbf093dd7da7f3f0075d5baadac2c3fd5d4543e8988083e0000803f0000a0c07507c13e0000e040313011bed4697d3f8f6bd3baadac2c3fd5d4543e8988083e0000803f0000a0c009ddc13e00000041313011bed4697d3f8f6bd3baadac2c3fd5d4543e8988083e0000803f000080c06999053f00000041313011bed4697d3f8f6bd3bab4b3333fdddc5c3e9190103e0000803f0000a0c07507c13e0000e0408d5b14be764c7d3f6bc4ca3aadac2c3fd5d4543e8988083e0000803f000080c06999053f000000418d5b14be764c7d3f6bc4ca3ab4b3333fdddc5c3e9190103e0000803f000080c0e0ff053f0000e0408d5b14be764c7d3f6bc4ca3ab4b3333fdddc5c3e9190103e0000803f000080c0e0ff053f0000e040dc27d9bd788e7e3f30c6cb3ab4b3333fdddc5c3e9190103e0000803f000080c06999053f00000041dc27d9bd788e7e3f30c6cb3ab4b3333fdddc5c3e9190103e0000803f000040c0cce5203f00000041dc27d9bd788e7e3f30c6cb3ab9b8383fe5e4643e9594143e0000803f000080c0e0ff053f0000e0400e080dbed8697d3fa41a0a3db4b3333fdddc5c3e9190103e0000803f000040c0cce5203f000000410e080dbed8697d3fa41a0a3db9b8383fe5e4643e9594143e0000803f000040c0049e293f0000e0400e080dbed8697d3fa41a0a3dbbba3a3fe5e4643e9594143e0000803f000040c0049e293f0000e0405e428d3d073e7f3fca190b3dbbba3a3fe5e4643e9594143e0000803f000040c0cce5203f000000415e428d3d073e7f3fca190b3db9b8383fe5e4643e9594143e0000803f000000c015300f3f000000415e428d3d073e7f3fca190b3db6b5353fdddc5c3e9190103e0000803f000040c0049e293f0000e040c0cd48b939a47e3fa2b4d23dbbba3a3fe5e4643e9594143e0000803f000000c015300f3f00000041c0cd48b939a47e3fa2b4d23db6b5353fdddc5c3e9190103e0000803f000000c0a2aa293f0000e040c0cd48b939a47e3fa2b4d23dbbba3a3fe5e4643e9594143e0000803f000000c0a2aa293f0000e0400b1f073e356a7c3ff8dcd03dbbba3a3fe5e4643e9594143e0000803f000000c015300f3f000000410b1f073e356a7c3ff8dcd03db6b5353fdddc5c3e9190103e0000803f000080bffddad93e000000410b1f073e356a7c3ff8dcd03dafae2e3fd5d4543e8d8c0c3e0000803f000000c0a2aa293f0000e040d6dda43d51237c3f55db1c3ebbba3a3fe5e4643e9594143e0000803f000080bffddad93e00000041d6dda43d51237c3f55db1c3eafae2e3fd5d4543e8d8c0c3e0000803f000080bf18be143f0000e040d6dda43d51237c3f55db1c3eb7b6363fe1e0603e9190103e0000803f000080bf18be143f0000e040216fb23c20e67c3f86541d3eb7b6363fe1e0603e9190103e0000803f000080bffddad93e00000041216fb23c20e67c3f86541d3eafae2e3fd5d4543e8d8c0c3e0000803f000000000991ce3e00000041216fb23c20e67c3f86541d3eaead2d3fd5d4543e8d8c0c3e0000803f000080bf18be143f0000e0405a352c3c197e7c3f3095283eb7b6363fe1e0603e9190103e0000803f000000000991ce3e000000415a352c3c197e7c3f3095283eaead2d3fd5d4543e8d8c0c3e0000803f00000000b103123f0000e0405a352c3c197e7c3f3095283eb7b6363fe1e0603e9190103e0000803f00000000b103123f0000e040d04146b8ac817c3f9397283eb7b6363fe1e0603e9190103e0000803f000000000991ce3e00000041d04146b8ac817c3f9397283eaead2d3fd5d4543e8d8c0c3e0000803f0000803f5197ce3e00000041d04146b8ac817c3f9397283eaead2d3fd5d4543e8d8c0c3e0000803f00000000b103123f0000e040ff718bb877817c3f7a9c283eb7b6363fe1e0603e9190103e0000803f0000803f5197ce3e00000041ff718bb877817c3f7a9c283eaead2d3fd5d4543e8d8c0c3e0000803f0000803f1c08123f0000e040ff718bb877817c3f7a9c283eb7b6363fe1e0603e9190103e0000803f0000803f1c08123f0000e040d38108bb52817c3f619c283eb7b6363fe1e0603e9190103e0000803f0000803f5197ce3e00000041d38108bb52817c3f619c283eaead2d3fd5d4543e8d8c0c3e0000803f000000401caccf3e00000041d38108bb52817c3f619c283eaead2d3fd5d4543e8d8c0c3e0000803f0000803f1c08123f0000e040d441133cdff07c3fc88f1d3eb7b6363fe1e0603e9190103e0000803f000000401caccf3e00000041d441133cdff07c3fc88f1d3eaead2d3fd5d4543e8d8c0c3e0000803f00000040f5b30f3f0000e040d441133cdff07c3fc88f1d3eb6b5353fdddc5c3e9190103e0000803f00000040f5b30f3f0000e040b02404bb5bf37c3f55911d3eb6b5353fdddc5c3e9190103e0000803f000000401caccf3e00000041b02404bb5bf37c3f55911d3eaead2d3fd5d4543e8d8c0c3e0000803f0000404095b7d03e00000041b02404bb5bf37c3f55911d3eaead2d3fd5d4543e8d8c0c3e0000803f00000040f5b30f3f0000e0409b3e113ca6597d3fbbab123eb6b5353fdddc5c3e9190103e0000803f0000404095b7d03e000000419b3e113ca6597d3fbbab123eaead2d3fd5d4543e8d8c0c3e0000803f00004040e7680d3f0000e0409b3e113ca6597d3fbbab123eb6b5353fdddc5c3e9190103e0000803f00004040e7680d3f0000e040f2fb80bbb35b7d3febac123eb6b5353fdddc5c3e9190103e0000803f0000404095b7d03e00000041f2fb80bbb35b7d3febac123eaead2d3fd5d4543e8d8c0c3e0000803f00008040e6c0d23e00000041f2fb80bbb35b7d3febac123eaead2d3fd5d4543e8d8c0c3e0000803f00004040e7680d3f0000e040db47d7ba45717d3fc05f103eb6b5353fdddc5c3e9190103e0000803f00008040e6c0d23e00000041db47d7ba45717d3fc05f103eaead2d3fd5d4543e8d8c0c3e0000803f00008040a1d50d3f0000e040db47d7ba45717d3fc05f103eb6b5353fdddc5c3e9190103e0000803f00008040a1d50d3f0000e0405c5ecfbde8237c3fd9a10f3eb6b5353fdddc5c3e9190103e0000803f00008040e6c0d23e000000415c5ecfbde8237c3fd9a10f3eaead2d3fd5d4543e8d8c0c3e0000803f0000a040d3b1033f000000415c5ecfbde8237c3fd9a10f3eb4b3333fdddc5c3e9190103e0000803f00008040a1d50d3f0000e04089f092bdffc07d3fc658e33db6b5353fdddc5c3e9190103e0000803f0000a040d3b1033f0000004189f092bdffc07d3fc658e33db4b3333fdddc5c3e9190103e0000803f0000a040515d203f0000e04089f092bdffc07d3fc658e33db9b8383fe5e4643e9594143e0000803f0000a040515d203f0000e040b398e0bd05e07c3f358fe23db9b8383fe5e4643e9594143e0000803f0000a040d3b1033f00000041b398e0bd05e07c3f358fe23db4b3333fdddc5c3e9190103e0000803f0000c040ba1d203f00000041b398e0bd05e07c3f358fe23db9b8383fe5e4643e9594143e0000803f0000a040515d203f0000e0404bef54bd504b7f3fede5583db9b8383fe5e4643e9594143e0000803f0000c040ba1d203f000000414bef54bd504b7f3fede5583db9b8383fe5e4643e9594143e0000803f0000c040b1b52d3f0000e0404bef54bd504b7f3fede5583dbcbb3b3fe5e4643e9594143e0000803f0000c040b1b52d3f0000e04096f9743da62e7f3f92cd583dbcbb3b3fe5e4643e9594143e0000803f0000c040ba1d203f0000004196f9743da62e7f3f92cd583db9b8383fe5e4643e9594143e0000803f0000e04091c1103f0000004196f9743da62e7f3f92cd583db6b5353fe1e0603e9190103e0000803f0000c040b1b52d3f0000e0408418be3d35d87e3f67f3a13cbcbb3b3fe5e4643e9594143e0000803f0000e04091c1103f000000418418be3d35d87e3f67f3a13cb6b5353fe1e0603e9190103e0000803f0000e0400cd7153f0000e0408418be3d35d87e3f67f3a13cb7b6363fe1e0603e9190103e0000803f0000e0400cd7153f0000e0403a9c233e55a97c3f3e90a03cb7b6363fe1e0603e9190103e0000803f0000e04091c1103f000000413a9c233e55a97c3f3e90a03cb6b5353fe1e0603e9190103e0000803f000000414da0ce3e000000413a9c233e55a97c3f3e90a03caead2d3fd5d4543e8d8c0c3e0000803f0000e0400cd7153f0000e040e3151e3e5fd97c3f5cdacd3cb7b6363fe1e0603e9190103e0000803f000000414da0ce3e00000041e3151e3e5fd97c3f5cdacd3caead2d3fd5d4543e8d8c0c3e0000803f00000041fea6db3e0000e040e3151e3e5fd97c3f5cdacd3cafae2e3fd5d4543e8d8c0c3e0000803f00000041fea6db3e0000e04063af043e7cc27d3f2598ce3cafae2e3fd5d4543e8d8c0c3e0000803f000000414da0ce3e0000004163af043e7cc27d3f2598ce3caead2d3fd5d4543e8d8c0c3e0000803f00001041abb28b3e0000004163af043e7cc27d3f2598ce3ca7a6263fcdcc4c3e8584043e0000803f00000041fea6db3e0000e04040f1c83d95587e3f279e693dafae2e3fd5d4543e8d8c0c3e0000803f00001041abb28b3e0000004140f1c83d95587e3f279e693da7a6263fcdcc4c3e8584043e0000803f000010410d17a93e0000e04040f1c83d95587e3f279e693daaa9293fd1d0503e8988083e0000803f000010410d17a93e0000e040ab249cbc66887f3f35b56a3daaa9293fd1d0503e8988083e0000803f00001041abb28b3e00000041ab249cbc66887f3f35b56a3da7a6263fcdcc4c3e8584043e0000803f000020418779953e00000041ab249cbc66887f3f35b56a3da8a7273fcdcc4c3e8584043e0000803f000010410d17a93e0000e04062c58fbdaadc7d3fba93dd3daaa9293fd1d0503e8988083e0000803f000020418779953e0000004162c58fbdaadc7d3fba93dd3da8a7273fcdcc4c3e8584043e0000803f00002041e455cd3e0000e04062c58fbdaadc7d3fba93dd3daead2d3fd5d4543e8988083e0000803f000020c1a005853e00000041871f93bdd33f7f3f3908d83ca7a6263fcdcc4c3e8584043e0000803f000020c1e4f56e3e00001041871f93bdd33f7f3f3908d83ca5a4243fc9c8483e8584043e0000803f000010c1855e9c3e00001041871f93bdd33f7f3f3908d83ca9a8283fcdcc4c3e8988083e0000803f000020c1a005853e00000041e97ebfbd83947e3fde3f453da7a6263fcdcc4c3e8584043e0000803f000010c1855e9c3e00001041e97ebfbd83947e3fde3f453da9a8283fcdcc4c3e8988083e0000803f000010c1b529b53e00000041e97ebfbd83947e3fde3f453dabaa2a3fd1d0503e8988083e0000803f000010c1b529b53e0000004138ecbabd13a27e3f604a453dabaa2a3fd1d0503e8988083e0000803f000010c1855e9c3e0000104138ecbabd13a27e3f604a453da9a8283fcdcc4c3e8988083e0000803f000000c1cb59cb3e0000104138ecbabd13a27e3f604a453daead2d3fd5d4543e8988083e0000803f000010c1b529b53e00000041629221be84107b3f731aec3dabaa2a3fd1d0503e8988083e0000803f000000c1cb59cb3e00001041629221be84107b3f731aec3daead2d3fd5d4543e8988083e0000803f000000c1bac4033f00000041629221be84107b3f731aec3db4b3333fdddc5c3e9190103e0000803f000000c1bac4033f00000041f90c13bde1157e3fbaf1ee3db4b3333fdddc5c3e9190103e0000803f000000c1cb59cb3e00001041f90c13bde1157e3fbaf1ee3daead2d3fd5d4543e8988083e0000803f0000e0c0dfdedd3e00001041f90c13bde1157e3fbaf1ee3dafae2e3fd5d4543e8d8c0c3e0000803f000000c1bac4033f0000004117a5e8bc125d7e3fddc2df3db4b3333fdddc5c3e9190103e0000803f0000e0c0dfdedd3e0000104117a5e8bc125d7e3fddc2df3dafae2e3fd5d4543e8d8c0c3e0000803f0000e0c0dc150b3f0000004117a5e8bc125d7e3fddc2df3db5b4343fdddc5c3e9190103e0000803f0000e0c0dc150b3f000000415a96ea3c9f5c7e3f78c2df3db5b4343fdddc5c3e9190103e0000803f0000e0c0dfdedd3e000010415a96ea3c9f5c7e3f78c2df3dafae2e3fd5d4543e8d8c0c3e0000803f0000c0c04d1dcf3e000010415a96ea3c9f5c7e3f78c2df3daead2d3fd5d4543e8d8c0c3e0000803f0000e0c0dc150b3f000000413e6b013e49ee7d3f89b8383cb5b4343fdddc5c3e9190103e0000803f0000c0c04d1dcf3e000010413e6b013e49ee7d3f89b8383caead2d3fd5d4543e8d8c0c3e0000803f0000c0c01cefd43e000000413e6b013e49ee7d3f89b8383cafae2e3fd5d4543e8d8c0c3e0000803f0000c0c01cefd43e000000415b460fbc44f97f3ffa343a3cafae2e3fd5d4543e8d8c0c3e0000803f0000c0c04d1dcf3e000010415b460fbc44f97f3ffa343a3caead2d3fd5d4543e8d8c0c3e0000803f0000a0c09e97d33e000010415b460fbc44f97f3ffa343a3caead2d3fd5d4543e8d8c0c3e0000803f0000c0c01cefd43e000000412f5e183d6aab7f3fcba50dbdafae2e3fd5d4543e8d8c0c3e0000803f0000a0c09e97d33e000010412f5e183d6aab7f3fcba50dbdaead2d3fd5d4543e8d8c0c3e0000803f0000a0c009ddc13e000000412f5e183d6aab7f3fcba50dbdadac2c3fd5d4543e8988083e0000803f0000a0c009ddc13e0000004198e6aabd4ff47e3f59400dbdadac2c3fd5d4543e8988083e0000803f0000a0c09e97d33e0000104198e6aabd4ff47e3f59400dbdaead2d3fd5d4543e8d8c0c3e0000803f000080c0207efe3e0000104198e6aabd4ff47e3f59400dbdb3b2323fd9d8583e8d8c0c3e0000803f0000a0c009ddc13e00000041092511be5a567d3fd12dc93cadac2c3fd5d4543e8988083e0000803f000080c0207efe3e00001041092511be5a567d3fd12dc93cb3b2323fd9d8583e8d8c0c3e0000803f000080c06999053f00000041092511be5a567d3fd12dc93cb4b3333fdddc5c3e9190103e0000803f000080c06999053f00000041b6b54cbdf5997f3f17faca3cb4b3333fdddc5c3e9190103e0000803f000080c0207efe3e00001041b6b54cbdf5997f3f17faca3cb3b2323fd9d8583e8d8c0c3e0000803f000040c0870f0c3f00001041b6b54cbdf5997f3f17faca3cb5b4343fdddc5c3e9190103e0000803f000080c06999053f00000041bb72d8bd26ba7d3f4837a53db4b3333fdddc5c3e9190103e0000803f000040c0870f0c3f00001041bb72d8bd26ba7d3f4837a53db5b4343fdddc5c3e9190103e0000803f000040c0cce5203f00000041bb72d8bd26ba7d3f4837a53db9b8383fe5e4643e9594143e0000803f000040c0cce5203f0000004164b2aa3db5447e3f8191a53db9b8383fe5e4643e9594143e0000803f000040c0870f0c3f0000104164b2aa3db5447e3f8191a53db5b4343fdddc5c3e9190103e0000803f000000c00f28ed3e0000104164b2aa3db5447e3f8191a53db1b0303fd9d8583e8d8c0c3e0000803f000040c0cce5203f00000041fdb18c3d26397e3f9e82c33db9b8383fe5e4643e9594143e0000803f000000c00f28ed3e00001041fdb18c3d26397e3f9e82c33db1b0303fd9d8583e8d8c0c3e0000803f000000c015300f3f00000041fdb18c3d26397e3f9e82c33db6b5353fdddc5c3e9190103e0000803f000000c015300f3f00000041c7fd093e3c807c3f892fc23db6b5353fdddc5c3e9190103e0000803f000000c00f28ed3e00001041c7fd093e3c807c3f892fc23db1b0303fd9d8583e8d8c0c3e0000803f000080bf6734a73e00001041c7fd093e3c807c3f892fc23daaa9293fd1d0503e8988083e0000803f000000c015300f3f00000041622e073edd867c3faadac73db6b5353fdddc5c3e9190103e0000803f000080bf6734a73e00001041622e073edd867c3faadac73daaa9293fd1d0503e8988083e0000803f000080bffddad93e00000041622e073edd867c3faadac73dafae2e3fd5d4543e8d8c0c3e0000803f000080bffddad93e00000041d8bf563df4677e3f6957c93dafae2e3fd5d4543e8d8c0c3e0000803f000080bf6734a73e00001041d8bf563df4677e3f6957c93daaa9293fd1d0503e8988083e0000803f000000005e318c3e00001041d8bf563df4677e3f6957c93da7a6263fcdcc4c3e8584043e0000803f000080bffddad93e000000419514b33ca1d07d3f479d033eafae2e3fd5d4543e8d8c0c3e0000803f000000005e318c3e000010419514b33ca1d07d3f479d033ea7a6263fcdcc4c3e8584043e0000803f000000000991ce3e000000419514b33ca1d07d3f479d033eaead2d3fd5d4543e8d8c0c3e0000803f000000000991ce3e000000415039ca3becde7d3fb0a4033eaead2d3fd5d4543e8d8c0c3e0000803f000000005e318c3e000010415039ca3becde7d3fb0a4033ea7a6263fcdcc4c3e8584043e0000803f0000803fb001893e000010415039ca3becde7d3fb0a4033ea7a6263fcdcc4c3e8584043e0000803f000000000991ce3e00000041442b47b801ab7d3fb7e6093eaead2d3fd5d4543e8d8c0c3e0000803f0000803fb001893e00001041442b47b801ab7d3fb7e6093ea7a6263fcdcc4c3e8584043e0000803f0000803f5197ce3e00000041442b47b801ab7d3fb7e6093eaead2d3fd5d4543e8d8c0c3e0000803f0000803f5197ce3e0000004148a758bd1a507d3f4cb5093eaead2d3fd5d4543e8d8c0c3e0000803f0000803fb001893e0000104148a758bd1a507d3f4cb5093ea7a6263fcdcc4c3e8584043e0000803f000000402460a43e0000104148a758bd1a507d3f4cb5093eaaa9293fd1d0503e8988083e0000803f0000803f5197ce3e000000416be709bbc7167f3f1992ac3daead2d3fd5d4543e8d8c0c3e0000803f000000402460a43e000010416be709bbc7167f3f1992ac3daaa9293fd1d0503e8988083e0000803f000000401caccf3e000000416be709bbc7167f3f1992ac3daead2d3fd5d4543e8d8c0c3e0000803f000000401caccf3e00000041960c65bdbdb07e3f114dac3daead2d3fd5d4543e8d8c0c3e0000803f000000402460a43e00001041960c65bdbdb07e3f114dac3daaa9293fd1d0503e8988083e0000803f000040406727c13e00001041960c65bdbdb07e3f114dac3dadac2c3fd5d4543e8988083e0000803f000000401caccf3e000000419fac05bb9ce17f3f50e5f83caead2d3fd5d4543e8d8c0c3e0000803f000040406727c13e000010419fac05bb9ce17f3f50e5f83cadac2c3fd5d4543e8988083e0000803f0000404095b7d03e000000419fac05bb9ce17f3f50e5f83caead2d3fd5d4543e8d8c0c3e0000803f0000404095b7d03e0000004154b726bc5ade7f3f26e2f83caead2d3fd5d4543e8d8c0c3e0000803f000040406727c13e0000104154b726bc5ade7f3f26e2f83cadac2c3fd5d4543e8988083e0000803f00008040d15dc63e0000104154b726bc5ade7f3f26e2f83cadac2c3fd5d4543e8988083e0000803f0000404095b7d03e000000413a4a82bb50ec7f3f1222c63caead2d3fd5d4543e8d8c0c3e0000803f00008040d15dc63e000010413a4a82bb50ec7f3f1222c63cadac2c3fd5d4543e8988083e0000803f00008040e6c0d23e000000413a4a82bb50ec7f3f1222c63caead2d3fd5d4543e8d8c0c3e0000803f00008040e6c0d23e00000041aad28abd23567f3fceadc53caead2d3fd5d4543e8d8c0c3e0000803f00008040d15dc63e00001041aad28abd23567f3fceadc53cadac2c3fd5d4543e8988083e0000803f0000a0409229e93e00001041aad28abd23567f3fceadc53cb1b0303fd9d8583e8d8c0c3e0000803f00008040e6c0d23e000000413314d1bd47387e3f2722703daead2d3fd5d4543e8d8c0c3e0000803f0000a0409229e93e000010413314d1bd47387e3f2722703db1b0303fd9d8583e8d8c0c3e0000803f0000a040d3b1033f000000413314d1bd47387e3f2722703db4b3333fdddc5c3e9190103e0000803f0000a040d3b1033f0000004149d175bd2b187f3fa3f5703db4b3333fdddc5c3e9190103e0000803f0000a0409229e93e0000104149d175bd2b187f3fa3f5703db1b0303fd9d8583e8d8c0c3e0000803f0000c040d4ff033f0000104149d175bd2b187f3fa3f5703db4b3333fdddc5c3e9190103e0000803f0000a040d3b1033f0000004126a6e0bd29ef7c3f973dde3db4b3333fdddc5c3e9190103e0000803f0000c040d4ff033f0000104126a6e0bd29ef7c3f973dde3db4b3333fdddc5c3e9190103e0000803f0000c040ba1d203f0000004126a6e0bd29ef7c3f973dde3db9b8383fe5e4643e9594143e0000803f0000c040ba1d203f00000041fcf4843dd7ee7d3f3d1edf3db9b8383fe5e4643e9594143e0000803f0000c040d4ff033f00001041fcf4843dd7ee7d3f3d1edf3db4b3333fdddc5c3e9190103e0000803f0000e040257de63e00001041fcf4843dd7ee7d3f3d1edf3db0af2f3fd9d8583e8d8c0c3e0000803f0000c040ba1d203f00000041e7b5733d7bdd7d3fee1fea3db9b8383fe5e4643e9594143e0000803f0000e040257de63e00001041e7b5733d7bdd7d3fee1fea3db0af2f3fd9d8583e8d8c0c3e0000803f0000e04091c1103f00000041e7b5733d7bdd7d3fee1fea3db6b5353fe1e0603e9190103e0000803f0000e04091c1103f000000418695013e6c457c3f9aa7e83db6b5353fe1e0603e9190103e0000803f0000e040257de63e000010418695013e6c457c3f9aa7e83db0af2f3fd9d8583e8d8c0c3e0000803f0000004137bda43e000010418695013e6c457c3f9aa7e83daaa9293fd1d0503e8988083e0000803f0000e04091c1103f00000041531c233ed1e37b3fb5dba43db6b5353fe1e0603e9190103e0000803f0000004137bda43e00001041531c233ed1e37b3fb5dba43daaa9293fd1d0503e8988083e0000803f000000414da0ce3e00000041531c233ed1e37b3fb5dba43daead2d3fd5d4543e8d8c0c3e0000803f000000414da0ce3e000000410397b63daa217e3f4853a63daead2d3fd5d4543e8d8c0c3e0000803f0000004137bda43e000010410397b63daa217e3f4853a63daaa9293fd1d0503e8988083e0000803f0000104116836d3e000010410397b63daa217e3f4853a63da5a4243fc9c8483e8584043e0000803f000000414da0ce3e00000041489e043ec5a17d3f43fc253daead2d3fd5d4543e8d8c0c3e0000803f0000104116836d3e00001041489e043ec5a17d3f43fc253da5a4243fc9c8483e8584043e0000803f00001041abb28b3e00000041489e043ec5a17d3f43fc253da7a6263fcdcc4c3e8584043e0000803f00001041abb28b3e00000041eb2e2abdb4907f3f2a40273da7a6263fcdcc4c3e8584043e0000803f0000104116836d3e00001041eb2e2abdb4907f3f2a40273da5a4243fc9c8483e8584043e0000803f00002041ac108c3e00001041eb2e2abdb4907f3f2a40273da7a6263fcdcc4c3e8584043e0000803f00001041abb28b3e00000041b25f9cbc00e97f3f2980963ca7a6263fcdcc4c3e8584043e0000803f00002041ac108c3e00001041b25f9cbc00e97f3f2980963ca7a6263fcdcc4c3e8584043e0000803f000020418779953e00000041b25f9cbc00e97f3f2980963ca8a7273fcdcc4c3e8584043e0000803f000020c1e4f56e3e0000104117e17c3d33817c3f70561cbea5a4243fc9c8483e8584043e0000803f000020c12cbbc63e0000204117e17c3d33817c3f70561cbeadac2c3fd5d4543e8988083e0000803f000010c105afa63e0000204117e17c3d33817c3f70561cbeaaa9293fd1d0503e8988083e0000803f000020c1e4f56e3e00001041082593bd5f497f3f4492a4bca5a4243fc9c8483e8584043e0000803f000010c105afa63e00002041082593bd5f497f3f4492a4bcaaa9293fd1d0503e8988083e0000803f000010c1855e9c3e00001041082593bd5f497f3f4492a4bca9a8283fcdcc4c3e8988083e0000803f000010c1855e9c3e00001041da357b3d5b777f3fe9afa4bca9a8283fcdcc4c3e8988083e0000803f000010c105afa63e00002041da357b3d5b777f3fe9afa4bcaaa9293fd1d0503e8988083e0000803f000000c17e37873e00002041da357b3d5b777f3fe9afa4bca7a6263fcdcc4c3e8584043e0000803f000010c1855e9c3e00001041a284b9bd3cb87c3f9985063ea9a8283fcdcc4c3e8988083e0000803f000000c17e37873e00002041a284b9bd3cb87c3f9985063ea7a6263fcdcc4c3e8584043e0000803f000000c1cb59cb3e00001041a284b9bd3cb87c3f9985063eaead2d3fd5d4543e8988083e0000803f000000c1cb59cb3e00001041984deabcbea87d3f9e05073eaead2d3fd5d4543e8988083e0000803f000000c17e37873e00002041984deabcbea87d3f9e05073ea7a6263fcdcc4c3e8584043e0000803f0000e0c0f0fe953e00002041984deabcbea87d3f9e05073ea8a7273fcdcc4c3e8584043e0000803f000000c1cb59cb3e0000104143a012bd0c5a7d3f2f430e3eaead2d3fd5d4543e8988083e0000803f0000e0c0f0fe953e0000204143a012bd0c5a7d3f2f430e3ea8a7273fcdcc4c3e8584043e0000803f0000e0c0dfdedd3e0000104143a012bd0c5a7d3f2f430e3eafae2e3fd5d4543e8d8c0c3e0000803f0000e0c0dfdedd3e00001041712bfdbddb917b3f05430d3eafae2e3fd5d4543e8d8c0c3e0000803f0000e0c0f0fe953e00002041712bfdbddb917b3f05430d3ea8a7273fcdcc4c3e8584043e0000803f0000c0c02367d63e00002041712bfdbddb917b3f05430d3eafae2e3fd5d4543e8d8c0c3e0000803f0000e0c0dfdedd3e00001041ecf9eb3c2ade7f3fed1b69bcafae2e3fd5d4543e8d8c0c3e0000803f0000c0c02367d63e00002041ecf9eb3c2ade7f3fed1b69bcafae2e3fd5d4543e8d8c0c3e0000803f0000c0c04d1dcf3e00001041ecf9eb3c2ade7f3fed1b69bcaead2d3fd5d4543e8d8c0c3e0000803f0000c0c04d1dcf3e000010416e868ebd7b5a7f3ff4a368bcaead2d3fd5d4543e8d8c0c3e0000803f0000c0c02367d63e000020416e868ebd7b5a7f3ff4a368bcafae2e3fd5d4543e8d8c0c3e0000803f0000a0c0d71ffa3e000020416e868ebd7b5a7f3ff4a368bcb2b1313fd9d8583e8d8c0c3e0000803f0000c0c04d1dcf3e000010414be10ebcb5447f3f21b099bdaead2d3fd5d4543e8d8c0c3e0000803f0000a0c0d71ffa3e000020414be10ebcb5447f3f21b099bdb2b1313fd9d8583e8d8c0c3e0000803f0000a0c09e97d33e000010414be10ebcb5447f3f21b099bdaead2d3fd5d4543e8d8c0c3e0000803f0000a0c09e97d33e000010418fbe273d5d107f3f9d9099bdaead2d3fd5d4543e8d8c0c3e0000803f0000a0c0d71ffa3e000020418fbe273d5d107f3f9d9099bdb2b1313fd9d8583e8d8c0c3e0000803f000080c05214e53e000020418fbe273d5d107f3f9d9099bdb0af2f3fd9d8583e8d8c0c3e0000803f0000a0c09e97d33e000010412dcbaabd68cb7e3f5d594a3daead2d3fd5d4543e8d8c0c3e0000803f000080c05214e53e000020412dcbaabd68cb7e3f5d594a3db0af2f3fd9d8583e8d8c0c3e0000803f000080c0207efe3e000010412dcbaabd68cb7e3f5d594a3db3b2323fd9d8583e8d8c0c3e0000803f000080c0207efe3e000010415f84d13b14ae7f3f610d4b3db3b2323fd9d8583e8d8c0c3e0000803f000080c05214e53e000020415f84d13b14ae7f3f610d4b3db0af2f3fd9d8583e8d8c0c3e0000803f000040c034cde13e000020415f84d13b14ae7f3f610d4b3db0af2f3fd9d8583e8d8c0c3e0000803f000080c0207efe3e00001041f9a14bbdac417e3f96ccd73db3b2323fd9d8583e8d8c0c3e0000803f000040c034cde13e00002041f9a14bbdac417e3f96ccd73db0af2f3fd9d8583e8d8c0c3e0000803f000040c0870f0c3f00001041f9a14bbdac417e3f96ccd73db5b4343fdddc5c3e9190103e0000803f000040c0870f0c3f0000104155366bbc8b8b7e3f490bd83db5b4343fdddc5c3e9190103e0000803f000040c034cde13e0000204155366bbc8b8b7e3f490bd83db0af2f3fd9d8583e8d8c0c3e0000803f000000c0a831e93e0000204155366bbc8b8b7e3f490bd83db1b0303fd9d8583e8d8c0c3e0000803f000040c0870f0c3f000010419740ab3d86187f3f71b4fc3bb5b4343fdddc5c3e9190103e0000803f000000c0a831e93e000020419740ab3d86187f3f71b4fc3bb1b0303fd9d8583e8d8c0c3e0000803f000000c00f28ed3e000010419740ab3d86187f3f71b4fc3bb1b0303fd9d8583e8d8c0c3e0000803f000000c00f28ed3e00001041375e593db1a17f3f533cfd3bb1b0303fd9d8583e8d8c0c3e0000803f000000c0a831e93e00002041375e593db1a17f3f533cfd3bb1b0303fd9d8583e8d8c0c3e0000803f000080bfdbfbcd3e00002041375e593db1a17f3f533cfd3baead2d3fd5d4543e8988083e0000803f000000c00f28ed3e00001041273a0a3eb6ee7c3ffd4199bdb1b0303fd9d8583e8d8c0c3e0000803f000080bfdbfbcd3e00002041273a0a3eb6ee7c3ffd4199bdaead2d3fd5d4543e8988083e0000803f000080bf6734a73e00001041273a0a3eb6ee7c3ffd4199bdaaa9293fd1d0503e8988083e0000803f000080bf6734a73e000010418e2ed93d58d47d3f21cd99bdaaa9293fd1d0503e8988083e0000803f000080bfdbfbcd3e000020418e2ed93d58d47d3f21cd99bdaead2d3fd5d4543e8988083e0000803f000000005c39973e000020418e2ed93d58d47d3f21cd99bda8a7273fcdcc4c3e8584043e0000803f000080bf6734a73e00001041acbe573dd8957f3fb036b0bcaaa9293fd1d0503e8988083e0000803f000000005c39973e00002041acbe573dd8957f3fb036b0bca8a7273fcdcc4c3e8584043e0000803f000000005e318c3e00001041acbe573dd8957f3fb036b0bca7a6263fcdcc4c3e8584043e0000803f000000005e318c3e00001041c5792c3dafb67f3f544db0bca7a6263fcdcc4c3e8584043e0000803f000000005c39973e00002041c5792c3dafb67f3f544db0bca8a7273fcdcc4c3e8584043e0000803f0000803ff5a3813e00002041c5792c3dafb67f3f544db0bca6a5253fcdcc4c3e8584043e0000803f000000005e318c3e0000104117e5cb3bf4f77f3ff7af6b3ca7a6263fcdcc4c3e8584043e0000803f0000803ff5a3813e0000204117e5cb3bf4f77f3ff7af6b3ca6a5253fcdcc4c3e8584043e0000803f0000803fb001893e0000104117e5cb3bf4f77f3ff7af6b3ca7a6263fcdcc4c3e8584043e0000803f0000803fb001893e00001041d6e0e0bdfc6c7e3f4b446a3ca7a6263fcdcc4c3e8584043e0000803f0000803ff5a3813e00002041d6e0e0bdfc6c7e3f4b446a3ca6a5253fcdcc4c3e8584043e0000803f000000403835ba3e00002041d6e0e0bdfc6c7e3f4b446a3cacab2b3fd1d0503e8988083e0000803f0000803fb001893e000010410a715abd51677f3f75402ebda7a6263fcdcc4c3e8584043e0000803f000000403835ba3e000020410a715abd51677f3f75402ebdacab2b3fd1d0503e8988083e0000803f000000402460a43e000010410a715abd51677f3f75402ebdaaa9293fd1d0503e8988083e0000803f000000402460a43e00001041c2fd07be87807d3f57f42cbdaaa9293fd1d0503e8988083e0000803f000000403835ba3e00002041c2fd07be87807d3f57f42cbdacab2b3fd1d0503e8988083e0000803f000040409fdffe3e00002041c2fd07be87807d3f57f42cbdb3b2323fd9d8583e8d8c0c3e0000803f000000402460a43e00001041953764bde4c37d3f26b9f4bdaaa9293fd1d0503e8988083e0000803f000040409fdffe3e00002041953764bde4c37d3f26b9f4bdb3b2323fd9d8583e8d8c0c3e0000803f000040406727c13e00001041953764bde4c37d3f26b9f4bdadac2c3fd5d4543e8988083e0000803f000040406727c13e00001041c25f99bc901d7e3fa10ff5bdadac2c3fd5d4543e8988083e0000803f000040409fdffe3e00002041c25f99bc901d7e3fa10ff5bdb3b2323fd9d8583e8d8c0c3e0000803f00008040e743043f00002041c25f99bc901d7e3fa10ff5bdb4b3333fdddc5c3e9190103e0000803f000040406727c13e00001041f36a25bc3de07d3fe73a03beadac2c3fd5d4543e8988083e0000803f00008040e743043f00002041f36a25bc3de07d3fe73a03beb4b3333fdddc5c3e9190103e0000803f00008040d15dc63e00001041f36a25bc3de07d3fe73a03beadac2c3fd5d4543e8988083e0000803f00008040d15dc63e00001041ffb3953cb1d87d3f013703beadac2c3fd5d4543e8988083e0000803f00008040e743043f00002041ffb3953cb1d87d3f013703beb4b3333fdddc5c3e9190103e0000803f0000a0403c18ff3e00002041ffb3953cb1d87d3f013703beb3b2323fd9d8583e8d8c0c3e0000803f00008040d15dc63e0000104198bc8abd8c2d7f3f12e52ebdadac2c3fd5d4543e8988083e0000803f0000a0403c18ff3e0000204198bc8abd8c2d7f3f12e52ebdb3b2323fd9d8583e8d8c0c3e0000803f0000a0409229e93e0000104198bc8abd8c2d7f3f12e52ebdb1b0303fd9d8583e8d8c0c3e0000803f0000a0409229e93e0000104175f0993dba0a7f3f35cd2ebdb1b0303fd9d8583e8d8c0c3e0000803f0000a0403c18ff3e0000204175f0993dba0a7f3f35cd2ebdb3b2323fd9d8583e8d8c0c3e0000803f0000c0401c77d83e0000204175f0993dba0a7f3f35cd2ebdafae2e3fd5d4543e8d8c0c3e0000803f0000a0409229e93e00001041813175bd5b727e3fdbfabc3db1b0303fd9d8583e8d8c0c3e0000803f0000c0401c77d83e00002041813175bd5b727e3fdbfabc3dafae2e3fd5d4543e8d8c0c3e0000803f0000c040d4ff033f00001041813175bd5b727e3fdbfabc3db4b3333fdddc5c3e9190103e0000803f0000c040d4ff033f00001041a7f4c63dbdb27d3f896cbc3db4b3333fdddc5c3e9190103e0000803f0000c0401c77d83e00002041a7f4c63dbdb27d3f896cbc3dafae2e3fd5d4543e8d8c0c3e0000803f0000e0406b46a63e00002041a7f4c63dbdb27d3f896cbc3daaa9293fd1d0503e8988083e0000803f0000c040d4ff033f00001041c0b7843de5797d3fa452fe3db4b3333fdddc5c3e9190103e0000803f0000e0406b46a63e00002041c0b7843de5797d3fa452fe3daaa9293fd1d0503e8988083e0000803f0000e040257de63e00001041c0b7843de5797d3fa452fe3db0af2f3fd9d8583e8d8c0c3e0000803f0000e040257de63e00001041d482783dc88a7d3f9663fe3db0af2f3fd9d8583e8d8c0c3e0000803f0000e0406b46a63e00002041d482783dc88a7d3f9663fe3daaa9293fd1d0503e8988083e0000803f00000041f9e8863e00002041d482783dc88a7d3f9663fe3da7a6263fcdcc4c3e8584043e0000803f0000e040257de63e000010411036023ef67d7d3f754b6c3db0af2f3fd9d8583e8d8c0c3e0000803f00000041f9e8863e000020411036023ef67d7d3f754b6c3da7a6263fcdcc4c3e8584043e0000803f0000004137bda43e000010411036023ef67d7d3f754b6c3daaa9293fd1d0503e8988083e0000803f0000004137bda43e0000104107ec14bc5d8e7f3f02386e3daaa9293fd1d0503e8988083e0000803f00000041f9e8863e0000204107ec14bc5d8e7f3f02386e3da7a6263fcdcc4c3e8584043e0000803f000010416b928b3e0000204107ec14bc5d8e7f3f02386e3da7a6263fcdcc4c3e8584043e0000803f0000004137bda43e00001041870bb73dd6c37e3f56b925bdaaa9293fd1d0503e8988083e0000803f000010416b928b3e00002041870bb73dd6c37e3f56b925bda7a6263fcdcc4c3e8584043e0000803f0000104116836d3e00001041870bb73dd6c37e3f56b925bda5a4243fc9c8483e8584043e0000803f0000104116836d3e0000104106a0f1bd92007e3f513a25bda5a4243fc9c8483e8584043e0000803f000010416b928b3e0000204106a0f1bd92007e3f513a25bda7a6263fcdcc4c3e8584043e0000803f000020410d74c83e0000204106a0f1bd92007e3f513a25bdadac2c3fd5d4543e8988083e0000803f0000104116836d3e00001041a42729bd57057e3f72afefbda5a4243fc9c8483e8584043e0000803f000020410d74c83e00002041a42729bd57057e3f72afefbdadac2c3fd5d4543e8988083e0000803f00002041ac108c3e00001041a42729bd57057e3f72afefbda7a6263fcdcc4c3e8584043e0000803f + m_CompressedMesh: + m_Vertices: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_UV: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_Normals: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_Tangents: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_Weights: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_NormalSigns: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_TangentSigns: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_FloatColors: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_BoneIndices: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_Triangles: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_UVInfo: 0 + m_LocalAABB: + m_Center: {x: 0, y: 0.4520702, z: 0} + m_Extent: {x: 10, y: 0.3620161, z: 10} + m_MeshUsageFlags: 0 + m_BakedConvexCollisionMesh: + m_BakedTriangleCollisionMesh: + m_MeshOptimized: 0 +--- !u!1 &1832017630 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 168256, guid: 0bc0ac62dcca19446890462247ee487c, type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 224: {fileID: 1832017631} + - 222: {fileID: 1832017634} + - 114: {fileID: 1832017633} + - 114: {fileID: 1832017632} + m_Layer: 5 + m_Name: LeftPanel + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1832017631 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22401078, guid: 0bc0ac62dcca19446890462247ee487c, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1832017630} + 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_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_Children: [] + m_Father: {fileID: 466175284} + m_RootOrder: 0 + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 300, y: 0} + m_Pivot: {x: 0, y: 0.5} +--- !u!114 &1832017632 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11455872, guid: 0bc0ac62dcca19446890462247ee487c, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1832017630} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1297475563, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 20 + m_Right: 20 + m_Top: 20 + m_Bottom: 20 + m_ChildAlignment: 1 + m_Spacing: 20 + m_ChildForceExpandWidth: 1 + m_ChildForceExpandHeight: 0 +--- !u!114 &1832017633 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11453326, guid: 0bc0ac62dcca19446890462247ee487c, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1832017630} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, 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_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!222 &1832017634 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22257302, guid: 0bc0ac62dcca19446890462247ee487c, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1832017630} diff --git a/Assets/Packages/ProceduralToolkit/Examples/LowPolyTerrainGenerator/LowPolyTerrainGenerator.unity.meta b/Assets/Packages/ProceduralToolkit/Examples/LowPolyTerrainGenerator/LowPolyTerrainGenerator.unity.meta new file mode 100644 index 0000000000000000000000000000000000000000..4b4a317406af13ff3858ecbd78e823855a41502b --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/Examples/LowPolyTerrainGenerator/LowPolyTerrainGenerator.unity.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: e78a2dd744dd4f64983fea4178fdb8ba +DefaultImporter: + userData: diff --git a/Assets/Packages/ProceduralToolkit/Examples/LowPolyTerrainGenerator/LowPolyTerrainGeneratorConfigurator.cs b/Assets/Packages/ProceduralToolkit/Examples/LowPolyTerrainGenerator/LowPolyTerrainGeneratorConfigurator.cs new file mode 100644 index 0000000000000000000000000000000000000000..6223a19fc356ee8492037f7f22a9e80b761d4b48 --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/Examples/LowPolyTerrainGenerator/LowPolyTerrainGeneratorConfigurator.cs @@ -0,0 +1,93 @@ +using ProceduralToolkit.Examples.UI; +using UnityEngine; + +namespace ProceduralToolkit.Examples +{ + public class LowPolyTerrainGeneratorConfigurator : ConfiguratorBase + { + public MeshFilter terrainMeshFilter; + public RectTransform leftPanel; + public bool constantSeed = false; + public LowPolyTerrainGenerator.Config config = new LowPolyTerrainGenerator.Config(); + + private const int minXSize = 10; + private const int maxXSize = 30; + private const int minYSize = 1; + private const int maxYSize = 5; + private const int minZSize = 10; + private const int maxZSize = 30; + private const float minCellSize = 0.3f; + private const float maxCellSize = 2; + private const int minNoiseScale = 1; + private const int maxNoiseScale = 20; + + private Mesh terrainMesh; + + private void Awake() + { + Generate(); + SetupSkyboxAndPalette(); + + InstantiateControl(leftPanel) + .Initialize("Terrain size X", minXSize, maxXSize, (int) config.terrainSize.x, value => + { + config.terrainSize.x = value; + Generate(); + }); + + InstantiateControl(leftPanel) + .Initialize("Terrain size Y", minYSize, maxYSize, (int) config.terrainSize.y, value => + { + config.terrainSize.y = value; + Generate(); + }); + + InstantiateControl(leftPanel) + .Initialize("Terrain size Z", minZSize, maxZSize, (int) config.terrainSize.z, value => + { + config.terrainSize.z = value; + Generate(); + }); + + InstantiateControl(leftPanel) + .Initialize("Cell size", minCellSize, maxCellSize, config.cellSize, value => + { + config.cellSize = value; + Generate(); + }); + + InstantiateControl(leftPanel) + .Initialize("Noise scale", minNoiseScale, maxNoiseScale, (int) config.noiseScale, value => + { + config.noiseScale = value; + Generate(); + }); + + InstantiateControl(leftPanel).Initialize("Generate", () => Generate()); + } + + private void Update() + { + UpdateSkybox(); + } + + public void Generate(bool randomizeConfig = true) + { + if (constantSeed) + { + Random.InitState(0); + } + + if (randomizeConfig) + { + GeneratePalette(); + + config.gradient = ColorE.Gradient(from: GetMainColorHSV(), to: GetSecondaryColorHSV()); + } + + var draft = LowPolyTerrainGenerator.TerrainDraft(config); + draft.Move(Vector3.left*config.terrainSize.x/2 + Vector3.back*config.terrainSize.z/2); + AssignDraftToMeshFilter(draft, terrainMeshFilter, ref terrainMesh); + } + } +} \ No newline at end of file diff --git a/Assets/Packages/ProceduralToolkit/Examples/LowPolyTerrainGenerator/LowPolyTerrainGeneratorConfigurator.cs.meta b/Assets/Packages/ProceduralToolkit/Examples/LowPolyTerrainGenerator/LowPolyTerrainGeneratorConfigurator.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..0d355ff3592b4149e3411a1c6ff55dd220ad0036 --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/Examples/LowPolyTerrainGenerator/LowPolyTerrainGeneratorConfigurator.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: c2ea2478de1f3b342afd171f3dc5e216 +timeCreated: 1443733620 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Packages/ProceduralToolkit/Examples/LowPolyTerrainGenerator/Terrain.mat b/Assets/Packages/ProceduralToolkit/Examples/LowPolyTerrainGenerator/Terrain.mat new file mode 100644 index 0000000000000000000000000000000000000000..1ec9a8cc228846cda37154accf2cd3bec757edf7 --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/Examples/LowPolyTerrainGenerator/Terrain.mat @@ -0,0 +1,27 @@ +%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: Terrain + m_Shader: {fileID: 4800000, guid: 40dd86119e3f8e74d8f7d84425c926aa, type: 3} + m_ShaderKeywords: + m_LightmapFlags: 5 + m_CustomRenderQueue: -1 + stringTagMap: {} + m_SavedProperties: + serializedVersion: 2 + m_TexEnvs: {} + m_Floats: + data: + first: + name: _Smoothness + second: 0 + data: + first: + name: _Metallic + second: 0 + m_Colors: {} diff --git a/Assets/Packages/ProceduralToolkit/Examples/LowPolyTerrainGenerator/Terrain.mat.meta b/Assets/Packages/ProceduralToolkit/Examples/LowPolyTerrainGenerator/Terrain.mat.meta new file mode 100644 index 0000000000000000000000000000000000000000..b84ce0b3328a5d25cfa3016226b334de03cde603 --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/Examples/LowPolyTerrainGenerator/Terrain.mat.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: d8eccd73a6902a04eae9084d964dd9b8 +NativeFormatImporter: + userData: diff --git a/Assets/Packages/ProceduralToolkit/Examples/Primitives.meta b/Assets/Packages/ProceduralToolkit/Examples/Primitives.meta new file mode 100644 index 0000000000000000000000000000000000000000..d1acc4e1217d8c89ea047a4de9a864068e1253ef --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/Examples/Primitives.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 31080f04acd11514980f502b15f672dc +folderAsset: yes +DefaultImporter: + userData: diff --git a/Assets/Packages/ProceduralToolkit/Examples/Primitives/Cylinder.cs b/Assets/Packages/ProceduralToolkit/Examples/Primitives/Cylinder.cs new file mode 100644 index 0000000000000000000000000000000000000000..e290037d77cbdeb47f5c4f11e918fd238504ba58 --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/Examples/Primitives/Cylinder.cs @@ -0,0 +1,17 @@ +using UnityEngine; + +namespace ProceduralToolkit.Examples.Primitives +{ + [RequireComponent(typeof(MeshRenderer), typeof(MeshFilter))] + public class Cylinder : MonoBehaviour + { + public float radius = 1f; + public int segments = 16; + public float height = 2f; + + private void Start() + { + GetComponent().mesh = MeshE.Cylinder(radius, segments, height); + } + } +} \ No newline at end of file diff --git a/Assets/Packages/ProceduralToolkit/Examples/Primitives/Cylinder.cs.meta b/Assets/Packages/ProceduralToolkit/Examples/Primitives/Cylinder.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..93970bbf562ded08cf3e509e1889650586ced896 --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/Examples/Primitives/Cylinder.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: fac210808f4ec7e4ab2059716b7de8c6 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/Packages/ProceduralToolkit/Examples/Primitives/Dodecahedron.cs b/Assets/Packages/ProceduralToolkit/Examples/Primitives/Dodecahedron.cs new file mode 100644 index 0000000000000000000000000000000000000000..e1dde418c83de00c9ba8480aa38eadde9af0de34 --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/Examples/Primitives/Dodecahedron.cs @@ -0,0 +1,15 @@ +using UnityEngine; + +namespace ProceduralToolkit.Examples.Primitives +{ + [RequireComponent(typeof(MeshRenderer), typeof(MeshFilter))] + public class Dodecahedron : MonoBehaviour + { + public float radius = 1f; + + private void Start() + { + GetComponent().mesh = MeshE.Dodecahedron(radius); + } + } +} \ No newline at end of file diff --git a/Assets/Packages/ProceduralToolkit/Examples/Primitives/Dodecahedron.cs.meta b/Assets/Packages/ProceduralToolkit/Examples/Primitives/Dodecahedron.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..89f0b799671152f3cfff194e2baefedb8440abb8 --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/Examples/Primitives/Dodecahedron.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 17232327dcbc17b46949d66e6b59fec5 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/Packages/ProceduralToolkit/Examples/Primitives/FlatSphere.cs b/Assets/Packages/ProceduralToolkit/Examples/Primitives/FlatSphere.cs new file mode 100644 index 0000000000000000000000000000000000000000..b9b573e9bf25bed2f1f7b172daf20f64dda8af95 --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/Examples/Primitives/FlatSphere.cs @@ -0,0 +1,17 @@ +using UnityEngine; + +namespace ProceduralToolkit.Examples.Primitives +{ + [RequireComponent(typeof(MeshRenderer), typeof(MeshFilter))] + public class FlatSphere : MonoBehaviour + { + public float radius = 1f; + public int horizontalSegments = 16; + public int verticalSegments = 16; + + private void Start() + { + GetComponent().mesh = MeshE.FlatSphere(radius, horizontalSegments, verticalSegments); + } + } +} \ No newline at end of file diff --git a/Assets/Packages/ProceduralToolkit/Examples/Primitives/FlatSphere.cs.meta b/Assets/Packages/ProceduralToolkit/Examples/Primitives/FlatSphere.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..846e58d127aff77bceb4741ba6bdc5fb426cfb38 --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/Examples/Primitives/FlatSphere.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: dce0abc89d699a24f97c3753326ed9bb +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/Packages/ProceduralToolkit/Examples/Primitives/FlatSpheroid.cs b/Assets/Packages/ProceduralToolkit/Examples/Primitives/FlatSpheroid.cs new file mode 100644 index 0000000000000000000000000000000000000000..dcaccb1c139cfc7c0bac9c4f94357883a5a888f0 --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/Examples/Primitives/FlatSpheroid.cs @@ -0,0 +1,18 @@ +using UnityEngine; + +namespace ProceduralToolkit.Examples.Primitives +{ + [RequireComponent(typeof (MeshRenderer), typeof (MeshFilter))] + public class FlatSpheroid : MonoBehaviour + { + public float radius = 0.75f; + public float height = 1f; + public int horizontalSegments = 16; + public int verticalSegments = 16; + + private void Start() + { + GetComponent().mesh = MeshE.FlatSpheroid(radius, height, horizontalSegments, verticalSegments); + } + } +} \ No newline at end of file diff --git a/Assets/Packages/ProceduralToolkit/Examples/Primitives/FlatSpheroid.cs.meta b/Assets/Packages/ProceduralToolkit/Examples/Primitives/FlatSpheroid.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..9b57d98a6c8700b73fc0de9f25f30d3c5ec9fb09 --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/Examples/Primitives/FlatSpheroid.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: e11f94f93a2fb08439763b91c625c7b4 +timeCreated: 1476533004 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Packages/ProceduralToolkit/Examples/Primitives/FlatTeardrop.cs b/Assets/Packages/ProceduralToolkit/Examples/Primitives/FlatTeardrop.cs new file mode 100644 index 0000000000000000000000000000000000000000..7a5b37b6c1d0a61c584b7bd3ac908fe3d9284bd0 --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/Examples/Primitives/FlatTeardrop.cs @@ -0,0 +1,18 @@ +using UnityEngine; + +namespace ProceduralToolkit.Examples.Primitives +{ + [RequireComponent(typeof (MeshRenderer), typeof (MeshFilter))] + public class FlatTeardrop : MonoBehaviour + { + public float radius = 1f; + public float height = 1f; + public int horizontalSegments = 16; + public int verticalSegments = 16; + + private void Start() + { + GetComponent().mesh = MeshE.FlatTeardrop(radius, height, horizontalSegments, verticalSegments); + } + } +} \ No newline at end of file diff --git a/Assets/Packages/ProceduralToolkit/Examples/Primitives/FlatTeardrop.cs.meta b/Assets/Packages/ProceduralToolkit/Examples/Primitives/FlatTeardrop.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..aa4f96623d520fcd28526c3498e0c54c2a22d0ba --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/Examples/Primitives/FlatTeardrop.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 051f30de83d8fe94baf4387ed31fc021 +timeCreated: 1476533988 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Packages/ProceduralToolkit/Examples/Primitives/Hexahedron.cs b/Assets/Packages/ProceduralToolkit/Examples/Primitives/Hexahedron.cs new file mode 100644 index 0000000000000000000000000000000000000000..4e3f1d2f59101128f49afcc41f8f47e2385c7c95 --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/Examples/Primitives/Hexahedron.cs @@ -0,0 +1,17 @@ +using UnityEngine; + +namespace ProceduralToolkit.Examples.Primitives +{ + [RequireComponent(typeof(MeshRenderer), typeof(MeshFilter))] + public class Hexahedron : MonoBehaviour + { + public float width = 1f; + public float length = 1f; + public float height = 2f; + + private void Start() + { + GetComponent().mesh = MeshE.Hexahedron(width, length, height); + } + } +} \ No newline at end of file diff --git a/Assets/Packages/ProceduralToolkit/Examples/Primitives/Hexahedron.cs.meta b/Assets/Packages/ProceduralToolkit/Examples/Primitives/Hexahedron.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..16367068f11641476dbc9bc7b0c9e61d1f55ebdd --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/Examples/Primitives/Hexahedron.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 44bff16b8e63ce44fa940568b3bfa71d +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/Packages/ProceduralToolkit/Examples/Primitives/Icosahedron.cs b/Assets/Packages/ProceduralToolkit/Examples/Primitives/Icosahedron.cs new file mode 100644 index 0000000000000000000000000000000000000000..6dda334f2121534c3f5f36294f49fc8477a668d7 --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/Examples/Primitives/Icosahedron.cs @@ -0,0 +1,15 @@ +using UnityEngine; + +namespace ProceduralToolkit.Examples.Primitives +{ + [RequireComponent(typeof(MeshRenderer), typeof(MeshFilter))] + public class Icosahedron : MonoBehaviour + { + public float radius = 1f; + + private void Start() + { + GetComponent().mesh = MeshE.Icosahedron(radius); + } + } +} \ No newline at end of file diff --git a/Assets/Packages/ProceduralToolkit/Examples/Primitives/Icosahedron.cs.meta b/Assets/Packages/ProceduralToolkit/Examples/Primitives/Icosahedron.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..6204cca199144ae0e5ab53ff3723751db6dfff11 --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/Examples/Primitives/Icosahedron.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 1d7cd73a4d0af9a4a9827f3d196519de +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/Packages/ProceduralToolkit/Examples/Primitives/Octahedron.cs b/Assets/Packages/ProceduralToolkit/Examples/Primitives/Octahedron.cs new file mode 100644 index 0000000000000000000000000000000000000000..b3bbc6f2742fb5c769fda4917b18cd2a535f0143 --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/Examples/Primitives/Octahedron.cs @@ -0,0 +1,15 @@ +using UnityEngine; + +namespace ProceduralToolkit.Examples.Primitives +{ + [RequireComponent(typeof(MeshRenderer), typeof(MeshFilter))] + public class Octahedron : MonoBehaviour + { + public float radius = 1f; + + private void Start() + { + GetComponent().mesh = MeshE.Octahedron(radius); + } + } +} \ No newline at end of file diff --git a/Assets/Packages/ProceduralToolkit/Examples/Primitives/Octahedron.cs.meta b/Assets/Packages/ProceduralToolkit/Examples/Primitives/Octahedron.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..31aa81cefb6956cb2812940932bb6903d760fed8 --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/Examples/Primitives/Octahedron.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 2d25bfc1413b79b4ba85414f5c3ea5ce +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/Packages/ProceduralToolkit/Examples/Primitives/Plane.cs b/Assets/Packages/ProceduralToolkit/Examples/Primitives/Plane.cs new file mode 100644 index 0000000000000000000000000000000000000000..3deb36c78aa597856aafd98710273d3c3dc8c71a --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/Examples/Primitives/Plane.cs @@ -0,0 +1,18 @@ +using UnityEngine; + +namespace ProceduralToolkit.Examples.Primitives +{ + [RequireComponent(typeof(MeshRenderer), typeof(MeshFilter))] + public class Plane : MonoBehaviour + { + public float xSize = 1f; + public float zSize = 1f; + public int xSegments = 16; + public int zSegments = 16; + + private void Start() + { + GetComponent().mesh = MeshE.Plane(xSize, zSize, xSegments, zSegments); + } + } +} \ No newline at end of file diff --git a/Assets/Packages/ProceduralToolkit/Examples/Primitives/Plane.cs.meta b/Assets/Packages/ProceduralToolkit/Examples/Primitives/Plane.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..b338dbcf7a0d68df1f189f397e0c90f68dcc78b9 --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/Examples/Primitives/Plane.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 3ee7e41d3c8707041b135f52eaa97c95 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/Packages/ProceduralToolkit/Examples/Primitives/Primitives.mat b/Assets/Packages/ProceduralToolkit/Examples/Primitives/Primitives.mat new file mode 100644 index 0000000000000000000000000000000000000000..0dbf6f565582d811c2828ced87de40547722398a --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/Examples/Primitives/Primitives.mat @@ -0,0 +1,26 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 5 + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: Primitives + m_Shader: {fileID: 4800000, guid: 40dd86119e3f8e74d8f7d84425c926aa, type: 3} + m_ShaderKeywords: + m_LightmapFlags: 5 + m_CustomRenderQueue: -1 + m_SavedProperties: + serializedVersion: 2 + m_TexEnvs: {} + m_Floats: + data: + first: + name: _Smoothness + second: 0 + data: + first: + name: _Metallic + second: 0 + m_Colors: {} diff --git a/Assets/Packages/ProceduralToolkit/Examples/Primitives/Primitives.mat.meta b/Assets/Packages/ProceduralToolkit/Examples/Primitives/Primitives.mat.meta new file mode 100644 index 0000000000000000000000000000000000000000..d3cf56078104faac971475e0f12297f42a760b86 --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/Examples/Primitives/Primitives.mat.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: 5526f677179d4ec41a9d8c15775b3ae3 +NativeFormatImporter: + userData: diff --git a/Assets/Packages/ProceduralToolkit/Examples/Primitives/Primitives.unity b/Assets/Packages/ProceduralToolkit/Examples/Primitives/Primitives.unity new file mode 100644 index 0000000000000000000000000000000000000000..e0611f2973995b771b21be56c18aefe859fdeed8 --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/Examples/Primitives/Primitives.unity @@ -0,0 +1,1802 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!29 &1 +SceneSettings: + m_ObjectHideFlags: 0 + m_PVSData: + m_PVSObjectsArray: [] + m_PVSPortalsArray: [] + m_OcclusionBakeSettings: + smallestOccluder: 5 + smallestHole: 0.25 + backfaceThreshold: 100 +--- !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: 2100000, guid: 3b82c898af0b03548a0dddd255b6092e, 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: 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: 0 + m_AOMaxDistance: 1 + m_CompAOExponent: 0 + 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: 1024 + m_ReflectionCompression: 2 + m_LightingDataAsset: {fileID: 0} + m_RuntimeCPUUsage: 25 +--- !u!196 &5 +NavMeshSettings: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_BuildSettings: + serializedVersion: 2 + agentRadius: 0.5 + agentHeight: 2 + agentSlope: 45 + agentClimb: 0.4 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + accuratePlacement: 0 + minRegionArea: 2 + cellSize: 0.16666666 + manualCellSize: 0 + m_NavMeshData: {fileID: 0} +--- !u!1 &82328952 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 4: {fileID: 82328953} + - 23: {fileID: 82328956} + - 33: {fileID: 82328955} + - 114: {fileID: 82328954} + m_Layer: 0 + m_Name: Tetrahedron + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &82328953 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 82328952} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 3, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_Children: [] + m_Father: {fileID: 644687429} + m_RootOrder: 9 +--- !u!114 &82328954 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 82328952} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 311f034d8170bdd49bad2f7647e36f88, type: 3} + m_Name: + m_EditorClassIdentifier: + radius: 1 +--- !u!33 &82328955 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 82328952} + m_Mesh: {fileID: 0} +--- !u!23 &82328956 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 82328952} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 0 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: 5526f677179d4ec41a9d8c15775b3ae3, type: 2} + m_SubsetIndices: + 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_SelectedWireframeHidden: 0 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingOrder: 0 +--- !u!1 &91037047 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 4: {fileID: 91037048} + - 23: {fileID: 91037051} + - 33: {fileID: 91037050} + - 114: {fileID: 91037049} + m_Layer: 0 + m_Name: Teardrop + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &91037048 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 91037047} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 3, y: -3, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_Children: [] + m_Father: {fileID: 644687429} + m_RootOrder: 15 +--- !u!114 &91037049 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 91037047} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a3b361ae3608c2549a275c131ad71e1d, type: 3} + m_Name: + m_EditorClassIdentifier: + radius: 1 + height: 1 + horizontalSegments: 16 + verticalSegments: 16 +--- !u!33 &91037050 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 91037047} + m_Mesh: {fileID: 0} +--- !u!23 &91037051 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 91037047} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 0 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: 5526f677179d4ec41a9d8c15775b3ae3, type: 2} + m_SubsetIndices: + 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_SelectedWireframeHidden: 0 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingOrder: 0 +--- !u!1 &140426628 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 4: {fileID: 140426629} + - 23: {fileID: 140426632} + - 33: {fileID: 140426631} + - 114: {fileID: 140426630} + m_Layer: 0 + m_Name: Cylinder + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &140426629 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 140426628} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -6, y: 3, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_Children: [] + m_Father: {fileID: 644687429} + m_RootOrder: 0 +--- !u!114 &140426630 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 140426628} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fac210808f4ec7e4ab2059716b7de8c6, type: 3} + m_Name: + m_EditorClassIdentifier: + radius: 1 + segments: 16 + height: 2 +--- !u!33 &140426631 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 140426628} + m_Mesh: {fileID: 0} +--- !u!23 &140426632 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 140426628} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 0 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: 5526f677179d4ec41a9d8c15775b3ae3, type: 2} + m_SubsetIndices: + 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_SelectedWireframeHidden: 0 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingOrder: 0 +--- !u!1 &162443169 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 4: {fileID: 162443170} + m_Layer: 0 + m_Name: '-' + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &162443170 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 162443169} + 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_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_Children: [] + m_Father: {fileID: 644687429} + m_RootOrder: 11 +--- !u!1 &409353593 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 4: {fileID: 409353594} + - 23: {fileID: 409353597} + - 33: {fileID: 409353596} + - 114: {fileID: 409353595} + m_Layer: 0 + m_Name: Hexahedron + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &409353594 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 409353593} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 6, y: 3, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_Children: [] + m_Father: {fileID: 644687429} + m_RootOrder: 4 +--- !u!114 &409353595 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 409353593} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 44bff16b8e63ce44fa940568b3bfa71d, type: 3} + m_Name: + m_EditorClassIdentifier: + width: 1 + length: 1 + height: 2 +--- !u!33 &409353596 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 409353593} + m_Mesh: {fileID: 0} +--- !u!23 &409353597 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 409353593} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 0 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: 5526f677179d4ec41a9d8c15775b3ae3, type: 2} + m_SubsetIndices: + 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_SelectedWireframeHidden: 0 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingOrder: 0 +--- !u!1 &423463292 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 4: {fileID: 423463294} + - 108: {fileID: 423463293} + 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 &423463293 +Light: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 423463292} + m_Enabled: 1 + serializedVersion: 7 + m_Type: 1 + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_Intensity: 1.4 + 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 &423463294 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 423463292} + m_LocalRotation: {x: 0.40821794, y: -0.23456973, z: 0.10938166, w: 0.8754261} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 2 +--- !u!1 &485006625 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 4: {fileID: 485006626} + - 23: {fileID: 485006629} + - 33: {fileID: 485006628} + - 114: {fileID: 485006627} + m_Layer: 0 + m_Name: FlatTeardrop + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &485006626 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 485006625} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 6, y: -3, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_Children: [] + m_Father: {fileID: 644687429} + m_RootOrder: 16 +--- !u!114 &485006627 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 485006625} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 051f30de83d8fe94baf4387ed31fc021, type: 3} + m_Name: + m_EditorClassIdentifier: + radius: 1 + height: 1 + horizontalSegments: 16 + verticalSegments: 16 +--- !u!33 &485006628 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 485006625} + m_Mesh: {fileID: 0} +--- !u!23 &485006629 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 485006625} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 0 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: 5526f677179d4ec41a9d8c15775b3ae3, type: 2} + m_SubsetIndices: + 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_SelectedWireframeHidden: 0 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingOrder: 0 +--- !u!1 &499955253 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 4: {fileID: 499955254} + - 23: {fileID: 499955257} + - 33: {fileID: 499955256} + - 114: {fileID: 499955255} + m_Layer: 0 + m_Name: FlatSpheroid + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &499955254 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 499955253} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -3, y: -3, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_Children: [] + m_Father: {fileID: 644687429} + m_RootOrder: 13 +--- !u!114 &499955255 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 499955253} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: e11f94f93a2fb08439763b91c625c7b4, type: 3} + m_Name: + m_EditorClassIdentifier: + radius: 0.75 + height: 1 + horizontalSegments: 16 + verticalSegments: 16 +--- !u!33 &499955256 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 499955253} + m_Mesh: {fileID: 0} +--- !u!23 &499955257 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 499955253} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 0 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: 5526f677179d4ec41a9d8c15775b3ae3, type: 2} + m_SubsetIndices: + 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_SelectedWireframeHidden: 0 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingOrder: 0 +--- !u!1 &512307773 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 224: {fileID: 512307774} + - 222: {fileID: 512307777} + - 114: {fileID: 512307776} + - 114: {fileID: 512307775} + m_Layer: 5 + m_Name: CameraRotator + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &512307774 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 512307773} + 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_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_Children: [] + m_Father: {fileID: 1226276357} + m_RootOrder: 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!114 &512307775 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 512307773} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0, g: 0, b: 0, a: 0} + 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 &512307776 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 512307773} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 8a9e3604dbea82f46bac0914f2aea2c2, type: 3} + m_Name: + m_EditorClassIdentifier: + cameraTransform: {fileID: 1199230973} + target: {fileID: 644687429} + distanceMin: 5 + distanceMax: 12 + yOffset: 0 + scrollSensitivity: 1000 + scrollSmoothing: 10 + tiltMin: -85 + tiltMax: 85 + rotationSensitivity: 0.5 + rotationSpeed: 20 +--- !u!222 &512307777 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 512307773} +--- !u!1 &640078303 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 4: {fileID: 640078304} + - 23: {fileID: 640078307} + - 33: {fileID: 640078306} + - 114: {fileID: 640078305} + m_Layer: 0 + m_Name: Sphere + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &640078304 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 640078303} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 3, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_Children: [] + m_Father: {fileID: 644687429} + m_RootOrder: 2 +--- !u!114 &640078305 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 640078303} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d7474a3099774e84fbc35cac5287f13b, type: 3} + m_Name: + m_EditorClassIdentifier: + radius: 1 + horizontalSegments: 16 + verticalSegments: 16 +--- !u!33 &640078306 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 640078303} + m_Mesh: {fileID: 0} +--- !u!23 &640078307 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 640078303} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 0 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: 5526f677179d4ec41a9d8c15775b3ae3, type: 2} + m_SubsetIndices: + 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_SelectedWireframeHidden: 0 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingOrder: 0 +--- !u!1 &644687428 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 4: {fileID: 644687429} + - 114: {fileID: 644687430} + m_Layer: 0 + m_Name: Container + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &644687429 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 644687428} + 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_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_Children: + - {fileID: 140426629} + - {fileID: 1672207373} + - {fileID: 640078304} + - {fileID: 1611349196} + - {fileID: 409353594} + - {fileID: 1035654285} + - {fileID: 2040988413} + - {fileID: 2138072844} + - {fileID: 822753810} + - {fileID: 82328953} + - {fileID: 1691507010} + - {fileID: 162443170} + - {fileID: 759324125} + - {fileID: 499955254} + - {fileID: 1350792517} + - {fileID: 91037048} + - {fileID: 485006626} + m_Father: {fileID: 0} + m_RootOrder: 1 +--- !u!114 &644687430 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 644687428} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fbbfdf99a4c2da44e85e79ec390d42b4, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1 &759324124 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 4: {fileID: 759324125} + - 23: {fileID: 759324128} + - 33: {fileID: 759324127} + - 114: {fileID: 759324126} + m_Layer: 0 + m_Name: Spheroid + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &759324125 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 759324124} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -6, y: -3, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_Children: [] + m_Father: {fileID: 644687429} + m_RootOrder: 12 +--- !u!114 &759324126 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 759324124} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9111180099d3beb4ca31f3fbdede757f, type: 3} + m_Name: + m_EditorClassIdentifier: + radius: 0.75 + height: 1 + horizontalSegments: 16 + verticalSegments: 16 +--- !u!33 &759324127 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 759324124} + m_Mesh: {fileID: 0} +--- !u!23 &759324128 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 759324124} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 0 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: 5526f677179d4ec41a9d8c15775b3ae3, type: 2} + m_SubsetIndices: + 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_SelectedWireframeHidden: 0 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingOrder: 0 +--- !u!1 &822753809 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 4: {fileID: 822753810} + - 23: {fileID: 822753813} + - 33: {fileID: 822753812} + - 114: {fileID: 822753811} + m_Layer: 0 + m_Name: Octahedron + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &822753810 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 822753809} + 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_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_Children: [] + m_Father: {fileID: 644687429} + m_RootOrder: 8 +--- !u!114 &822753811 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 822753809} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 2d25bfc1413b79b4ba85414f5c3ea5ce, type: 3} + m_Name: + m_EditorClassIdentifier: + radius: 1 +--- !u!33 &822753812 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 822753809} + m_Mesh: {fileID: 0} +--- !u!23 &822753813 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 822753809} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 0 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: 5526f677179d4ec41a9d8c15775b3ae3, type: 2} + m_SubsetIndices: + 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_SelectedWireframeHidden: 0 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingOrder: 0 +--- !u!1 &1035654284 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 4: {fileID: 1035654285} + m_Layer: 0 + m_Name: '-' + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1035654285 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1035654284} + 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_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_Children: [] + m_Father: {fileID: 644687429} + m_RootOrder: 5 +--- !u!1 &1199230968 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 4: {fileID: 1199230973} + - 20: {fileID: 1199230972} + m_Layer: 0 + m_Name: Main Camera + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!20 &1199230972 +Camera: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1199230968} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 1 + m_BackGroundColor: {r: 0.91764706, g: 0.91764706, b: 0.91764706, a: 1} + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.3 + far clip plane: 50 + 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 &1199230973 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1199230968} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: -10} + m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 +--- !u!1 &1226276353 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 224: {fileID: 1226276357} + - 223: {fileID: 1226276356} + - 114: {fileID: 1226276355} + - 114: {fileID: 1226276354} + m_Layer: 5 + m_Name: Canvas + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1226276354 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1226276353} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1301386320, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreReversedGraphics: 1 + m_BlockingObjects: 0 + m_BlockingMask: + serializedVersion: 2 + m_Bits: 4294967295 +--- !u!114 &1226276355 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1226276353} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1980459831, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_UiScaleMode: 1 + m_ReferencePixelsPerUnit: 100 + m_ScaleFactor: 1 + m_ReferenceResolution: {x: 960, y: 600} + m_ScreenMatchMode: 0 + m_MatchWidthOrHeight: 0.5 + m_PhysicalUnit: 3 + m_FallbackScreenDPI: 96 + m_DefaultSpriteDPI: 96 + m_DynamicPixelsPerUnit: 1 +--- !u!223 &1226276356 +Canvas: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1226276353} + 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 &1226276357 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1226276353} + 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_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_Children: + - {fileID: 512307774} + m_Father: {fileID: 0} + m_RootOrder: 3 + 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!1 &1350792516 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 4: {fileID: 1350792517} + - 23: {fileID: 1350792520} + - 33: {fileID: 1350792519} + - 114: {fileID: 1350792518} + m_Layer: 0 + m_Name: Plane + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1350792517 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1350792516} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -1, y: -3, z: -1} + m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_Children: [] + m_Father: {fileID: 644687429} + m_RootOrder: 14 +--- !u!114 &1350792518 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1350792516} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 3ee7e41d3c8707041b135f52eaa97c95, type: 3} + m_Name: + m_EditorClassIdentifier: + xSize: 2 + zSize: 2 + xSegments: 16 + zSegments: 16 +--- !u!33 &1350792519 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1350792516} + m_Mesh: {fileID: 0} +--- !u!23 &1350792520 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1350792516} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 0 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: 5526f677179d4ec41a9d8c15775b3ae3, type: 2} + m_SubsetIndices: + 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_SelectedWireframeHidden: 0 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingOrder: 0 +--- !u!1 &1491603514 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 4: {fileID: 1491603518} + - 114: {fileID: 1491603517} + - 114: {fileID: 1491603516} + - 114: {fileID: 1491603515} + m_Layer: 0 + m_Name: EventSystem + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1491603515 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1491603514} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1997211142, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_ForceModuleActive: 0 +--- !u!114 &1491603516 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1491603514} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1077351063, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_HorizontalAxis: Horizontal + m_VerticalAxis: Vertical + m_SubmitButton: Submit + m_CancelButton: Cancel + m_InputActionsPerSecond: 10 + m_RepeatDelay: 0.5 + m_ForceModuleActive: 0 +--- !u!114 &1491603517 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1491603514} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -619905303, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_FirstSelected: {fileID: 0} + m_sendNavigationEvents: 1 + m_DragThreshold: 5 +--- !u!4 &1491603518 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1491603514} + 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_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 4 +--- !u!1 &1611349192 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 4: {fileID: 1611349196} + - 23: {fileID: 1611349195} + - 33: {fileID: 1611349194} + - 114: {fileID: 1611349193} + m_Layer: 0 + m_Name: FlatSphere + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1611349193 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1611349192} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: dce0abc89d699a24f97c3753326ed9bb, type: 3} + m_Name: + m_EditorClassIdentifier: + radius: 1 + horizontalSegments: 16 + verticalSegments: 16 +--- !u!33 &1611349194 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1611349192} + m_Mesh: {fileID: 0} +--- !u!23 &1611349195 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1611349192} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 0 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: 5526f677179d4ec41a9d8c15775b3ae3, type: 2} + m_SubsetIndices: + 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_SelectedWireframeHidden: 0 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingOrder: 0 +--- !u!4 &1611349196 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1611349192} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 3, y: 3, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_Children: [] + m_Father: {fileID: 644687429} + m_RootOrder: 3 +--- !u!1 &1672207372 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 4: {fileID: 1672207373} + - 23: {fileID: 1672207376} + - 33: {fileID: 1672207375} + - 114: {fileID: 1672207374} + m_Layer: 0 + m_Name: Prism + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1672207373 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1672207372} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -3, y: 3, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_Children: [] + m_Father: {fileID: 644687429} + m_RootOrder: 1 +--- !u!114 &1672207374 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1672207372} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f1f9687b5f48ed147a5a860a8759d93d, type: 3} + m_Name: + m_EditorClassIdentifier: + radius: 1 + segments: 16 + height: 2 +--- !u!33 &1672207375 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1672207372} + m_Mesh: {fileID: 0} +--- !u!23 &1672207376 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1672207372} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 0 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: 5526f677179d4ec41a9d8c15775b3ae3, type: 2} + m_SubsetIndices: + 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_SelectedWireframeHidden: 0 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingOrder: 0 +--- !u!1 &1691507009 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 4: {fileID: 1691507010} + - 23: {fileID: 1691507013} + - 33: {fileID: 1691507012} + - 114: {fileID: 1691507011} + m_Layer: 0 + m_Name: Pyramid + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1691507010 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1691507009} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 6, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_Children: [] + m_Father: {fileID: 644687429} + m_RootOrder: 10 +--- !u!114 &1691507011 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1691507009} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 370c0da467475bc4589f2ee7aa3e97d0, type: 3} + m_Name: + m_EditorClassIdentifier: + radius: 1 + segments: 16 + height: 1 +--- !u!33 &1691507012 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1691507009} + m_Mesh: {fileID: 0} +--- !u!23 &1691507013 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1691507009} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 0 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: 5526f677179d4ec41a9d8c15775b3ae3, type: 2} + m_SubsetIndices: + 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_SelectedWireframeHidden: 0 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingOrder: 0 +--- !u!1 &2040988412 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 4: {fileID: 2040988413} + - 23: {fileID: 2040988416} + - 33: {fileID: 2040988415} + - 114: {fileID: 2040988414} + m_Layer: 0 + m_Name: Dodecahedron + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &2040988413 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2040988412} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -6, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_Children: [] + m_Father: {fileID: 644687429} + m_RootOrder: 6 +--- !u!114 &2040988414 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2040988412} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 17232327dcbc17b46949d66e6b59fec5, type: 3} + m_Name: + m_EditorClassIdentifier: + radius: 1 +--- !u!33 &2040988415 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2040988412} + m_Mesh: {fileID: 0} +--- !u!23 &2040988416 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2040988412} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 0 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: 5526f677179d4ec41a9d8c15775b3ae3, type: 2} + m_SubsetIndices: + 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_SelectedWireframeHidden: 0 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingOrder: 0 +--- !u!1 &2138072843 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 4: {fileID: 2138072844} + - 23: {fileID: 2138072847} + - 33: {fileID: 2138072846} + - 114: {fileID: 2138072845} + m_Layer: 0 + m_Name: Icosahedron + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &2138072844 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2138072843} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -3, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_Children: [] + m_Father: {fileID: 644687429} + m_RootOrder: 7 +--- !u!114 &2138072845 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2138072843} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1d7cd73a4d0af9a4a9827f3d196519de, type: 3} + m_Name: + m_EditorClassIdentifier: + radius: 1 +--- !u!33 &2138072846 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2138072843} + m_Mesh: {fileID: 0} +--- !u!23 &2138072847 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2138072843} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 0 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: 5526f677179d4ec41a9d8c15775b3ae3, type: 2} + m_SubsetIndices: + 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_SelectedWireframeHidden: 0 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingOrder: 0 diff --git a/Assets/Packages/ProceduralToolkit/Examples/Primitives/Primitives.unity.meta b/Assets/Packages/ProceduralToolkit/Examples/Primitives/Primitives.unity.meta new file mode 100644 index 0000000000000000000000000000000000000000..2504020162739b3b26de5e571e62f9d9f04ff6d9 --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/Examples/Primitives/Primitives.unity.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: 5d326c8dbafee4f42bf494fd83426bbf +DefaultImporter: + userData: diff --git a/Assets/Packages/ProceduralToolkit/Examples/Primitives/Prism.cs b/Assets/Packages/ProceduralToolkit/Examples/Primitives/Prism.cs new file mode 100644 index 0000000000000000000000000000000000000000..d23aa89ce8a0cc42712985e9723b5e7625928514 --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/Examples/Primitives/Prism.cs @@ -0,0 +1,17 @@ +using UnityEngine; + +namespace ProceduralToolkit.Examples.Primitives +{ + [RequireComponent(typeof(MeshRenderer), typeof(MeshFilter))] + public class Prism : MonoBehaviour + { + public float radius = 1f; + public int segments = 16; + public float height = 2f; + + private void Start() + { + GetComponent().mesh = MeshE.Prism(radius, segments, height); + } + } +} \ No newline at end of file diff --git a/Assets/Packages/ProceduralToolkit/Examples/Primitives/Prism.cs.meta b/Assets/Packages/ProceduralToolkit/Examples/Primitives/Prism.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..0be082695e292e61fb85da2d19d611cd5111317e --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/Examples/Primitives/Prism.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: f1f9687b5f48ed147a5a860a8759d93d +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/Packages/ProceduralToolkit/Examples/Primitives/Pyramid.cs b/Assets/Packages/ProceduralToolkit/Examples/Primitives/Pyramid.cs new file mode 100644 index 0000000000000000000000000000000000000000..7ccc81e8c6fe1967a033af46b9f0191e93cf3350 --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/Examples/Primitives/Pyramid.cs @@ -0,0 +1,17 @@ +using UnityEngine; + +namespace ProceduralToolkit.Examples.Primitives +{ + [RequireComponent(typeof(MeshRenderer), typeof(MeshFilter))] + public class Pyramid : MonoBehaviour + { + public float radius = 1f; + public int segments = 16; + public float height = 1f; + + private void Start() + { + GetComponent().mesh = MeshE.Pyramid(radius, segments, height); + } + } +} \ No newline at end of file diff --git a/Assets/Packages/ProceduralToolkit/Examples/Primitives/Pyramid.cs.meta b/Assets/Packages/ProceduralToolkit/Examples/Primitives/Pyramid.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..d784c4e328f0d59d2ccfcb984a3628133afb933c --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/Examples/Primitives/Pyramid.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 370c0da467475bc4589f2ee7aa3e97d0 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/Packages/ProceduralToolkit/Examples/Primitives/Sphere.cs b/Assets/Packages/ProceduralToolkit/Examples/Primitives/Sphere.cs new file mode 100644 index 0000000000000000000000000000000000000000..8a27830044127d60133ef43e2e6d4943d38ed92e --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/Examples/Primitives/Sphere.cs @@ -0,0 +1,17 @@ +using UnityEngine; + +namespace ProceduralToolkit.Examples.Primitives +{ + [RequireComponent(typeof(MeshRenderer), typeof(MeshFilter))] + public class Sphere : MonoBehaviour + { + public float radius = 1f; + public int horizontalSegments = 16; + public int verticalSegments = 16; + + private void Start() + { + GetComponent().mesh = MeshE.Sphere(radius, horizontalSegments, verticalSegments); + } + } +} \ No newline at end of file diff --git a/Assets/Packages/ProceduralToolkit/Examples/Primitives/Sphere.cs.meta b/Assets/Packages/ProceduralToolkit/Examples/Primitives/Sphere.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..9a6b19c6ff26fe053db9cf0d69249ee166b18421 --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/Examples/Primitives/Sphere.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: d7474a3099774e84fbc35cac5287f13b +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/Packages/ProceduralToolkit/Examples/Primitives/Spheroid.cs b/Assets/Packages/ProceduralToolkit/Examples/Primitives/Spheroid.cs new file mode 100644 index 0000000000000000000000000000000000000000..017a7a87781144999a4cfe7da5958a39eabe3791 --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/Examples/Primitives/Spheroid.cs @@ -0,0 +1,18 @@ +using UnityEngine; + +namespace ProceduralToolkit.Examples.Primitives +{ + [RequireComponent(typeof (MeshRenderer), typeof (MeshFilter))] + public class Spheroid : MonoBehaviour + { + public float radius = 0.75f; + public float height = 1f; + public int horizontalSegments = 16; + public int verticalSegments = 16; + + private void Start() + { + GetComponent().mesh = MeshE.Spheroid(radius, height, horizontalSegments, verticalSegments); + } + } +} \ No newline at end of file diff --git a/Assets/Packages/ProceduralToolkit/Examples/Primitives/Spheroid.cs.meta b/Assets/Packages/ProceduralToolkit/Examples/Primitives/Spheroid.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..cced5c68587653d4b0b09f500882901e1f2a2120 --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/Examples/Primitives/Spheroid.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 9111180099d3beb4ca31f3fbdede757f +timeCreated: 1476532329 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Packages/ProceduralToolkit/Examples/Primitives/Teardrop.cs b/Assets/Packages/ProceduralToolkit/Examples/Primitives/Teardrop.cs new file mode 100644 index 0000000000000000000000000000000000000000..2306f6996645dda746faf145fe8935c09f879ac8 --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/Examples/Primitives/Teardrop.cs @@ -0,0 +1,18 @@ +using UnityEngine; + +namespace ProceduralToolkit.Examples.Primitives +{ + [RequireComponent(typeof (MeshRenderer), typeof (MeshFilter))] + public class Teardrop : MonoBehaviour + { + public float radius = 1f; + public float height = 1f; + public int horizontalSegments = 16; + public int verticalSegments = 16; + + private void Start() + { + GetComponent().mesh = MeshE.Teardrop(radius, height, horizontalSegments, verticalSegments); + } + } +} \ No newline at end of file diff --git a/Assets/Packages/ProceduralToolkit/Examples/Primitives/Teardrop.cs.meta b/Assets/Packages/ProceduralToolkit/Examples/Primitives/Teardrop.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..bafb1b8de5efcc235aafcbe7ecaf8d95127ea9fa --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/Examples/Primitives/Teardrop.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: a3b361ae3608c2549a275c131ad71e1d +timeCreated: 1476533980 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Packages/ProceduralToolkit/Examples/Primitives/Tetrahedron.cs b/Assets/Packages/ProceduralToolkit/Examples/Primitives/Tetrahedron.cs new file mode 100644 index 0000000000000000000000000000000000000000..496e45335e83efb5dc5970309d91608da0b2ff20 --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/Examples/Primitives/Tetrahedron.cs @@ -0,0 +1,15 @@ +using UnityEngine; + +namespace ProceduralToolkit.Examples.Primitives +{ + [RequireComponent(typeof(MeshRenderer), typeof(MeshFilter))] + public class Tetrahedron : MonoBehaviour + { + public float radius = 1f; + + private void Start() + { + GetComponent().mesh = MeshE.Tetrahedron(radius); + } + } +} \ No newline at end of file diff --git a/Assets/Packages/ProceduralToolkit/Examples/Primitives/Tetrahedron.cs.meta b/Assets/Packages/ProceduralToolkit/Examples/Primitives/Tetrahedron.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..b3367acf664860a141dd73a9e88a19d2ea92a2f8 --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/Examples/Primitives/Tetrahedron.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 311f034d8170bdd49bad2f7647e36f88 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/Packages/ProceduralToolkit/Examples/Resources.meta b/Assets/Packages/ProceduralToolkit/Examples/Resources.meta new file mode 100644 index 0000000000000000000000000000000000000000..b188908aa9f4b0472bd46fcec2f19941d6fe560e --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/Examples/Resources.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: d420ffb1cdab75443927e4aedbd7a608 +folderAsset: yes +timeCreated: 1443729640 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Packages/ProceduralToolkit/Examples/Resources/ButtonControl.prefab b/Assets/Packages/ProceduralToolkit/Examples/Resources/ButtonControl.prefab new file mode 100644 index 0000000000000000000000000000000000000000..f0027b1b94388c8278fc833e55dc6b89602e7327 --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/Examples/Resources/ButtonControl.prefab @@ -0,0 +1,216 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &115230 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 224: {fileID: 22456214} + - 222: {fileID: 22249074} + - 114: {fileID: 11420872} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &148576 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 224: {fileID: 22414110} + - 222: {fileID: 22205996} + - 114: {fileID: 11444342} + - 114: {fileID: 11450778} + - 114: {fileID: 11417464} + - 114: {fileID: 11485862} + m_Layer: 5 + m_Name: ButtonControl + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &11417464 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 148576} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: 50 + m_PreferredWidth: -1 + m_PreferredHeight: -1 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 +--- !u!114 &11420872 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 115230} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: .196078435, g: .196078435, b: .196078435, a: 1} + 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_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Header +--- !u!114 &11444342 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 148576} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + 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 &11450778 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 148576} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, 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: .960784316, g: .960784316, b: .960784316, a: 1} + m_PressedColor: {r: .784313738, g: .784313738, b: .784313738, a: 1} + m_DisabledColor: {r: .784313738, g: .784313738, b: .784313738, a: .501960814} + m_ColorMultiplier: 1 + m_FadeDuration: .100000001 + 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: 11444342} + m_OnClick: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &11485862 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 148576} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ff9585afe73a0dd4896f46d4c5903688, type: 3} + m_Name: + m_EditorClassIdentifier: + headerText: {fileID: 11420872} + button: {fileID: 11450778} +--- !u!222 &22205996 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 148576} +--- !u!222 &22249074 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 115230} +--- !u!224 &22414110 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 148576} + 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: 22456214} + m_Father: {fileID: 0} + m_RootOrder: 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: .5, y: .5} +--- !u!224 &22456214 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 115230} + 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: 22414110} + m_RootOrder: 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: .5, y: .5} +--- !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: 148576} + m_IsPrefabParent: 1 diff --git a/Assets/Packages/ProceduralToolkit/Examples/Resources/ButtonControl.prefab.meta b/Assets/Packages/ProceduralToolkit/Examples/Resources/ButtonControl.prefab.meta new file mode 100644 index 0000000000000000000000000000000000000000..934e6a549e24ef39af02a14720da9a11e7ead6f1 --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/Examples/Resources/ButtonControl.prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 5f63cf469b722c3439134222f4f782e4 +timeCreated: 1443731092 +licenseType: Store +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Packages/ProceduralToolkit/Examples/Resources/Skybox.mat b/Assets/Packages/ProceduralToolkit/Examples/Resources/Skybox.mat new file mode 100644 index 0000000000000000000000000000000000000000..b8b85fbcfd4aeb280c3ace70650fb2e92cbca646 --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/Examples/Resources/Skybox.mat @@ -0,0 +1,43 @@ +%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: Skybox + m_Shader: {fileID: 4800000, guid: 0bfcf4c10b2626940ad26b7f045faf56, type: 3} + m_ShaderKeywords: _SUNDISK_HIGH_QUALITY + m_LightmapFlags: 5 + m_CustomRenderQueue: -1 + stringTagMap: {} + m_SavedProperties: + serializedVersion: 2 + m_TexEnvs: {} + m_Floats: + data: + first: + name: _Intensity + second: 1 + data: + first: + name: _Exponent1 + second: 3 + data: + first: + name: _Exponent2 + second: 1 + m_Colors: + data: + first: + name: _GroundColor + second: {r: 0.75, g: 0.75, b: 0.75, a: 0} + data: + first: + name: _SkyColor + second: {r: 1, g: 1, b: 1, a: 0} + data: + first: + name: _HorizonColor + second: {r: 0.25, g: 0.25, b: 0.25, a: 0} diff --git a/Assets/Packages/ProceduralToolkit/Examples/Resources/Skybox.mat.meta b/Assets/Packages/ProceduralToolkit/Examples/Resources/Skybox.mat.meta new file mode 100644 index 0000000000000000000000000000000000000000..7e127a198b696f053e7e60b4816e3dc504d53dcb --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/Examples/Resources/Skybox.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 3b82c898af0b03548a0dddd255b6092e +timeCreated: 1472323537 +licenseType: Store +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Packages/ProceduralToolkit/Examples/Resources/SliderControl.prefab b/Assets/Packages/ProceduralToolkit/Examples/Resources/SliderControl.prefab new file mode 100644 index 0000000000000000000000000000000000000000..c9077bba10d16ccb05b6067f9448eaaaf904d00c --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/Examples/Resources/SliderControl.prefab @@ -0,0 +1,559 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &104170 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 224: {fileID: 22412656} + m_Layer: 5 + m_Name: Handle Slide Area + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &131404 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 224: {fileID: 22449288} + m_Layer: 5 + m_Name: Fill Area + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &132250 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 224: {fileID: 22421638} + - 222: {fileID: 22232086} + - 114: {fileID: 11434772} + m_Layer: 5 + m_Name: Background + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &148326 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 224: {fileID: 22415836} + - 222: {fileID: 22279886} + - 114: {fileID: 11468594} + m_Layer: 5 + m_Name: Header + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &166498 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 224: {fileID: 22404572} + - 222: {fileID: 22272932} + - 114: {fileID: 11426440} + m_Layer: 5 + m_Name: Handle + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &192414 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 224: {fileID: 22468684} + - 222: {fileID: 22210104} + - 114: {fileID: 11488538} + m_Layer: 5 + m_Name: Value + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &193694 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 224: {fileID: 22442374} + - 114: {fileID: 11409044} + - 114: {fileID: 11462304} + m_Layer: 5 + m_Name: SliderControl + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &194590 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 224: {fileID: 22447022} + - 222: {fileID: 22268546} + - 114: {fileID: 11418998} + m_Layer: 5 + m_Name: Fill + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &199906 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 224: {fileID: 22414192} + - 114: {fileID: 11460198} + m_Layer: 5 + m_Name: Slider + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &11409044 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 193694} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: 40 + m_PreferredWidth: -1 + m_PreferredHeight: -1 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 +--- !u!114 &11418998 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 194590} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + 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 &11426440 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 166498} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_Sprite: {fileID: 10913, 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 &11434772 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 132250} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + 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 &11460198 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 199906} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -113659843, guid: f5f67c52d1564df4a8936ccd202a3bd8, 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: .960784316, g: .960784316, b: .960784316, a: 1} + m_PressedColor: {r: .784313738, g: .784313738, b: .784313738, a: 1} + m_DisabledColor: {r: .784313738, g: .784313738, b: .784313738, a: .501960814} + m_ColorMultiplier: 1 + m_FadeDuration: .100000001 + 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: 11426440} + m_FillRect: {fileID: 22447022} + m_HandleRect: {fileID: 22404572} + m_Direction: 0 + m_MinValue: 0 + m_MaxValue: 1 + m_WholeNumbers: 0 + m_Value: 0 + m_OnValueChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.Slider+SliderEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &11462304 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 193694} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5af1ea43c4a797e40b84b7383fc47fd8, type: 3} + m_Name: + m_EditorClassIdentifier: + headerText: {fileID: 11468594} + slider: {fileID: 11460198} + valueText: {fileID: 11488538} +--- !u!114 &11468594 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 148326} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: .196078435, g: .196078435, b: .196078435, a: 1} + 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_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Back height +--- !u!114 &11488538 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 192414} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: .196078435, g: .196078435, b: .196078435, a: 1} + 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: 5 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: 1 +--- !u!222 &22210104 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 192414} +--- !u!222 &22232086 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 132250} +--- !u!222 &22268546 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 194590} +--- !u!222 &22272932 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 166498} +--- !u!222 &22279886 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 148326} +--- !u!224 &22404572 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 166498} + 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: 22412656} + m_RootOrder: 0 + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 20, y: 0} + m_Pivot: {x: .5, y: .5} +--- !u!224 &22412656 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 104170} + 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: 22404572} + m_Father: {fileID: 22414192} + m_RootOrder: 2 + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: -20, y: 0} + m_Pivot: {x: .5, y: .5} +--- !u!224 &22414192 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 199906} + 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: 22421638} + - {fileID: 22449288} + - {fileID: 22412656} + m_Father: {fileID: 22442374} + m_RootOrder: 1 + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 0} + m_AnchoredPosition: {x: -15, y: 0} + m_SizeDelta: {x: -30, y: 20} + m_Pivot: {x: .5, y: 0} +--- !u!224 &22415836 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 148326} + 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: 22442374} + m_RootOrder: 0 + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 20} + m_Pivot: {x: .5, y: 1} +--- !u!224 &22421638 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 132250} + 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: 22414192} + m_RootOrder: 0 + m_AnchorMin: {x: 0, y: .25} + m_AnchorMax: {x: 1, y: .75} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: .5, y: .5} +--- !u!224 &22442374 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 193694} + 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: 22415836} + - {fileID: 22414192} + - {fileID: 22468684} + m_Father: {fileID: 0} + m_RootOrder: 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: .5, y: .5} +--- !u!224 &22447022 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 194590} + 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: 22449288} + m_RootOrder: 0 + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 10, y: 0} + m_Pivot: {x: .5, y: .5} +--- !u!224 &22449288 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 131404} + 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: 22447022} + m_Father: {fileID: 22414192} + m_RootOrder: 1 + m_AnchorMin: {x: 0, y: .25} + m_AnchorMax: {x: 1, y: .75} + m_AnchoredPosition: {x: -5, y: 0} + m_SizeDelta: {x: -20, y: 0} + m_Pivot: {x: .5, y: .5} +--- !u!224 &22468684 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 192414} + 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: 22442374} + m_RootOrder: 2 + m_AnchorMin: {x: 1, y: 0} + m_AnchorMax: {x: 1, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 30, y: 20} + m_Pivot: {x: 1, y: 0} +--- !u!1001 &100100000 +Prefab: + m_ObjectHideFlags: 1 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 0} + propertyPath: headerText + value: + objectReference: {fileID: 11468594} + - target: {fileID: 0} + propertyPath: slider + value: + objectReference: {fileID: 11460198} + - target: {fileID: 0} + propertyPath: valueText + value: + objectReference: {fileID: 11488538} + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 0} + m_RootGameObject: {fileID: 193694} + m_IsPrefabParent: 1 diff --git a/Assets/Packages/ProceduralToolkit/Examples/Resources/SliderControl.prefab.meta b/Assets/Packages/ProceduralToolkit/Examples/Resources/SliderControl.prefab.meta new file mode 100644 index 0000000000000000000000000000000000000000..09bbed0d6478655e8052f0e76e10922083044cc8 --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/Examples/Resources/SliderControl.prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 3e782a71e3785954994cf88a58d7c6db +timeCreated: 1443728976 +licenseType: Store +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Packages/ProceduralToolkit/Examples/Resources/TextControl.prefab b/Assets/Packages/ProceduralToolkit/Examples/Resources/TextControl.prefab new file mode 100644 index 0000000000000000000000000000000000000000..a15f2e573a47d1c0595385a7032d696a2d5c2dba --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/Examples/Resources/TextControl.prefab @@ -0,0 +1,111 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &148582 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 224: {fileID: 22480444} + - 222: {fileID: 22217200} + - 114: {fileID: 11404654} + - 114: {fileID: 11437886} + - 114: {fileID: 11485924} + m_Layer: 5 + m_Name: TextControl + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &11404654 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 148582} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: .196078435, g: .196078435, b: .196078435, a: 1} + 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_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Text +--- !u!114 &11437886 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 148582} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: 20 + m_PreferredWidth: -1 + m_PreferredHeight: -1 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 +--- !u!114 &11485924 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 148582} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9efd8439db7a449478ca7c33e193a47e, type: 3} + m_Name: + m_EditorClassIdentifier: + headerText: {fileID: 11404654} +--- !u!222 &22217200 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 148582} +--- !u!224 &22480444 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 148582} + 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: 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: .5, y: .5} +--- !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: 148582} + m_IsPrefabParent: 1 diff --git a/Assets/Packages/ProceduralToolkit/Examples/Resources/TextControl.prefab.meta b/Assets/Packages/ProceduralToolkit/Examples/Resources/TextControl.prefab.meta new file mode 100644 index 0000000000000000000000000000000000000000..445c103349a04f747df53377d6c8f3f73fc0fdd6 --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/Examples/Resources/TextControl.prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 838af2d9a9455974d976020fc229cbee +timeCreated: 1443771155 +licenseType: Store +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Packages/ProceduralToolkit/Examples/Resources/ToggleControl.prefab b/Assets/Packages/ProceduralToolkit/Examples/Resources/ToggleControl.prefab new file mode 100644 index 0000000000000000000000000000000000000000..e19323d5177c3d3b1788caa9b8c3a39ebc7966d4 --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/Examples/Resources/ToggleControl.prefab @@ -0,0 +1,323 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &135542 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 224: {fileID: 22497706} + - 222: {fileID: 22233758} + - 114: {fileID: 11421988} + m_Layer: 5 + m_Name: Background + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &174558 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 224: {fileID: 22449660} + - 114: {fileID: 11472006} + - 114: {fileID: 11438880} + - 114: {fileID: 11403750} + m_Layer: 5 + m_Name: ToggleControl + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &176432 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 224: {fileID: 22495148} + - 222: {fileID: 22297112} + - 114: {fileID: 11412530} + m_Layer: 5 + m_Name: Label + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &181808 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 224: {fileID: 22461302} + - 222: {fileID: 22275992} + - 114: {fileID: 11440494} + m_Layer: 5 + m_Name: Checkmark + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &11403750 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 174558} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f674532b9458fc44381f0490d1f23f25, type: 3} + m_Name: + m_EditorClassIdentifier: + headerText: {fileID: 11412530} + toggle: {fileID: 11472006} +--- !u!114 &11412530 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 176432} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: .196078435, g: .196078435, b: .196078435, a: 1} + 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_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Header +--- !u!114 &11421988 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 135542} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + 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 &11438880 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 174558} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: 20 + m_PreferredWidth: -1 + m_PreferredHeight: -1 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 +--- !u!114 &11440494 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 181808} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + 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 &11472006 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 174558} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 2109663825, guid: f5f67c52d1564df4a8936ccd202a3bd8, 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: .960784316, g: .960784316, b: .960784316, a: 1} + m_PressedColor: {r: .784313738, g: .784313738, b: .784313738, a: 1} + m_DisabledColor: {r: .784313738, g: .784313738, b: .784313738, a: .501960814} + m_ColorMultiplier: 1 + m_FadeDuration: .100000001 + 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: 11421988} + toggleTransition: 1 + graphic: {fileID: 11440494} + 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!222 &22233758 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 135542} +--- !u!222 &22275992 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 181808} +--- !u!222 &22297112 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 176432} +--- !u!224 &22449660 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 174558} + 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: 22497706} + - {fileID: 22495148} + m_Father: {fileID: 0} + m_RootOrder: 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: .5, y: .5} +--- !u!224 &22461302 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 181808} + 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: 22497706} + m_RootOrder: 0 + m_AnchorMin: {x: .5, y: .5} + m_AnchorMax: {x: .5, y: .5} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 20, y: 20} + m_Pivot: {x: .5, y: .5} +--- !u!224 &22495148 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 176432} + 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: 22449660} + m_RootOrder: 1 + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 9, y: -.5} + m_SizeDelta: {x: -28, y: -3} + m_Pivot: {x: .5, y: .5} +--- !u!224 &22497706 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 135542} + 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: 22461302} + m_Father: {fileID: 22449660} + m_RootOrder: 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: .5, y: .5} +--- !u!1001 &100100000 +Prefab: + m_ObjectHideFlags: 1 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 0} + propertyPath: headerText + value: + objectReference: {fileID: 11412530} + - target: {fileID: 0} + propertyPath: toggle + value: + objectReference: {fileID: 11472006} + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 0} + m_RootGameObject: {fileID: 174558} + m_IsPrefabParent: 1 diff --git a/Assets/Packages/ProceduralToolkit/Examples/Resources/ToggleControl.prefab.meta b/Assets/Packages/ProceduralToolkit/Examples/Resources/ToggleControl.prefab.meta new file mode 100644 index 0000000000000000000000000000000000000000..12f5e938d5221f33eaf68de50233d9df070cb5f4 --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/Examples/Resources/ToggleControl.prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 0b6d17072961d674bbbab447247b59df +timeCreated: 1443730858 +licenseType: Store +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Packages/ProceduralToolkit/GLE.cs b/Assets/Packages/ProceduralToolkit/GLE.cs new file mode 100644 index 0000000000000000000000000000000000000000..d22e0b57719b8e03cd26b0dd8eb181262a9dd86a --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/GLE.cs @@ -0,0 +1,143 @@ +using System; +using UnityEngine; +using UnityEngine.Rendering; + +namespace ProceduralToolkit +{ + public static class GLE + { + public static readonly Material wireMaterial; + + private static readonly Action drawLine; + + static GLE() + { + var shader = Shader.Find("Hidden/Internal-Colored"); + wireMaterial = new Material(shader) {hideFlags = HideFlags.HideAndDontSave}; + wireMaterial.SetInt("_SrcBlend", (int) BlendMode.SrcAlpha); + wireMaterial.SetInt("_DstBlend", (int) BlendMode.OneMinusSrcAlpha); + wireMaterial.SetInt("_Cull", (int) CullMode.Off); + wireMaterial.SetInt("_ZWrite", 0); + + drawLine = DrawLine; + } + + public static void DrawLine(Vector3 from, Vector3 to) + { + GL.Vertex(from); + GL.Vertex(to); + } + + public static void DrawRay(Ray ray) + { + Draw.WireRay(drawLine, ray); + } + + public static void DrawWireQuadXY(Vector3 position, Quaternion rotation, Vector2 scale) + { + Draw.WireQuadXY(drawLine, position, rotation, scale); + } + + public static void DrawWireQuadXZ(Vector3 position, Quaternion rotation, Vector2 scale) + { + Draw.WireQuadXZ(drawLine, position, rotation, scale); + } + + public static void DrawWireQuadYZ(Vector3 position, Quaternion rotation, Vector2 scale) + { + Draw.WireQuadYZ(drawLine, position, rotation, scale); + } + + public static void DrawWireCube(Vector3 position, Quaternion rotation, Vector3 scale) + { + Draw.WireCube(drawLine, position, rotation, scale); + } + + #region DrawWireCircle + + public static void DrawWireCircleXY(Vector3 position, float radius) + { + Draw.WireCircleXY(drawLine, position, radius); + } + + public static void DrawWireCircleXY(Vector3 position, Quaternion rotation, float radius) + { + Draw.WireCircleXY(drawLine, position, rotation, radius); + } + + public static void DrawWireCircleXZ(Vector3 position, float radius) + { + Draw.WireCircleXZ(drawLine, position, radius); + } + + public static void DrawWireCircleXZ(Vector3 position, Quaternion rotation, float radius) + { + Draw.WireCircleXZ(drawLine, position, rotation, radius); + } + + public static void DrawWireCircleYZ(Vector3 position, float radius) + { + Draw.WireCircleYZ(drawLine, position, radius); + } + + public static void DrawWireCircleYZ(Vector3 position, Quaternion rotation, float radius) + { + Draw.WireCircleYZ(drawLine, position, rotation, radius); + } + + #endregion DrawWireCircle + + #region DrawWireArc + + public static void DrawWireArcXY(Vector3 position, float radius, float fromAngle, float toAngle) + { + Draw.WireArcXY(drawLine, position, radius, fromAngle, toAngle); + } + + public static void DrawWireArcXY(Vector3 position, Quaternion rotation, float radius, float fromAngle, + float toAngle) + { + Draw.WireArcXY(drawLine, position, rotation, radius, fromAngle, toAngle); + } + + public static void DrawWireArcXZ(Vector3 position, float radius, float fromAngle, float toAngle) + { + Draw.WireArcXZ(drawLine, position, radius, fromAngle, toAngle); + } + + public static void DrawWireArcXZ(Vector3 position, Quaternion rotation, float radius, float fromAngle, + float toAngle) + { + Draw.WireArcXZ(drawLine, position, rotation, radius, fromAngle, toAngle); + } + + public static void DrawWireArcYZ(Vector3 position, float radius, float fromAngle, float toAngle) + { + Draw.WireArcYZ(drawLine, position, radius, fromAngle, toAngle); + } + + public static void DrawWireArcYZ(Vector3 position, Quaternion rotation, float radius, float fromAngle, + float toAngle) + { + Draw.WireArcYZ(drawLine, position, rotation, radius, fromAngle, toAngle); + } + + #endregion DrawWireArc + + public static void DrawWireSphere(Vector3 position, Quaternion rotation, float radius) + { + Draw.WireSphere(drawLine, position, rotation, radius); + } + + public static void DrawWireHemisphere(Vector3 position, Quaternion rotation, float radius) + { + Draw.WireHemisphere(drawLine, position, rotation, radius); + } + + public static void DrawWireCone(Vector3 position, Quaternion rotation, float apexRadius, float angle, + float length) + { + Draw.WireCone(drawLine, position, rotation, apexRadius, angle, length); + } + } +} \ No newline at end of file diff --git a/Assets/Packages/ProceduralToolkit/GLE.cs.meta b/Assets/Packages/ProceduralToolkit/GLE.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..6c555e1b16d2549f5a5adb651d983115addba8de --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/GLE.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 5e4b6af30f0b65c46b86692a563f1762 +timeCreated: 1472111899 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Packages/ProceduralToolkit/GizmosE.cs b/Assets/Packages/ProceduralToolkit/GizmosE.cs new file mode 100644 index 0000000000000000000000000000000000000000..d56571b1c8752c569fbb9bb5693c24b588cdf9bd --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/GizmosE.cs @@ -0,0 +1,127 @@ +using System; +using UnityEngine; + +namespace ProceduralToolkit +{ + public static class GizmosE + { + private static readonly Action drawLine; + + static GizmosE() + { + drawLine = Gizmos.DrawLine; + } + + public static void DrawRay(Ray ray) + { + Draw.WireRay(drawLine, ray); + } + + public static void DrawWireQuadXY(Vector3 position, Quaternion rotation, Vector2 scale) + { + Draw.WireQuadXY(drawLine, position, rotation, scale); + } + + public static void DrawWireQuadXZ(Vector3 position, Quaternion rotation, Vector2 scale) + { + Draw.WireQuadXZ(drawLine, position, rotation, scale); + } + + public static void DrawWireQuadYZ(Vector3 position, Quaternion rotation, Vector2 scale) + { + Draw.WireQuadYZ(drawLine, position, rotation, scale); + } + + public static void DrawWireCube(Vector3 position, Quaternion rotation, Vector3 scale) + { + Draw.WireCube(drawLine, position, rotation, scale); + } + + #region DrawWireCircle + + public static void DrawWireCircleXY(Vector3 position, float radius) + { + Draw.WireCircleXY(drawLine, position, radius); + } + + public static void DrawWireCircleXY(Vector3 position, Quaternion rotation, float radius) + { + Draw.WireCircleXY(drawLine, position, rotation, radius); + } + + public static void DrawWireCircleXZ(Vector3 position, float radius) + { + Draw.WireCircleXZ(drawLine, position, radius); + } + + public static void DrawWireCircleXZ(Vector3 position, Quaternion rotation, float radius) + { + Draw.WireCircleXZ(drawLine, position, rotation, radius); + } + + public static void DrawWireCircleYZ(Vector3 position, float radius) + { + Draw.WireCircleYZ(drawLine, position, radius); + } + + public static void DrawWireCircleYZ(Vector3 position, Quaternion rotation, float radius) + { + Draw.WireCircleYZ(drawLine, position, rotation, radius); + } + + #endregion DrawWireCircle + + #region DrawWireArc + + public static void DrawWireArcXY(Vector3 position, float radius, float fromAngle, float toAngle) + { + Draw.WireArcXY(drawLine, position, radius, fromAngle, toAngle); + } + + public static void DrawWireArcXY(Vector3 position, Quaternion rotation, float radius, float fromAngle, + float toAngle) + { + Draw.WireArcXY(drawLine, position, rotation, radius, fromAngle, toAngle); + } + + public static void DrawWireArcXZ(Vector3 position, float radius, float fromAngle, float toAngle) + { + Draw.WireArcXZ(drawLine, position, radius, fromAngle, toAngle); + } + + public static void DrawWireArcXZ(Vector3 position, Quaternion rotation, float radius, float fromAngle, + float toAngle) + { + Draw.WireArcXZ(drawLine, position, rotation, radius, fromAngle, toAngle); + } + + public static void DrawWireArcYZ(Vector3 position, float radius, float fromAngle, float toAngle) + { + Draw.WireArcYZ(drawLine, position, radius, fromAngle, toAngle); + } + + public static void DrawWireArcYZ(Vector3 position, Quaternion rotation, float radius, float fromAngle, + float toAngle) + { + Draw.WireArcYZ(drawLine, position, rotation, radius, fromAngle, toAngle); + } + + #endregion DrawWireArc + + public static void DrawWireSphere(Vector3 position, Quaternion rotation, float radius) + { + Draw.WireSphere(drawLine, position, rotation, radius); + } + + public static void DrawWireHemisphere(Vector3 position, Quaternion rotation, float radius) + { + Draw.WireHemisphere(drawLine, position, rotation, radius); + } + + public static void DrawWireCone(Vector3 position, Quaternion rotation, float apexRadius, float angle, + float length) + { + Draw.WireCone(drawLine, position, rotation, apexRadius, angle, length); + } + } +} \ No newline at end of file diff --git a/Assets/Packages/ProceduralToolkit/GizmosE.cs.meta b/Assets/Packages/ProceduralToolkit/GizmosE.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..7cbae2990a46d03019b7f728a07d2f064b70f798 --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/GizmosE.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: b30b45863d0e0f94eb0649d40a7e277d +timeCreated: 1472107108 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Packages/ProceduralToolkit/HISTORY.md b/Assets/Packages/ProceduralToolkit/HISTORY.md new file mode 100644 index 0000000000000000000000000000000000000000..2f0242c8e10b80299c62ef3b9560982f75d8f907 --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/HISTORY.md @@ -0,0 +1,135 @@ +## Version history +### 0.1.9 (2017.03.23) +#### Features: +* Added CharacterGenerator example with integrated NameGenerator which replaces Datasets class +* Added VectorE class with useful extensions for vectors +* Rewritten building generator with new layouting system +* Added debug shaders for UV1, UV2, normals, tangents and bitangents + +#### Improvements: +* MeshDraft: + * Added missing tangents and uv channels + * Added Clear method to clear all vertex data + * Added ToMesh converter with ref Mesh + * Added Serializable attribute + * Added vertexCount shortcut + * Added FlipUVHorizontally, FlipUVVertically and Spherify with similar extensions in MeshE +* Refactored all examples, added undo support for in-editor generation +* Added Draw.WireRay with wrappers in DebugE, GizmosE, GLE +* Added PTUtils.Angle360, PointOnSpheroid and InverseLerp +* Removed extra triangles from dodecahedron constructor +* Added cube, spheroid, teardrop and revolution surface constructors +* A few fixes to remove warnings in Unity 5.6 +* Added RandomE.PointInBounds +* Added ColorHSV.ToHtmlStringRGB and Color.ToHtmlStringRGB +* Added extensions for LinkedListNode: NextOrFirst and PreviousOrLast +* Updated documentation and comments +* A few bugfixes and simplifications + +#### Changes: +* Dropped support for Unity 5.3 +* Removed Datasets class and name generators from RandomE and with CharacterGenerator example due to error in IL2CPP compiler which was preventing builds for Android and iOS. Name generators are now in NameGenerator class and string constants are in PTUtils. +* Replaced CircularList with extension methods in ArrayE: GetLooped and SetLooped +* Renamed partial Hexahedron constructor to PartialBox +* Moved all common example classes to `ProceduralToolkit\Examples\Common` + +### 0.1.8 (2016.09.06) +#### Features: +* Added GizmosE, GLE and DebugE helper classes with extra drawing methods such as DrawWireCircle, DrawWireHemisphere, DrawWireCone, and others. GizmosE and DebugE have API similar to Gizmos and Debug, GLE is just a bunch of wrappers over GL.Vertex which follow Gizmos convention. +* Added Draw helper class with generic drawing methods +* Added Gradient Skybox shader +* Added new random color generators: RandomE.ColorHue, ColorSaturation and ColorValue +* Added static palette generators: ColorHSV.GetAnalogousPalette, GetTriadicPalette and GetTetradicPalette +* Added random palette generators: RandomE.AnalogousPalette, TriadicPalette, TetradicPalette +* 3D examples now have dynamic generated skyboxes +* Added custom inspectors for BuildingGenerator, ChairGenerator and LowPolyTerrainGenerator. Changing values does not cause regeneration, but otherwise they bahave the same way as UI controls and work in editor and play mode. + +#### Improvements: +* Optimized examples, mesh and texture helper classes to produce less garbage +* Fixed shadowcasting in vertex color shaders +* Fixed typos and bugs in some classes +* Added TextureE.Clear overload with ref array +* Added PTUtils.SignedAngle for 2D and 3D vectors +* Added PTUtils.PointsOnCircle3XY and PTUtils.PointsOnCircle3YZ +* Added RandomE.onUnitCircle3XY, RandomE.onUnitCircle3XZ, RandomE.onUnitCircle3YZ +* TerrainMesh received a full rewrite and is now LowPolyTerrainGenerator +* Added ColorHSV.WithH, WithS, WithV, WithA, WithOffsetH, Lerp and various useful methods (ToString, GetHashCode and the like) + +#### Changes: +* Dropped support for Unity 5.2 +* Renamed PTUtils.PointsOnCircle3 to PTUtils.PointsOnCircle3XZ +* Renamed Khrushchyovka to BuildingGenerator to avoid confusion +* PTUtils.PointsOnCircle methods now receive angle in degrees instead of radians +* Renamed RandomE.onUnitCircle to RandomE.onUnitCircle2 +* Renamed TerrainMesh to LowPolyTerrainGenerator +* Moved CameraRotator to Examples\UI +* Replaced RGB<->HSV conversion methods with Unity implementation +* Removed "Procedural Toolkit/Unlit Color" shader, use "Unlit/Color" instead +* RandomE.colorHSV now returns ColorHSV +* Moved drawing methods from PTUtils to Draw + +### 0.1.7 (2015.12.19) +#### Features: +* Added ColorHSV class +* Added Vector2Int class +* Added ArrayE class +* Added CircularList class +* Added CellularAutomaton example + +#### Improvements: +* Added PTUtils.DrawFilledCircle +* Refactored drawing methods, eliminated overdraw +* Fixed a few ui and generator bugs in examples + +#### Changes: +* Removed ColorE.HSVToRGB, use ColorHSV instead +* New CameraRotator behaviour, now requires Image to operate +* PTUtils.WuLine is now DrawAALine, BresenhamLine is DrawLine + +### 0.1.6 (2015.10.02) +* Major refactoring, new UI for all examples +* Removed ColorE.ToHex and ColorE.FromHex +* Moved all static MeshDraft constructors from MeshE to MeshDraft +* Added PTUtils.PointsOnCircle3 and PTUtils.PointsOnCircle2 +* Added RandomBreadthFirstTraversal maze algorithm +* Added datasets for names and last names +* RandomE + * Removed meshDraft + * Added onUnitCircle, insideUnitSquare, onUnitSquare, insideUnitCube, name constructors, new string and char constructos +* TextureE + * Removed Texture2D constructors + * Added DrawCircle, DrawGradient and DrawGradientRect + +### 0.1.5 (2015.05.14) +* Unity 5 support +* Added mesh saver +* Added new example: Breakout +* Added Standard Vertex Color shader + +### 0.1.4 (2015.02.08) +* Added new examples: Primitives and Mazes +* Added Texture extensions +* Added Bresenham and Wu line drawing algorithms + +### 0.1.3 (2014.11.15) +* Added new example: Khrushchyovka +* Added knapsack problem solver +* Added new Color extensions +* Added random choice for Dictionary +* Added new mesh drafts +* Added specular vertex color shader +* Improved examples + +### 0.1.2 (2014.11.10) +* Added new example: chair generator +* Small additions and fixes + +### 0.1.1 (2014.10.26) +* Added new primitives: cylinder and sphere +* Added mesh extensions: move, rotate, scale, paint, flip faces +* Added RandomE.Range methods +* Added PTUtils methods for points on circle and sphere +* Improved documentation + +### 0.1 (2014.10.13) +* First release diff --git a/Assets/Packages/ProceduralToolkit/HISTORY.md.meta b/Assets/Packages/ProceduralToolkit/HISTORY.md.meta new file mode 100644 index 0000000000000000000000000000000000000000..72139bcfb55fbf3b8587b6082f700fcb73d04e00 --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/HISTORY.md.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: a38f1a7ea7d890447af8f49190cc420c +timeCreated: 1490217051 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Packages/ProceduralToolkit/MeshDraft.cs b/Assets/Packages/ProceduralToolkit/MeshDraft.cs new file mode 100644 index 0000000000000000000000000000000000000000..fbdd6b6249d572fc2429d1384bae9020ba7f33aa --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/MeshDraft.cs @@ -0,0 +1,335 @@ +using System; +using System.Collections.Generic; +using UnityEngine; + +namespace ProceduralToolkit +{ + /// + /// Helper class for procedural mesh generation + /// + [Serializable] + public partial class MeshDraft + { + public string name = ""; + public List vertices = new List(); + public List triangles = new List(); + public List normals = new List(); + public List tangents = new List(); + public List uv = new List(); + public List uv2 = new List(); + public List uv3 = new List(); + public List uv4 = new List(); + public List colors = new List(); + + /// + /// Shortcut for vertices.Count + /// + public int vertexCount { get { return vertices.Count; } } + + /// + /// Creates an empty MeshDraft + /// + public MeshDraft() + { + } + + public MeshDraft(MeshDraft draft) + { + name = draft.name; + vertices = draft.vertices; + triangles = draft.triangles; + normals = draft.normals; + tangents = draft.tangents; + uv = draft.uv; + uv2 = draft.uv2; + uv3 = draft.uv3; + uv4 = draft.uv4; + colors = draft.colors; + } + + /// + /// Creates new MeshDraft with vertex data from > + /// + public MeshDraft(Mesh mesh) + { + if (mesh == null) + { + throw new ArgumentNullException("mesh"); + } + name = mesh.name; +#if UNITY_5_6_OR_NEWER + mesh.GetVertices(vertices); + mesh.GetTriangles(triangles, 0); + mesh.GetNormals(normals); + mesh.GetTangents(tangents); + mesh.GetUVs(0, uv); + mesh.GetUVs(1, uv2); + mesh.GetUVs(2, uv3); + mesh.GetUVs(3, uv4); + mesh.GetColors(colors); +#else + vertices.AddRange(mesh.vertices); + triangles.AddRange(mesh.triangles); + normals.AddRange(mesh.normals); + tangents.AddRange(mesh.tangents); + uv.AddRange(mesh.uv); + uv2.AddRange(mesh.uv2); + uv3.AddRange(mesh.uv3); + uv4.AddRange(mesh.uv4); + colors.AddRange(mesh.colors); +#endif + } + + /// + /// Adds vertex data from + /// + public void Add(MeshDraft draft) + { + if (draft == null) + { + throw new ArgumentNullException("draft"); + } + foreach (var triangle in draft.triangles) + { + triangles.Add(triangle + vertices.Count); + } + vertices.AddRange(draft.vertices); + normals.AddRange(draft.normals); + tangents.AddRange(draft.tangents); + uv.AddRange(draft.uv); + uv2.AddRange(draft.uv2); + uv3.AddRange(draft.uv3); + uv4.AddRange(draft.uv4); + colors.AddRange(draft.colors); + } + + /// + /// Clears all vertex data and all triangle indices + /// + public void Clear() + { + vertices.Clear(); + triangles.Clear(); + normals.Clear(); + tangents.Clear(); + uv.Clear(); + uv2.Clear(); + uv3.Clear(); + uv4.Clear(); + colors.Clear(); + } + + /// + /// Moves draft vertices by + /// + public void Move(Vector3 vector) + { + for (int i = 0; i < vertices.Count; i++) + { + vertices[i] += vector; + } + } + + /// + /// Rotates draft vertices by + /// + public void Rotate(Quaternion rotation) + { + for (int i = 0; i < vertices.Count; i++) + { + vertices[i] = rotation*vertices[i]; + normals[i] = rotation*normals[i]; + } + } + + /// + /// Scales draft vertices uniformly by + /// + public void Scale(float scale) + { + for (int i = 0; i < vertices.Count; i++) + { + vertices[i] *= scale; + } + } + + /// + /// Scales draft vertices non-uniformly by + /// + public void Scale(Vector3 scale) + { + for (int i = 0; i < vertices.Count; i++) + { + vertices[i] = Vector3.Scale(vertices[i], scale); + normals[i] = Vector3.Scale(normals[i], scale).normalized; + } + } + + /// + /// Paints draft vertices with + /// + public void Paint(Color color) + { + colors.Clear(); + for (int i = 0; i < vertices.Count; i++) + { + colors.Add(color); + } + } + + /// + /// Flips draft faces + /// + public void FlipFaces() + { + FlipTriangles(); + FlipNormals(); + } + + /// + /// Reverses winding order of draft triangles + /// + public void FlipTriangles() + { + for (int i = 0; i < triangles.Count; i += 3) + { + var temp = triangles[i]; + triangles[i] = triangles[i + 1]; + triangles[i + 1] = temp; + } + } + + /// + /// Reverses direction of draft normals + /// + public void FlipNormals() + { + for (int i = 0; i < normals.Count; i++) + { + normals[i] = -normals[i]; + } + } + + /// + /// Flips UV map horizontally in selected + /// + public void FlipUVHorizontally(int channel = 0) + { + List list; + switch (channel) + { + case 0: + list = uv; + break; + case 1: + list = uv2; + break; + case 2: + list = uv3; + break; + case 3: + list = uv4; + break; + default: + throw new ArgumentOutOfRangeException("channel"); + } + for (var i = 0; i < list.Count; i++) + { + list[i] = new Vector2(1 - list[i].x, list[i].y); + } + } + + /// + /// Flips UV map vertically in selected + /// + public void FlipUVVertically(int channel = 0) + { + List list; + switch (channel) + { + case 0: + list = uv; + break; + case 1: + list = uv2; + break; + case 2: + list = uv3; + break; + case 3: + list = uv4; + break; + default: + throw new ArgumentOutOfRangeException("channel"); + } + for (var i = 0; i < list.Count; i++) + { + list[i] = new Vector2(list[i].x, 1 - list[i].y); + } + } + + /// + /// Projects vertices on a sphere with given and , recalculates normals + /// + public void Spherify(float radius, Vector3 center = default(Vector3)) + { + for (var i = 0; i < vertices.Count; i++) + { + normals[i] = (vertices[i] - center).normalized; + vertices[i] = normals[i]*radius; + } + } + + /// + /// Expands vertices along the normals on a sphere with given and , recalculates normals + /// + public void Expand(float radius, float minimumRadius, Vector3 center = default(Vector3)) + { + for (var i = 0; i < vertices.Count; i++) + { + normals[i] = (vertices[i] - center).normalized; + vertices[i] = (vertices[i] + (normals[i] * radius)); + } + } + + /// + /// Creates new mesh from information in draft + /// + public Mesh ToMesh() + { + var mesh = new Mesh {name = name}; + mesh.SetVertices(vertices); + mesh.SetTriangles(triangles, 0); + mesh.SetNormals(normals); + mesh.SetTangents(tangents); + mesh.SetUVs(0, uv); + mesh.SetUVs(1, uv2); + mesh.SetUVs(2, uv3); + mesh.SetUVs(3, uv4); + mesh.SetColors(colors); + return mesh; + } + + /// + /// Fills with information in draft + /// + public void ToMesh(ref Mesh mesh) + { + if (mesh == null) + { + throw new ArgumentNullException("mesh"); + } + mesh.Clear(false); + mesh.name = name; + mesh.SetVertices(vertices); + mesh.SetTriangles(triangles, 0); + mesh.SetNormals(normals); + mesh.SetTangents(tangents); + mesh.SetUVs(0, uv); + mesh.SetUVs(1, uv2); + mesh.SetUVs(2, uv3); + mesh.SetUVs(3, uv4); + mesh.SetColors(colors); + } + } +} \ No newline at end of file diff --git a/Assets/Packages/ProceduralToolkit/MeshDraft.cs.meta b/Assets/Packages/ProceduralToolkit/MeshDraft.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..61e938a32da669f09920f565dd36c6668283ea5a --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/MeshDraft.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 999748a63a505f5428efaf236088e20a +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/Packages/ProceduralToolkit/MeshDraftPrimitives.cs b/Assets/Packages/ProceduralToolkit/MeshDraftPrimitives.cs new file mode 100644 index 0000000000000000000000000000000000000000..bea25568ea2cbd69ca9629ac8eedc1e45c4c8deb --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/MeshDraftPrimitives.cs @@ -0,0 +1,658 @@ +using System; +using System.Collections.Generic; +using UnityEngine; + +namespace ProceduralToolkit +{ + public partial class MeshDraft + { + #region Mesh parts + + public static MeshDraft Triangle(Vector3 vertex0, Vector3 vertex1, Vector3 vertex2) + { + var normal = Vector3.Cross((vertex1 - vertex0), (vertex2 - vertex0)).normalized; + return new MeshDraft + { + vertices = new List(3) {vertex0, vertex1, vertex2}, + normals = new List(3) {normal, normal, normal}, + uv = new List(3) {new Vector2(0, 0), new Vector2(0, 1), new Vector2(1, 1)}, + triangles = new List(3) {0, 1, 2}, + name = "Triangle" + }; + } + + public static MeshDraft Quad(Vector3 origin, Vector3 width, Vector3 length) + { + var normal = Vector3.Cross(length, width).normalized; + return new MeshDraft + { + vertices = new List(4) {origin, origin + length, origin + length + width, origin + width}, + normals = new List(4) {normal, normal, normal, normal}, + uv = new List(4) {new Vector2(0, 0), new Vector2(0, 1), new Vector2(1, 1), new Vector2(1, 0)}, + triangles = new List(6) {0, 1, 2, 0, 2, 3}, + name = "Quad" + }; + } + + public static MeshDraft Quad(Vector3 vertex0, Vector3 vertex1, Vector3 vertex2, Vector3 vertex3) + { + var normal = Vector3.Cross((vertex1 - vertex0), (vertex2 - vertex0)).normalized; + return new MeshDraft + { + vertices = new List(4) {vertex0, vertex1, vertex2, vertex3}, + normals = new List(4) {normal, normal, normal, normal}, + uv = new List(4) {new Vector2(0, 0), new Vector2(0, 1), new Vector2(1, 1), new Vector2(1, 0)}, + triangles = new List(6) {0, 1, 2, 0, 2, 3}, + name = "Quad" + }; + } + + /// + /// https://en.wikipedia.org/wiki/Triangle_fan + /// + public static MeshDraft TriangleFan(List vertices) + { + var draft = new MeshDraft + { + vertices = vertices, + triangles = new List(vertices.Count - 2), + normals = new List(vertices.Count), + uv = new List(vertices.Count), + name = "TriangleFan" + }; + for (int i = 1; i < vertices.Count - 1; i++) + { + draft.triangles.Add(0); + draft.triangles.Add(i); + draft.triangles.Add(i + 1); + } + var normal = Vector3.Cross(vertices[1] - vertices[0], vertices[2] - vertices[0]).normalized; + for (int i = 0; i < vertices.Count; i++) + { + draft.normals.Add(normal); + draft.uv.Add(new Vector2((float) i/vertices.Count, (float) i/vertices.Count)); + } + return draft; + } + + /// + /// https://en.wikipedia.org/wiki/Triangle_strip + /// + public static MeshDraft TriangleStrip(List vertices) + { + var draft = new MeshDraft + { + vertices = vertices, + triangles = new List(vertices.Count - 2), + normals = new List(vertices.Count), + uv = new List(vertices.Count), + name = "TriangleStrip" + }; + for (int i = 0, j = 1, k = 2; i < vertices.Count - 2; i++, j += i%2*2, k += (i + 1)%2*2) + { + draft.triangles.Add(i); + draft.triangles.Add(j); + draft.triangles.Add(k); + } + var normal = Vector3.Cross(vertices[1] - vertices[0], vertices[2] - vertices[0]).normalized; + for (int i = 0; i < vertices.Count; i++) + { + draft.normals.Add(normal); + draft.uv.Add(new Vector2((float) i/vertices.Count, (float) i/vertices.Count)); + } + return draft; + } + + public static MeshDraft BaselessPyramid(float radius, int segments, float heignt, bool inverted = false) + { + return BaselessPyramid(Vector3.zero, Vector3.up*heignt*(inverted ? -1 : 1), radius, segments, inverted); + } + + public static MeshDraft BaselessPyramid(Vector3 baseCenter, Vector3 apex, float radius, int segments, + bool inverted = false) + { + float segmentAngle = 360f/segments*(inverted ? -1 : 1); + float currentAngle = 0; + + var vertices = new Vector3[segments + 1]; + vertices[0] = apex; + for (var i = 1; i <= segments; i++) + { + vertices[i] = PTUtils.PointOnCircle3XZ(radius, currentAngle) + baseCenter; + currentAngle += segmentAngle; + } + + var draft = new MeshDraft {name = "BaselessPyramid"}; + for (var i = 1; i < segments; i++) + { + draft.Add(Triangle(vertices[0], vertices[i], vertices[i + 1])); + } + draft.Add(Triangle(vertices[0], vertices[vertices.Length - 1], vertices[1])); + return draft; + } + + public static MeshDraft BaselessPyramid(Vector3 apex, List ring) + { + var draft = new MeshDraft {name = "BaselessPyramid"}; + for (var i = 0; i < ring.Count - 1; i++) + { + draft.Add(Triangle(apex, ring[i], ring[i + 1])); + } + draft.Add(Triangle(apex, ring[ring.Count - 1], ring[0])); + return draft; + } + + public static MeshDraft Band(List lowerRing, List upperRing) + { + var draft = new MeshDraft {name = "Band"}; + if (lowerRing.Count < 3 || upperRing.Count < 3) + { + Debug.LogError("Array sizes must be greater than 2"); + return draft; + } + if (lowerRing.Count != upperRing.Count) + { + Debug.LogError("Array sizes must be equal"); + return draft; + } + + draft.vertices.AddRange(lowerRing); + draft.vertices.AddRange(upperRing); + + var lowerNormals = new List(); + var upperNormals = new List(); + var lowerUv = new List(); + var upperUv = new List(); + int i0, i1, i2, i3; + Vector3 v0, v1, v2, v3; + for (int i = 0; i < lowerRing.Count - 1; i++) + { + i0 = i; + i1 = i + lowerRing.Count; + i2 = i + 1; + i3 = i + 1 + lowerRing.Count; + v0 = draft.vertices[i0]; + v1 = draft.vertices[i1]; + v2 = draft.vertices[i2]; + v3 = draft.vertices[i3]; + draft.triangles.AddRange(new[] {i0, i1, i2}); + draft.triangles.AddRange(new[] {i2, i1, i3}); + + lowerNormals.Add(Vector3.Cross(v1 - v0, v2 - v0).normalized); + upperNormals.Add(Vector3.Cross(v3 - v1, v0 - v1).normalized); + + var u = (float) i/(lowerRing.Count - 1); + lowerUv.Add(new Vector2(u, 0)); + upperUv.Add(new Vector2(u, 1)); + } + + i0 = lowerRing.Count - 1; + i1 = lowerRing.Count*2 - 1; + i2 = 0; + i3 = lowerRing.Count; + v0 = draft.vertices[i0]; + v1 = draft.vertices[i1]; + v2 = draft.vertices[i2]; + v3 = draft.vertices[i3]; + draft.triangles.AddRange(new[] {i0, i1, i2}); + draft.triangles.AddRange(new[] {i2, i1, i3}); + + lowerNormals.Add(Vector3.Cross(v1 - v0, v2 - v0).normalized); + upperNormals.Add(Vector3.Cross(v3 - v1, v0 - v1).normalized); + draft.normals.AddRange(lowerNormals); + draft.normals.AddRange(upperNormals); + + lowerUv.Add(new Vector2(1, 0)); + upperUv.Add(new Vector2(1, 1)); + draft.uv.AddRange(lowerUv); + draft.uv.AddRange(upperUv); + + return draft; + } + + public static MeshDraft FlatBand(List lowerRing, List upperRing, bool closed = true) + { + var draft = new MeshDraft {name = "Flat band"}; + if (lowerRing.Count < 3 || upperRing.Count < 3) + { + Debug.LogError("Array sizes must be greater than 2"); + return draft; + } + if (lowerRing.Count != upperRing.Count) + { + Debug.LogError("Array sizes must be equal"); + return draft; + } + + Vector3 v0, v1, v2, v3; + for (int i = 0; i < lowerRing.Count - 1; i++) + { + v0 = lowerRing[i]; + v1 = upperRing[i]; + v2 = lowerRing[i + 1]; + v3 = upperRing[i + 1]; + draft.Add(Triangle(v0, v1, v2)); + draft.Add(Triangle(v2, v1, v3)); + } + + if (closed) + { + v0 = lowerRing[lowerRing.Count - 1]; + v1 = upperRing[upperRing.Count - 1]; + v2 = lowerRing[0]; + v3 = upperRing[0]; + draft.Add(Triangle(v0, v1, v2)); + draft.Add(Triangle(v2, v1, v3)); + } + + return draft; + } + + #endregion Mesh parts + + #region Platonic solids + + public static MeshDraft Tetrahedron(float radius) + { + const float tetrahedralAngle = -19.471220333f; + const float segmentAngle = 120; + float currentAngle = 0; + + var vertices = new List(4) {new Vector3(0, radius, 0)}; + for (var i = 1; i < 4; i++) + { + vertices.Add(PTUtils.PointOnSphere(radius, currentAngle, tetrahedralAngle)); + currentAngle += segmentAngle; + } + var draft = Triangle(vertices[0], vertices[1], vertices[2]); + draft.Add(Triangle(vertices[1], vertices[3], vertices[2])); + draft.Add(Triangle(vertices[0], vertices[2], vertices[3])); + draft.Add(Triangle(vertices[0], vertices[3], vertices[1])); + draft.name = "Tetrahedron"; + return draft; + } + + public static MeshDraft Cube(float side) + { + var draft = Hexahedron(side, side, side); + draft.name = "Cube"; + return draft; + } + + public static MeshDraft Hexahedron(float width, float length, float height) + { + return Hexahedron(Vector3.right*width, Vector3.forward*length, Vector3.up*height); + } + + public static MeshDraft Hexahedron(Vector3 width, Vector3 length, Vector3 height) + { + Vector3 corner0 = -width/2 - length/2 - height/2; + Vector3 corner1 = width/2 + length/2 + height/2; + + var draft = Quad(corner0, length, width); + draft.Add(Quad(corner0, width, height)); + draft.Add(Quad(corner0, height, length)); + draft.Add(Quad(corner1, -width, -length)); + draft.Add(Quad(corner1, -height, -width)); + draft.Add(Quad(corner1, -length, -height)); + draft.name = "Hexahedron"; + return draft; + } + + public static MeshDraft Octahedron(float radius) + { + var draft = BiPyramid(radius, 4, radius); + draft.name = "Octahedron"; + return draft; + } + + public static MeshDraft Dodecahedron(float radius) + { + const float magicAngle1 = 52.62263590f; + const float magicAngle2 = 10.81231754f; + const float segmentAngle = 72; + float currentAngle = 0; + var lowerCap = new List(); + var lowerRing = new List(); + for (var i = 0; i < 5; i++) + { + lowerCap.Add(PTUtils.PointOnSphere(radius, currentAngle, -magicAngle1)); + lowerRing.Add(PTUtils.PointOnSphere(radius, currentAngle, -magicAngle2)); + currentAngle -= segmentAngle; + } + + currentAngle = -segmentAngle/2; + var upperCap = new List(); + var upperRing = new List(); + for (var i = 0; i < 5; i++) + { + upperCap.Add(PTUtils.PointOnSphere(radius, currentAngle, magicAngle1)); + upperRing.Add(PTUtils.PointOnSphere(radius, currentAngle, magicAngle2)); + currentAngle -= segmentAngle; + } + + var draft = TriangleFan(lowerCap); + draft.Add(FlatBand(lowerCap, lowerRing)); + draft.Add(FlatBand(lowerRing, upperRing)); + draft.Add(FlatBand(upperRing, upperCap)); + upperCap.Reverse(); + draft.Add(TriangleFan(upperCap)); + draft.name = "Dodecahedron"; + return draft; + } + + public static MeshDraft Icosahedron(float radius) + { + const float magicAngle = 26.56505f; + const float segmentAngle = 72; + float currentAngle = 0; + + var upperRing = new List(5); + for (var i = 0; i < 5; i++) + { + upperRing.Add(PTUtils.PointOnSphere(radius, currentAngle, magicAngle)); + currentAngle -= segmentAngle; + } + + currentAngle = segmentAngle/2; + var lowerRing = new List(5); + for (var i = 0; i < 5; i++) + { + lowerRing.Add(PTUtils.PointOnSphere(radius, currentAngle, -magicAngle)); + currentAngle -= segmentAngle; + } + + var draft = BaselessPyramid(new Vector3(0, -radius, 0), lowerRing); + draft.Add(FlatBand(lowerRing, upperRing)); + upperRing.Reverse(); + draft.Add(BaselessPyramid(new Vector3(0, radius, 0), upperRing)); + draft.name = "Icosahedron"; + return draft; + } + + #endregion Platonic solids + + public static MeshDraft Plane(float xSize = 1, float zSize = 1, int xSegments = 1, int zSegments = 1) + { + float xStep = xSize/xSegments; + float zStep = zSize/zSegments; + var vertexCount = (xSegments + 1)*(zSegments + 1); + var draft = new MeshDraft + { + name = "Plane", + vertices = new List(vertexCount), + triangles = new List(xSegments*zSegments*6), + normals = new List(vertexCount), + uv = new List(vertexCount) + }; + for (int z = 0; z <= zSegments; z++) + { + for (int x = 0; x <= xSegments; x++) + { + draft.vertices.Add(new Vector3(x*xStep, 0f, z*zStep)); + draft.normals.Add(Vector3.up); + draft.uv.Add(new Vector2((float) x/xSegments, (float) z/zSegments)); + } + } + + int i = 0; + for (int z = 0; z < zSegments; z++) + { + for (int x = 0; x < xSegments; x++) + { + draft.triangles.Add(i); + draft.triangles.Add(i + xSegments + 1); + draft.triangles.Add(i + 1); + draft.triangles.Add(i + 1); + draft.triangles.Add(i + xSegments + 1); + draft.triangles.Add(i + xSegments + 2); + i++; + } + i++; + } + return draft; + } + + public static MeshDraft Pyramid(float radius, int segments, float heignt, bool inverted = false) + { + var draft = BaselessPyramid(radius, segments, heignt, inverted); + var vertices = new List(segments); + for (int i = draft.vertices.Count - 2; i >= 0; i -= 3) + { + vertices.Add(draft.vertices[i]); + } + draft.Add(TriangleFan(vertices)); + draft.name = "Pyramid"; + return draft; + } + + public static MeshDraft BiPyramid(float radius, int segments, float heignt) + { + var draft = BaselessPyramid(radius, segments, heignt); + draft.Add(BaselessPyramid(radius, segments, heignt, true)); + return draft; + } + + public static MeshDraft Prism(float radius, int segments, float heignt) + { + float segmentAngle = 360f/segments; + float currentAngle = 0; + + var lowerRing = new List(segments); + var upperRing = new List(segments); + for (var i = 0; i < segments; i++) + { + var point = PTUtils.PointOnCircle3XZ(radius, currentAngle); + lowerRing.Add(point - Vector3.up*heignt/2); + upperRing.Add(point + Vector3.up*heignt/2); + currentAngle -= segmentAngle; + } + + var draft = TriangleFan(lowerRing); + draft.Add(FlatBand(lowerRing, upperRing)); + upperRing.Reverse(); + draft.Add(TriangleFan(upperRing)); + draft.name = "Prism"; + return draft; + } + + public static MeshDraft Cylinder(float radius, int segments, float heignt) + { + float segmentAngle = 360f/segments; + float currentAngle = 0; + + var lowerRing = new List(segments); + var upperRing = new List(segments); + for (var i = 0; i < segments; i++) + { + var point = PTUtils.PointOnCircle3XZ(radius, currentAngle); + lowerRing.Add(point - Vector3.up*heignt/2); + upperRing.Add(point + Vector3.up*heignt/2); + currentAngle -= segmentAngle; + } + + var draft = TriangleFan(lowerRing); + draft.Add(Band(lowerRing, upperRing)); + upperRing.Reverse(); + draft.Add(TriangleFan(upperRing)); + draft.name = "Cylinder"; + return draft; + } + + public static MeshDraft FlatSphere(float radius, int horizontalSegments, int verticalSegments) + { + var draft = FlatSpheroid(radius, radius, horizontalSegments, verticalSegments); + draft.name = "Flat sphere"; + return draft; + } + + public static MeshDraft FlatSpheroid(float radius, float height, int horizontalSegments, int verticalSegments) + { + var draft = FlatRevolutionSurface(PTUtils.PointOnSpheroid, radius, height, horizontalSegments, + verticalSegments); + draft.name = "Flat spheroid"; + return draft; + } + + public static MeshDraft FlatTeardrop(float radius, float height, int horizontalSegments, int verticalSegments) + { + var draft = FlatRevolutionSurface(PTUtils.PointOnTeardrop, radius, height, horizontalSegments, + verticalSegments); + draft.name = "Flat teardrop"; + return draft; + } + + public static MeshDraft FlatRevolutionSurface( + Func surfaceFunction, + float radius, + float height, + int horizontalSegments, + int verticalSegments) + { + float horizontalSegmentAngle = 360f/horizontalSegments; + float verticalSegmentAngle = 180f/verticalSegments; + float currentVerticalAngle = -90; + + var rings = new List>(verticalSegments); + for (int i = 0; i <= verticalSegments; i++) + { + float currentHorizontalAngle = 0f; + var ring = new List(horizontalSegments); + for (int j = 0; j < horizontalSegments; j++) + { + ring.Add(surfaceFunction(radius, height, currentHorizontalAngle, currentVerticalAngle)); + currentHorizontalAngle -= horizontalSegmentAngle; + } + rings.Add(ring); + currentVerticalAngle += verticalSegmentAngle; + } + + var draft = new MeshDraft {name = "Flat revolution surface"}; + for (int i = 0; i < rings.Count - 1; i++) + { + draft.Add(FlatBand(rings[i], rings[i + 1])); + } + return draft; + } + + public static MeshDraft Sphere(float radius, int horizontalSegments, int verticalSegments) + { + var draft = Spheroid(radius, radius, horizontalSegments, verticalSegments); + draft.name = "Sphere"; + return draft; + } + + public static MeshDraft Spheroid(float radius, float height, int horizontalSegments, int verticalSegments) + { + var draft = RevolutionSurface(PTUtils.PointOnSpheroid, radius, height, horizontalSegments, verticalSegments); + draft.name = "Spheroid"; + return draft; + } + + public static MeshDraft Teardrop(float radius, float height, int horizontalSegments, int verticalSegments) + { + var draft = RevolutionSurface(PTUtils.PointOnTeardrop, radius, height, horizontalSegments, + verticalSegments); + draft.name = "Teardrop"; + return draft; + } + + public static MeshDraft RevolutionSurface( + Func surfaceFunction, + float radius, + float height, + int horizontalSegments, + int verticalSegments) + { + var draft = new MeshDraft {name = "Revolution surface"}; + + float horizontalSegmentAngle = 360f/horizontalSegments; + float verticalSegmentAngle = 180f/verticalSegments; + float currentVerticalAngle = -90; + + for (int ring = 0; ring <= verticalSegments; ring++) + { + float currentHorizontalAngle = 0f; + for (int i = 0; i < horizontalSegments; i++) + { + Vector3 point = surfaceFunction(radius, height, currentHorizontalAngle, currentVerticalAngle); + draft.vertices.Add(point); + draft.normals.Add(point.normalized); + draft.uv.Add(new Vector2((float) i/horizontalSegments, (float) ring/verticalSegments)); + currentHorizontalAngle -= horizontalSegmentAngle; + } + currentVerticalAngle += verticalSegmentAngle; + } + + for (int ring = 0; ring < verticalSegments; ring++) + { + int i0, i1, i2, i3; + for (int i = 0; i < horizontalSegments - 1; i++) + { + i0 = ring*horizontalSegments + i; + i1 = (ring + 1)*horizontalSegments + i; + i2 = ring*horizontalSegments + i + 1; + i3 = (ring + 1)*horizontalSegments + i + 1; + + draft.triangles.Add(i0); + draft.triangles.Add(i1); + draft.triangles.Add(i2); + + draft.triangles.Add(i2); + draft.triangles.Add(i1); + draft.triangles.Add(i3); + } + + i0 = (ring + 1)*horizontalSegments - 1; + i1 = (ring + 2)*horizontalSegments - 1; + i2 = ring*horizontalSegments; + i3 = (ring + 1)*horizontalSegments; + + draft.triangles.Add(i0); + draft.triangles.Add(i1); + draft.triangles.Add(i2); + + draft.triangles.Add(i2); + draft.triangles.Add(i1); + draft.triangles.Add(i3); + } + return draft; + } + + /// + /// Constructs partial box with specified faces + /// + public static MeshDraft PartialBox(Vector3 width, Vector3 length, Vector3 height, Directions parts) + { + Vector3 corner0 = -width/2 - length/2 - height/2; + Vector3 corner1 = width/2 + length/2 + height/2; + + var draft = new MeshDraft {name = "Hexahedron"}; + if ((parts & Directions.Left) == Directions.Left) + { + draft.Add(Quad(corner0, height, length)); + } + if ((parts & Directions.Right) == Directions.Right) + { + draft.Add(Quad(corner1, -length, -height)); + } + if ((parts & Directions.Down) == Directions.Down) + { + draft.Add(Quad(corner0, length, width)); + } + if ((parts & Directions.Up) == Directions.Up) + { + draft.Add(Quad(corner1, -width, -length)); + } + if ((parts & Directions.Back) == Directions.Back) + { + draft.Add(Quad(corner0, width, height)); + } + if ((parts & Directions.Forward) == Directions.Forward) + { + draft.Add(Quad(corner1, -height, -width)); + } + return draft; + } + } +} \ No newline at end of file diff --git a/Assets/Packages/ProceduralToolkit/MeshDraftPrimitives.cs.meta b/Assets/Packages/ProceduralToolkit/MeshDraftPrimitives.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..77285284a1a34a145d99abb8b5308dac7fe0f919 --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/MeshDraftPrimitives.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 4643fbf3b267d2c41b53e85ba52e7efa +timeCreated: 1443300540 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Packages/ProceduralToolkit/MeshE.cs b/Assets/Packages/ProceduralToolkit/MeshE.cs new file mode 100644 index 0000000000000000000000000000000000000000..d9251fe8101231e97e43ec99dbaeb5382a4bf36c --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/MeshE.cs @@ -0,0 +1,209 @@ +using System; +using System.Collections.Generic; +using UnityEngine; + +namespace ProceduralToolkit +{ + /// + /// Mesh extensions and constructors for primitives + /// + public static partial class MeshE + { + /// + /// Moves mesh vertices by + /// + public static void Move(this Mesh mesh, Vector3 vector) + { + if (mesh == null) + { + throw new ArgumentNullException("mesh"); + } + var vertices = mesh.vertices; + for (int i = 0; i < vertices.Length; i++) + { + vertices[i] += vector; + } + mesh.vertices = vertices; + } + + /// + /// Rotates mesh vertices by + /// + public static void Rotate(this Mesh mesh, Quaternion rotation) + { + if (mesh == null) + { + throw new ArgumentNullException("mesh"); + } + var vertices = mesh.vertices; + var normals = mesh.normals; + for (int i = 0; i < vertices.Length; i++) + { + vertices[i] = rotation*vertices[i]; + normals[i] = rotation*normals[i]; + } + mesh.vertices = vertices; + mesh.normals = normals; + } + + /// + /// Scales mesh vertices uniformly by + /// + public static void Scale(this Mesh mesh, float scale) + { + if (mesh == null) + { + throw new ArgumentNullException("mesh"); + } + var vertices = mesh.vertices; + for (int i = 0; i < vertices.Length; i++) + { + vertices[i] *= scale; + } + mesh.vertices = vertices; + } + + /// + /// Scales mesh vertices non-uniformly by + /// + public static void Scale(this Mesh mesh, Vector3 scale) + { + if (mesh == null) + { + throw new ArgumentNullException("mesh"); + } + var vertices = mesh.vertices; + var normals = mesh.normals; + for (int i = 0; i < vertices.Length; i++) + { + vertices[i] = Vector3.Scale(vertices[i], scale); + normals[i] = Vector3.Scale(normals[i], scale).normalized; + } + mesh.vertices = vertices; + mesh.normals = normals; + } + + /// + /// Paints mesh vertices with + /// + public static void Paint(this Mesh mesh, Color color) + { + if (mesh == null) + { + throw new ArgumentNullException("mesh"); + } + var colors = new Color[mesh.vertexCount]; + for (int i = 0; i < mesh.vertexCount; i++) + { + colors[i] = color; + } + mesh.colors = colors; + } + + /// + /// Flips mesh faces + /// + public static void FlipFaces(this Mesh mesh) + { + if (mesh == null) + { + throw new ArgumentNullException("mesh"); + } + mesh.FlipTriangles(); + mesh.FlipNormals(); + } + + /// + /// Reverses winding order of mesh triangles + /// + public static void FlipTriangles(this Mesh mesh) + { + if (mesh == null) + { + throw new ArgumentNullException("mesh"); + } + for (int i = 0; i < mesh.subMeshCount; i++) + { + var triangles = mesh.GetTriangles(i); + for (int j = 0; j < triangles.Length; j += 3) + { + PTUtils.Swap(ref triangles[j], ref triangles[j + 1]); + } + mesh.SetTriangles(triangles, i); + } + } + + /// + /// Reverses direction of mesh normals + /// + public static void FlipNormals(this Mesh mesh) + { + if (mesh == null) + { + throw new ArgumentNullException("mesh"); + } + var normals = mesh.normals; + for (int i = 0; i < normals.Length; i++) + { + normals[i] = -normals[i]; + } + mesh.normals = normals; + } + + /// + /// Flips UV map horizontally in selected + /// + public static void FlipUVHorizontally(this Mesh mesh, int channel = 0) + { + if (mesh == null) + { + throw new ArgumentNullException("mesh"); + } + var list = new List(); + mesh.GetUVs(channel, list); + for (var i = 0; i < list.Count; i++) + { + list[i] = new Vector2(1 - list[i].x, list[i].y); + } + mesh.SetUVs(channel, list); + } + + /// + /// Flips UV map vertically in selected + /// + public static void FlipUVVertically(this Mesh mesh, int channel = 0) + { + if (mesh == null) + { + throw new ArgumentNullException("mesh"); + } + var list = new List(); + mesh.GetUVs(channel, list); + for (var i = 0; i < list.Count; i++) + { + list[i] = new Vector2(list[i].x, 1 - list[i].y); + } + mesh.SetUVs(channel, list); + } + + /// + /// Projects vertices on a sphere with given and , recalculates normals + /// + public static void Spherify(this Mesh mesh, float radius, Vector3 center = default(Vector3)) + { + if (mesh == null) + { + throw new ArgumentNullException("mesh"); + } + var vertices = mesh.vertices; + var normals = mesh.normals; + for (var i = 0; i < vertices.Length; i++) + { + normals[i] = (vertices[i] - center).normalized; + vertices[i] = normals[i]*radius; + } + mesh.vertices = vertices; + mesh.normals = normals; + } + } +} \ No newline at end of file diff --git a/Assets/Packages/ProceduralToolkit/MeshE.cs.meta b/Assets/Packages/ProceduralToolkit/MeshE.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..2f813aa7cb641297641fa697d7bea241f4c21e10 --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/MeshE.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: a9cb4cd83e74e644e99b36a807b5ef92 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/Packages/ProceduralToolkit/MeshPrimitives.cs b/Assets/Packages/ProceduralToolkit/MeshPrimitives.cs new file mode 100644 index 0000000000000000000000000000000000000000..9dcf1e5d343ab8c87ca788c6beaf5cf31d8a8b6a --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/MeshPrimitives.cs @@ -0,0 +1,150 @@ +using System.Collections.Generic; +using UnityEngine; + +namespace ProceduralToolkit +{ + public static partial class MeshE + { + #region Mesh parts + + public static Mesh Triangle(Vector3 vertex0, Vector3 vertex1, Vector3 vertex2) + { + var normal = Vector3.Cross((vertex1 - vertex0), (vertex2 - vertex0)).normalized; + return new Mesh + { + vertices = new[] {vertex0, vertex1, vertex2}, + normals = new[] {normal, normal, normal}, + uv = new[] {new Vector2(0, 0), new Vector2(0, 1), new Vector2(1, 1)}, + triangles = new[] {0, 1, 2}, + name = "Triangle" + }; + } + + public static Mesh Quad(Vector3 origin, Vector3 width, Vector3 length) + { + var normal = Vector3.Cross(length, width).normalized; + return new Mesh + { + vertices = new[] {origin, origin + length, origin + length + width, origin + width}, + normals = new[] {normal, normal, normal, normal}, + uv = new[] {new Vector2(0, 0), new Vector2(0, 1), new Vector2(1, 1), new Vector2(1, 0)}, + triangles = new[] {0, 1, 2, 0, 2, 3}, + name = "Quad" + }; + } + + public static Mesh Quad(Vector3 vertex0, Vector3 vertex1, Vector3 vertex2, Vector3 vertex3) + { + var normal = Vector3.Cross((vertex1 - vertex0), (vertex2 - vertex0)).normalized; + return new Mesh + { + vertices = new[] {vertex0, vertex1, vertex2, vertex3}, + normals = new[] {normal, normal, normal, normal}, + uv = new[] {new Vector2(0, 0), new Vector2(0, 1), new Vector2(1, 1), new Vector2(1, 0)}, + triangles = new[] {0, 1, 2, 0, 2, 3}, + name = "Quad" + }; + } + + public static Mesh TriangleFan(List vertices) + { + return MeshDraft.TriangleFan(vertices).ToMesh(); + } + + public static Mesh TriangleStrip(List vertices) + { + return MeshDraft.TriangleStrip(vertices).ToMesh(); + } + + #endregion Mesh parts + + #region Platonic solids + + public static Mesh Tetrahedron(float radius) + { + return MeshDraft.Tetrahedron(radius).ToMesh(); + } + + public static Mesh Cube(float side) + { + return MeshDraft.Cube(side).ToMesh(); + } + + public static Mesh Hexahedron(float width, float length, float height) + { + return MeshDraft.Hexahedron(width, length, height).ToMesh(); + } + + public static Mesh Hexahedron(Vector3 width, Vector3 length, Vector3 height) + { + return MeshDraft.Hexahedron(width, length, height).ToMesh(); + } + + public static Mesh Octahedron(float radius) + { + return MeshDraft.Octahedron(radius).ToMesh(); + } + + public static Mesh Dodecahedron(float radius) + { + return MeshDraft.Dodecahedron(radius).ToMesh(); + } + + public static Mesh Icosahedron(float radius) + { + return MeshDraft.Icosahedron(radius).ToMesh(); + } + + #endregion Platonic solids + + public static Mesh Plane(float xSize = 1, float zSize = 1, int xSegments = 1, int zSegments = 1) + { + return MeshDraft.Plane(xSize, zSize, xSegments, zSegments).ToMesh(); + } + + public static Mesh Pyramid(float radius, int segments, float height, bool inverted = false) + { + return MeshDraft.Pyramid(radius, segments, height, inverted).ToMesh(); + } + + public static Mesh Prism(float radius, int segments, float height) + { + return MeshDraft.Prism(radius, segments, height).ToMesh(); + } + + public static Mesh Cylinder(float radius, int segments, float height) + { + return MeshDraft.Cylinder(radius, segments, height).ToMesh(); + } + + public static Mesh FlatSphere(float radius, int horizontalSegments, int verticalSegments) + { + return MeshDraft.FlatSphere(radius, horizontalSegments, verticalSegments).ToMesh(); + } + + public static Mesh Sphere(float radius, int horizontalSegments, int verticalSegments) + { + return MeshDraft.Sphere(radius, horizontalSegments, verticalSegments).ToMesh(); + } + + public static Mesh FlatSpheroid(float radius, float height, int horizontalSegments, int verticalSegments) + { + return MeshDraft.FlatSpheroid(radius, height, horizontalSegments, verticalSegments).ToMesh(); + } + + public static Mesh Spheroid(float radius, float height, int horizontalSegments, int verticalSegments) + { + return MeshDraft.Spheroid(radius, height, horizontalSegments, verticalSegments).ToMesh(); + } + + public static Mesh FlatTeardrop(float radius, float height, int horizontalSegments, int verticalSegments) + { + return MeshDraft.FlatTeardrop(radius, height, horizontalSegments, verticalSegments).ToMesh(); + } + + public static Mesh Teardrop(float radius, float height, int horizontalSegments, int verticalSegments) + { + return MeshDraft.Teardrop(radius, height, horizontalSegments, verticalSegments).ToMesh(); + } + } +} \ No newline at end of file diff --git a/Assets/Packages/ProceduralToolkit/MeshPrimitives.cs.meta b/Assets/Packages/ProceduralToolkit/MeshPrimitives.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..8b108bbb7c35c009f0117bbb9def186ef1f9c807 --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/MeshPrimitives.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 902d0aa981df7da4fad64f3d63669267 +timeCreated: 1447092306 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Packages/ProceduralToolkit/PTUtils.cs b/Assets/Packages/ProceduralToolkit/PTUtils.cs new file mode 100644 index 0000000000000000000000000000000000000000..2acd7d9ef4c364ff6341f313a1f8c0e9d40bb7cc --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/PTUtils.cs @@ -0,0 +1,412 @@ +using System.Collections.Generic; +using UnityEngine; + +namespace ProceduralToolkit +{ + /// + /// Useful utility methods + /// + public static class PTUtils + { + /// + /// Lowercase letters from a to z + /// + public const string lowercase = "abcdefghijklmnopqrstuvwxyz"; + + /// + /// Uppercase letters from A to Z + /// + public const string uppercase = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; + + /// + /// Digits from zero to nine + /// + public const string digits = "0123456789"; + + /// + /// The concatenation of the strings and + /// + public const string letters = lowercase + uppercase; + + /// + /// The concatenation of the strings and + /// + public const string alphanumerics = letters + digits; + + /// + /// Returns point on circle in the XY plane + /// + /// Circle radius + /// Angle in degrees + public static Vector2 PointOnCircle2(float radius, float angle) + { + float angleInRadians = angle*Mathf.Deg2Rad; + return new Vector2(radius*Mathf.Sin(angleInRadians), radius*Mathf.Cos(angleInRadians)); + } + + /// + /// Returns list of points on circle in the XY plane + /// + /// Circle radius + /// Number of circle segments + public static List PointsOnCircle2(float radius, int segments) + { + float segmentAngle = 360f/segments; + float currentAngle = 0; + var ring = new List(segments); + for (var i = 0; i < segments; i++) + { + ring.Add(PointOnCircle2(radius, currentAngle)); + currentAngle += segmentAngle; + } + return ring; + } + + /// + /// Returns point on circle in the XY plane + /// + /// Circle radius + /// Angle in degrees + public static Vector3 PointOnCircle3XY(float radius, float angle) + { + float angleInRadians = angle*Mathf.Deg2Rad; + return new Vector3(radius*Mathf.Sin(angleInRadians), radius*Mathf.Cos(angleInRadians), 0); + } + + /// + /// Returns list of points on circle in the XY plane + /// + /// Circle radius + /// Number of circle segments + public static List PointsOnCircle3XY(float radius, int segments) + { + float segmentAngle = 360f/segments; + float currentAngle = 0; + var ring = new List(segments); + for (var i = 0; i < segments; i++) + { + ring.Add(PointOnCircle3XY(radius, currentAngle)); + currentAngle += segmentAngle; + } + return ring; + } + + /// + /// Returns point on circle in the XZ plane + /// + /// Circle radius + /// Angle in degrees + public static Vector3 PointOnCircle3XZ(float radius, float angle) + { + float angleInRadians = angle*Mathf.Deg2Rad; + return new Vector3(radius*Mathf.Sin(angleInRadians), 0, radius*Mathf.Cos(angleInRadians)); + } + + /// + /// Returns list of points on circle in the XZ plane + /// + /// Circle radius + /// Number of circle segments + public static List PointsOnCircle3XZ(float radius, int segments) + { + float segmentAngle = 360f/segments; + float currentAngle = 0; + var ring = new List(segments); + for (var i = 0; i < segments; i++) + { + ring.Add(PointOnCircle3XZ(radius, currentAngle)); + currentAngle += segmentAngle; + } + return ring; + } + + /// + /// Returns point on circle in the YZ plane + /// + /// Circle radius + /// Angle in degrees + public static Vector3 PointOnCircle3YZ(float radius, float angle) + { + float angleInRadians = angle*Mathf.Deg2Rad; + return new Vector3(0, radius*Mathf.Sin(angleInRadians), radius*Mathf.Cos(angleInRadians)); + } + + /// + /// Returns list of points on circle in the YZ plane + /// + /// Circle radius + /// Number of circle segments + public static List PointsOnCircle3YZ(float radius, int segments) + { + float segmentAngle = 360f/segments; + float currentAngle = 0; + var ring = new List(segments); + for (var i = 0; i < segments; i++) + { + ring.Add(PointOnCircle3YZ(radius, currentAngle)); + currentAngle += segmentAngle; + } + return ring; + } + + /// + /// Returns point on sphere in geographic coordinate system + /// + /// Sphere radius + /// Horizontal angle in degrees [0, 360] + /// Vertical angle in degrees [-90, 90] + public static Vector3 PointOnSphere(float radius, float horizontalAngle, float verticalAngle) + { + return PointOnSpheroid(radius, radius, horizontalAngle, verticalAngle); + } + + /// + /// Returns point on spheroid in geographic coordinate system + /// + /// Spheroid radius + /// Spheroid height + /// Horizontal angle in degrees [0, 360] + /// Vertical angle in degrees [-90, 90] + public static Vector3 PointOnSpheroid(float radius, float height, float horizontalAngle, float verticalAngle) + { + float horizontalRadians = horizontalAngle*Mathf.Deg2Rad; + float verticalRadians = verticalAngle*Mathf.Deg2Rad; + float cosVertical = Mathf.Cos(verticalRadians); + + return new Vector3( + x: radius*Mathf.Sin(horizontalRadians)*cosVertical, + y: height*Mathf.Sin(verticalRadians), + z: radius*Mathf.Cos(horizontalRadians)*cosVertical); + } + + public static Vector3 PointOnSphereOld(float radius, float longitude, float latitude) + { + return new Vector3(radius * Mathf.Sin(longitude) * Mathf.Cos(latitude), + radius * Mathf.Sin(latitude), + radius * Mathf.Cos(longitude) * Mathf.Cos(latitude)); + } + + /// + /// Returns a point on teardrop surface in geographic coordinate system + /// + /// Teardrop radius + /// Teardrop height + /// Horizontal angle in degrees [0, 360] + /// Vertical angle in degrees [-90, 90] + public static Vector3 PointOnTeardrop(float radius, float height, float horizontalAngle, float verticalAngle) + { + float horizontalRadians = horizontalAngle*Mathf.Deg2Rad; + float verticalRadians = verticalAngle*Mathf.Deg2Rad; + float sinVertical = Mathf.Sin(verticalRadians); + float teardrop = (1 - sinVertical)*Mathf.Cos(verticalRadians)/2; + + return new Vector3( + x: radius*Mathf.Sin(horizontalRadians)*teardrop, + y: height*sinVertical, + z: radius*Mathf.Cos(horizontalRadians)*teardrop); + } + + /// + /// Returns perp of vector + /// + /// + /// Hill, F. S. Jr. "The Pleasures of 'Perp Dot' Products." + /// Ch. II.5 in Graphics Gems IV (Ed. P. S. Heckbert). San Diego: Academic Press, pp. 138-148, 1994 + /// + public static Vector2 Perp(Vector2 vector) + { + return new Vector2(-vector.y, vector.x); + } + + /// + /// Returns perp of vector + /// + /// + /// Hill, F. S. Jr. "The Pleasures of 'Perp Dot' Products." + /// Ch. II.5 in Graphics Gems IV (Ed. P. S. Heckbert). San Diego: Academic Press, pp. 138-148, 1994 + /// + public static Vector2Int Perp(Vector2Int vector) + { + return new Vector2Int(-vector.y, vector.x); + } + + /// + /// Returns perp dot product of vectors + /// + /// + /// Hill, F. S. Jr. "The Pleasures of 'Perp Dot' Products." + /// Ch. II.5 in Graphics Gems IV (Ed. P. S. Heckbert). San Diego: Academic Press, pp. 138-148, 1994 + /// + public static float PerpDot(Vector2 a, Vector2 b) + { + return a.x*b.y - a.y*b.x; + } + + /// + /// Returns perp dot product of vectors + /// + /// + /// Hill, F. S. Jr. "The Pleasures of 'Perp Dot' Products." + /// Ch. II.5 in Graphics Gems IV (Ed. P. S. Heckbert). San Diego: Academic Press, pp. 138-148, 1994 + /// + public static int PerpDot(Vector2Int a, Vector2Int b) + { + return a.x*b.y - a.y*b.x; + } + + /// + /// Returns the signed angle in degrees [-180, 180] between from and to + /// + /// The angle extends round from this vector + /// The angle extends round to this vector + public static float SignedAngle(Vector2 from, Vector2 to) + { + return Mathf.Atan2(PerpDot(to, from), Vector2.Dot(to, from))*Mathf.Rad2Deg; + } + + /// + /// Returns the angle in degrees [0, 360] between from and to + /// + /// The angle extends round from this vector + /// The angle extends round to this vector + public static float Angle360(Vector2 from, Vector2 to) + { + float angle = SignedAngle(from, to); + if (angle < 0) + { + angle += 360; + } + return angle; + } + + /// + /// Returns the signed angle in degrees [-180, 180] between from and to + /// + /// The angle extends round from this vector + /// The angle extends round to this vector + /// Up direction of the clockwise axis + public static float SignedAngle(Vector3 from, Vector3 to, Vector3 normal) + { + return Mathf.Atan2( + Vector3.Dot(normal, Vector3.Cross(from, to)), + Vector3.Dot(from, to))*Mathf.Rad2Deg; + } + + /// + /// Calculates the linear parameter t that produces the interpolant value within the range [a, b]. + /// + public static Vector2 InverseLerp(Vector2 a, Vector2 b, Vector2 value) + { + return new Vector2( + Mathf.InverseLerp(a.x, b.x, value.x), + Mathf.InverseLerp(a.y, b.y, value.y)); + } + + /// + /// Calculates the linear parameter t that produces the interpolant value within the range [a, b]. + /// + public static Vector3 InverseLerp(Vector3 a, Vector3 b, Vector3 value) + { + return new Vector3( + Mathf.InverseLerp(a.x, b.x, value.x), + Mathf.InverseLerp(a.y, b.y, value.y), + Mathf.InverseLerp(a.z, b.z, value.z)); + } + + /// + /// Calculates the linear parameter t that produces the interpolant value within the range [a, b]. + /// + public static Vector4 InverseLerp(Vector4 a, Vector4 b, Vector4 value) + { + return new Vector4( + Mathf.InverseLerp(a.x, b.x, value.x), + Mathf.InverseLerp(a.y, b.y, value.y), + Mathf.InverseLerp(a.z, b.z, value.z), + Mathf.InverseLerp(a.w, b.w, value.w)); + } + + /// + /// Swaps values of and + /// + public static void Swap(ref T left, ref T right) + { + T temp = left; + left = right; + right = temp; + } + + /// + /// Knapsack problem solver for items with equal value + /// + /// Item identificator + /// + /// Set of items where key is item identificator and value is item weight + /// Maximum weight + /// Pre-filled knapsack + /// + /// Filled knapsack where values are number of items of type key. + /// Tends to overload knapsack: fills remainder with one smallest item. + /// + /// https://en.wikipedia.org/wiki/Knapsack_problem + /// + public static Dictionary Knapsack(Dictionary set, float capacity, + Dictionary knapsack = null) + { + var keys = new List(set.Keys); + // Sort keys by their weights in descending order + keys.Sort((a, b) => -set[a].CompareTo(set[b])); + + if (knapsack == null) + { + knapsack = new Dictionary(); + foreach (var key in keys) + { + knapsack[key] = 0; + } + } + return Knapsack(set, keys, capacity, knapsack, 0); + } + + private static Dictionary Knapsack(Dictionary set, List keys, float remainder, + Dictionary knapsack, int startIndex) + { + T smallestKey = keys[keys.Count - 1]; + if (remainder < set[smallestKey]) + { + knapsack[smallestKey] = 1; + return knapsack; + } + // Cycle through items and try to put them in knapsack + for (var i = startIndex; i < keys.Count; i++) + { + T key = keys[i]; + float weight = set[key]; + // Larger items won't fit, smaller items will fill as much space as they can + knapsack[key] += (int) (remainder/weight); + remainder %= weight; + } + if (remainder > 0) + { + // Throw out largest item and try again + for (var i = 0; i < keys.Count; i++) + { + T key = keys[i]; + if (knapsack[key] != 0) + { + // Already tried every combination, return as is + if (key.Equals(smallestKey)) + { + return knapsack; + } + knapsack[key]--; + remainder += set[key]; + startIndex = i + 1; + break; + } + } + knapsack = Knapsack(set, keys, remainder, knapsack, startIndex); + } + return knapsack; + } + } +} \ No newline at end of file diff --git a/Assets/Packages/ProceduralToolkit/PTUtils.cs.meta b/Assets/Packages/ProceduralToolkit/PTUtils.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..d361b3eb6ed29497f4ec5a3e0348f079608f0175 --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/PTUtils.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: efddd4d82fb664746a4d19098ececfde +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/Packages/ProceduralToolkit/README.md b/Assets/Packages/ProceduralToolkit/README.md new file mode 100644 index 0000000000000000000000000000000000000000..bb2451466bded06f2f13705566058301641dd6f8 --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/README.md @@ -0,0 +1,172 @@ +# Procedural Toolkit v0.1.9 + +Procedural Toolkit is a collection of instruments for development of procedural generation systems in Unity game engine. +It is free, open source and does not require a Unity Pro license. + +**Warning: This is a programming toolkit, editor support is limited.** + +[GitHub](https://github.com/Syomus/ProceduralToolkit) | +[Asset Store](https://www.assetstore.unity3d.com/#!/content/16508) | +[Issues](https://github.com/Syomus/ProceduralToolkit/issues) | +[Support email](mailto:proceduraltoolkit@syomus.com) + +## Installation instructions +Requires **Unity 5.4** or later. Tested on Windows, WebGL, Android and iOS. UnityScript interoperability is not supported. + +You can install Procedural Toolkit from any of the following sources: + +1. Import from the [Asset Store](https://www.assetstore.unity3d.com/#!/content/16508) +2. Download from [Releases page](https://github.com/Syomus/ProceduralToolkit/releases). Same packages as in the Asset Store. +3. Clone/download repository from [GitHub](https://github.com/Syomus/ProceduralToolkit). In this case you will have to create a subfolder for toolkit (e.g. `\Assets\ProceduralToolkit`). + +Folder containing example classes and scenes (`ProceduralToolkit\Examples`) can be safely removed. The same is true for `ProceduralToolkit\Shaders`, if you are not using examples. Removing `ProceduralToolkit\Editor` will leave you with code-only toolkit. + +After installation you can import ProceduralToolkit namespace and start building your own PCG systems: +```C# +using UnityEngine; +using ProceduralToolkit; + +public class Example : MonoBehaviour +{ + private void Update() + { + Debug.Log(string.Format("{0}", RandomE.colorHSV.ToHtmlStringRGB())); + } +} +``` + +## Classes +* ArrayE: Array extensions. +* ColorE: Color extensions, HTML colors. +* ColorHSV: Representation of color in HSV model. +* DebugE: Drawing methods similar to Debug. +* Directions: Enum with directions along three axes. +* Draw: Collection of drawing method-independent generic drawing algorithms. +* GizmosE: Drawing methods similar to Gizmos. +* GLE: Drawing wrappers over GL.Vertex which follow Gizmos convention. +* MeshDraft: Helper class for mesh generation. +* MeshDraftPrimitives: Constructors for MeshDraft primitives. +* MeshE: Mesh extensions. +* MeshPrimitives: Constructors for Mesh primitives. +* PTUtils: Various utility methods. +* RandomE: Value generators and extensions for collections. +* TextureE: Texture extensions and constructors. +* Vector2Int: Vector2 analogue with integer components. +* VectorE: Vector extensions. + +## Editor classes +* ProceduralToolkitMenu: Submenu with constructors for primitives at `GameObject > Procedural Toolkit` and about window at `Help > About Procedural Toolkit`. +* MeshFilterExtension: Mesh saving utility available at `MeshFilter context menu > Save Mesh`. + +## Examples +Resources folder contains prefabs used for UI. UI folder contains scripts for ui controls, including camera rotator. + +### BuildingGenerator + + +Procedural building generator. +* BuildingGenerator: Main generator class. Generates buildings based on input configuration. +* BuildingGeneratorConfigurator: Configurator for generator with UI and editor controls. +* BuildingGeneratorUtils: Helper class for generator. +* IFacadeLayout, IFacadePanel, FacadeLayout, HorizontalLayout, VerticalLayout: Interfaces and classes used in facade layout generation. +* ProceduralFacadePanel: Fully procedural facade panels for building generator. +* BuildingGeneratorConfiguratorEditor: Custom inspector for BuildingGeneratorConfigurator. + +### ChairGenerator + + +Procedural chair generator. +* ChairGenerator: Main generator class. Generates chairs based on input configuration. +* ChairGeneratorConfigurator: Configurator for generator with UI and editor controls. +* Armrests, Backs, Stretchers: Chair parts constructors. +* ChairGeneratorConfiguratorEditor: Custom inspector for ChairGeneratorConfigurator. + +### Boids + + +Single-mesh particle system with birds-like behaviour. +* BoidController: Generates animated mesh based on input configuration. +* BoidControllerConfigurator: Configurator for BoidController with UI controls. + +### LowPolyTerrainGenerator + + +Simple Perlin noise based low poly terrain generator. +* LowPolyTerrainGenerator: Main generator class. Generates terrain based on input configuration. +* LowPolyTerrainGeneratorConfigurator: Configurator for generator with UI and editor controls. +* LowPolyTerrainGeneratorConfiguratorEditor: Custom inspector for LowPolyTerrainGeneratorConfigurator. + +### CellularAutomaton + + +Generic cellular automaton for two-state rulesets. +* CellularAutomaton: Main generator class. Generates cellular automata based on input configuration. +* CellularAutomatonConfigurator: Configurator for generator with UI controls. +* Ruleset: Cellular automaton ruleset representation and static constructors. +* CellState: Enum for automaton cell states. + +### Mazes + + +Generic maze generator. +* MazeGenerator: Main generator class. Generates mazes on input configuration. +* MazeGeneratorConfigurator: Configurator for generator with UI controls. +* Maze: Maze graph representation. +* Cell: Maze graph cell. +* Edge: Maze graph edge. + +### Breakout + + +Breakout clone with procedurally generated levels. +* Breakout: Game engine and level generator. +* BreakoutConfigurator: Configurator for generator with UI controls. +* Brick: Disables game object on collision. + +### CharacterGenerator + + +Simple 2D character generator. Sprites made by Tess Young. +* CharacterGenerator: Generates a sprite set and a name for character. +* NameGenerator: Generates a random name from a large array of names. + +### Primitives + + +Demonstration of primitives +* Cylinder, Dodecahedron, FlatSphere, Hexahedron...: Mesh generators with exposed parameters in inspector. + +### Common classes +* SkyBoxGenerator: Skybox generator, assuming that scene uses gradient skybox shader, animates transitions to new parameters every few seconds. +* ButtonControl, SliderControl, TextControl, ToggleControl: UI controls for generators. +* CameraRotator: Orbiting camera controller. +* ConfiguratorBase: Base class for configurators. + +## Shaders +* Unlit, Diffuse, Specular and Standard Vertex Color: Textureless shaders which use color information from vertex attributes. +* Gradient Skybox: Simple gradient skybox. + +## License +``` +The MIT License (MIT) + +Copyright (c) Daniil Basmanov + +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. +``` \ No newline at end of file diff --git a/Assets/Packages/ProceduralToolkit/README.md.meta b/Assets/Packages/ProceduralToolkit/README.md.meta new file mode 100644 index 0000000000000000000000000000000000000000..e6969fcf1adebcdf3a23087834f6745e57918d30 --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/README.md.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: 76b441c7d05f6d747a37fe762d58f7bd +DefaultImporter: + userData: diff --git a/Assets/Packages/ProceduralToolkit/RandomE.cs b/Assets/Packages/ProceduralToolkit/RandomE.cs new file mode 100644 index 0000000000000000000000000000000000000000..9c744a2f522cdc6306dc478fe65357be3aa74d97 --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/RandomE.cs @@ -0,0 +1,481 @@ +using System; +using UnityEngine; +using System.Collections.Generic; +using System.Text; +using Random = UnityEngine.Random; + +namespace ProceduralToolkit +{ + /// + /// Class for generating random data. Contains extensions for arrays and other classes. + /// + public static class RandomE + { + #region Vectors + + /// + /// Returns a random point on a circle with radius 1 + /// + public static Vector2 onUnitCircle2 { get { return PTUtils.PointOnCircle2(1, Random.Range(0, 360f)); } } + + /// + /// Returns a random point on a circle with radius 1 + /// + public static Vector2 onUnitCircle3XY { get { return PTUtils.PointOnCircle3XY(1, Random.Range(0, 360f)); } } + + /// + /// Returns a random point on a circle with radius 1 + /// + public static Vector2 onUnitCircle3XZ { get { return PTUtils.PointOnCircle3XZ(1, Random.Range(0, 360f)); } } + + /// + /// Returns a random point on a circle with radius 1 + /// + public static Vector2 onUnitCircle3YZ { get { return PTUtils.PointOnCircle3YZ(1, Random.Range(0, 360f)); } } + + /// + /// Returns a random point inside a unit square + /// + public static Vector2 insideUnitSquare { get { return new Vector2(Random.value, Random.value); } } + + /// + /// Returns a random point on the perimeter of a unit square + /// + public static Vector2 onUnitSquare { get { return PointOnSquare(1, 1); } } + + /// + /// Returns a random point inside a unit cube + /// + public static Vector3 insideUnitCube { get { return new Vector3(Random.value, Random.value, Random.value); } } + + #endregion Vectors + + #region Colors + + /// + /// Returns a random color between black [inclusive] and white [inclusive] + /// + public static Color color { get { return new Color(Random.value, Random.value, Random.value); } } + + /// + /// Returns a color with random hue and maximum saturation and value in HSV model + /// + public static ColorHSV colorHSV { get { return new ColorHSV(Random.value, 1, 1); } } + + /// + /// Returns a gradient between two random colors + /// + public static Gradient gradient { get { return ColorE.Gradient(color, color); } } + + /// + /// Returns a gradient between two random HSV colors + /// + public static Gradient gradientHSV { get { return ColorE.Gradient(colorHSV, colorHSV); } } + + /// + /// Returns a color with random hue and given and + /// + public static ColorHSV ColorHue(float saturation, float value, float alpha = 1) + { + return new ColorHSV(Random.value, saturation, value, alpha); + } + + /// + /// Returns a color with random saturation and given and + /// + public static ColorHSV ColorSaturation(float hue, float value, float alpha = 1) + { + return new ColorHSV(hue, Random.value, value, alpha); + } + + /// + /// Returns a color with random value and given and + /// + public static ColorHSV ColorValue(float hue, float saturation, float alpha = 1) + { + return new ColorHSV(hue, saturation, Random.value, alpha); + } + + /// + /// Returns a analogous palette based on a color with random hue + /// + public static List AnalogousPalette( + float saturation = 1, + float value = 1, + float alpha = 1, + int count = 2, + bool withComplementary = false) + { + return ColorHue(saturation, value, alpha).GetAnalogousPalette(count, withComplementary); + } + + /// + /// Returns a triadic palette based on a color with random hue + /// + public static List TriadicPalette( + float saturation = 1, + float value = 1, + float alpha = 1, + bool withComplementary = false) + { + return ColorHue(saturation, value, alpha).GetTriadicPalette(withComplementary); + } + + /// + /// Returns a tetradic palette based on a color with random hue + /// + public static List TetradicPalette(float saturation = 1, float value = 1, float alpha = 1) + { + return ColorHue(saturation, value, alpha).GetTetradicPalette(); + } + + #endregion Colors + + #region Strings + + /// + /// Returns a random alphanumeric 8-character string + /// + public static string string8 { get { return PTUtils.alphanumerics.GetRandom(8); } } + + /// + /// Returns a random alphanumeric 16-character string + /// + public static string string16 { get { return PTUtils.alphanumerics.GetRandom(16); } } + + /// + /// Returns a random lowercase letter + /// + public static char lowercaseLetter { get { return PTUtils.lowercase.GetRandom(); } } + + /// + /// Returns a random uppercase letter + /// + public static char uppercaseLetter { get { return PTUtils.uppercase.GetRandom(); } } + + #endregion Strings + + /// + /// Returns a random element + /// + public static T GetRandom(this List items) + { + if (items == null) + { + throw new ArgumentNullException("items"); + } + if (items.Count == 0) + { + Debug.LogError("Empty array"); + return default(T); + } + return items[Random.Range(0, items.Count)]; + } + + /// + /// Returns a random element + /// + public static T GetRandom(this T[] items) + { + if (items == null) + { + throw new ArgumentNullException("items"); + } + if (items.Length == 0) + { + Debug.LogError("Empty array"); + return default(T); + } + return items[Random.Range(0, items.Length)]; + } + + /// + /// Returns a random element + /// + public static T GetRandom(T item1, T item2, params T[] items) + { + int index = Random.Range(0, items.Length + 2); + if (index == 0) + { + return item1; + } + if (index == 1) + { + return item2; + } + return items[index - 2]; + } + + /// + /// Returns a random value from dictionary + /// + public static TValue GetRandom(this Dictionary dictionary) + { + if (dictionary == null) + { + throw new ArgumentNullException("dictionary"); + } + var keys = dictionary.Keys; + if (keys.Count == 0) + { + Debug.LogError("Empty dictionary"); + return default(TValue); + } + return dictionary[new List(keys).GetRandom()]; + } + + /// + /// Returns a random element with chances for roll of each element based on + /// + /// Positive floats representing chances + public static T GetRandom(this List list, List weights) + { + if (list == null) + { + throw new ArgumentNullException("list"); + } + if (list.Count == 0) + { + Debug.LogError("Empty array"); + return default(T); + } + if (weights == null) + { + throw new ArgumentNullException("weights"); + } + if (weights.Count == 0) + { + Debug.LogError("Empty weights"); + return default(T); + } + if (list.Count != weights.Count) + { + Debug.LogError("Array sizes must be equal"); + return list.GetRandom(); + } + + if (list.Count == 1) + { + return list[0]; + } + + var cumulative = new List(weights); + for (int i = 1; i < cumulative.Count; i++) + { + cumulative[i] += cumulative[i - 1]; + } + + float random = Random.Range(0, cumulative[cumulative.Count - 1]); + int index = cumulative.FindIndex(a => a >= random); + if (index == -1) + { + Debug.LogError("Invalid weights"); + return list.GetRandom(); + } + return list[index]; + } + + /// + /// Returns a random character from string + /// + public static char GetRandom(this string chars) + { + if (string.IsNullOrEmpty(chars)) + { + Debug.LogError("Empty string"); + return default(char); + } + return chars[Random.Range(0, chars.Length)]; + } + + /// + /// Returns a random string consisting of characters from that string + /// + public static string GetRandom(this string chars, int length) + { + if (string.IsNullOrEmpty(chars)) + { + Debug.LogError("Empty string"); + return default(string); + } + var randomString = new StringBuilder(length); + for (int i = 0; i < length; i++) + { + randomString.Append(chars[Random.Range(0, chars.Length)]); + } + return randomString.ToString(); + } + + /// + /// Returns a random element and removes it from list + /// + public static T PopRandom(this List items) + { + if (items == null) + { + throw new ArgumentNullException("items"); + } + if (items.Count == 0) + { + Debug.LogError("Empty array"); + return default(T); + } + var index = Random.Range(0, items.Count); + var item = items[index]; + items.RemoveAt(index); + return item; + } + + /// + /// Fisher–Yates shuffle + /// + /// + /// https://en.wikipedia.org/wiki/Fisher–Yates_shuffle + /// + public static void Shuffle(this T[] array) + { + if (array == null) + { + throw new ArgumentNullException("array"); + } + for (int i = 0; i < array.Length; i++) + { + int j = Random.Range(i, array.Length); + T tmp = array[j]; + array[j] = array[i]; + array[i] = tmp; + } + } + + /// + /// Fisher–Yates shuffle + /// + /// + /// https://en.wikipedia.org/wiki/Fisher–Yates_shuffle + /// + public static void Shuffle(this List array) + { + if (array == null) + { + throw new ArgumentNullException("array"); + } + for (int i = 0; i < array.Count; i++) + { + int j = Random.Range(i, array.Count); + T tmp = array[j]; + array[j] = array[i]; + array[i] = tmp; + } + } + + /// + /// Returns true with probability from + /// + /// between 0.0 [inclusive] and 1.0 [inclusive] + public static bool Chance(float percent) + { + if (percent == 0) return false; + if (percent == 1) return true; + return Random.value < percent; + } + + /// + /// Returns a random point on the perimeter of a square with sides and + /// + public static Vector2 PointOnSquare(float a, float b) + { + float value = Random.value*(2*a + 2*b); + if (value < a) + { + return new Vector2(value, 0); + } + value -= a; + if (value < b) + { + return new Vector2(a, value); + } + value -= b; + if (value < a) + { + return new Vector2(value, b); + } + return new Vector2(0, value - a); + } + + /// + /// Returns a random point inside + /// + public static Vector3 PointInBounds(Bounds bounds) + { + return Range(bounds.min, bounds.max); + } + + /// + /// Returns a random vector between [inclusive] and [inclusive] + /// + public static Vector2 Range(Vector2 min, Vector2 max) + { + return new Vector2(Random.Range(min.x, max.x), Random.Range(min.y, max.y)); + } + + /// + /// Returns a random vector between [inclusive] and [inclusive] + /// + public static Vector3 Range(Vector3 min, Vector3 max) + { + return new Vector3(Random.Range(min.x, max.x), Random.Range(min.y, max.y), Random.Range(min.z, max.z)); + } + + /// + /// Returns a random vector between [inclusive] and [inclusive] + /// + public static Vector4 Range(Vector4 min, Vector4 max) + { + return new Vector4(Random.Range(min.x, max.x), Random.Range(min.y, max.y), Random.Range(min.z, max.z), + Random.Range(min.w, max.w)); + } + + /// + /// Returns a random float number between and [inclusive] and [inclusive]. + /// Ensures that there will be only specified amount of variants. + /// + public static float Range(float min, float max, int variants) + { + if (variants < 2) + { + Debug.LogError("Variants must be greater than one"); + variants = 2; + } + return Mathf.Lerp(min, max, Random.Range(0, variants)/(variants - 1f)); + } + + /// + /// Returns a random vector between and [inclusive] and [inclusive]. + /// Ensures that there will be only specified amount of variants. + /// + public static Vector2 Range(Vector2 min, Vector2 max, int variants) + { + return new Vector2(Range(min.x, max.x, variants), Range(min.y, max.y, variants)); + } + + /// + /// Returns a random vector between and [inclusive] and [inclusive]. + /// Ensures that there will be only specified amount of variants. + /// + public static Vector3 Range(Vector3 min, Vector3 max, int variants) + { + return new Vector3(Range(min.x, max.x, variants), Range(min.y, max.y, variants), + Range(min.z, max.z, variants)); + } + + /// + /// Returns a random vector between and [inclusive] and [inclusive]. + /// Ensures that there will be only specified amount of variants. + /// + public static Vector4 Range(Vector4 min, Vector4 max, int variants) + { + return new Vector4(Range(min.x, max.x, variants), Range(min.y, max.y, variants), + Range(min.z, max.z, variants), Range(min.w, max.w, variants)); + } + } +} \ No newline at end of file diff --git a/Assets/Packages/ProceduralToolkit/RandomE.cs.meta b/Assets/Packages/ProceduralToolkit/RandomE.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..4c39b48863b4e97b88bf3109b0b4a88e990bad3e --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/RandomE.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 389d8405ac8405546b0ecea11513bcb3 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/Packages/ProceduralToolkit/Shaders.meta b/Assets/Packages/ProceduralToolkit/Shaders.meta new file mode 100644 index 0000000000000000000000000000000000000000..5302846dab84e70c5eaf37ad499be1132f63e8a4 --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/Shaders.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 11df2e07ca9e90b43be582d787e1c5e1 +folderAsset: yes +DefaultImporter: + userData: diff --git a/Assets/Packages/ProceduralToolkit/Shaders/Debug.meta b/Assets/Packages/ProceduralToolkit/Shaders/Debug.meta new file mode 100644 index 0000000000000000000000000000000000000000..03608efb5312fa4e584c19269eba62bb33058362 --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/Shaders/Debug.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: cfe1aeb6faa278a4fba6c74b10443602 +folderAsset: yes +timeCreated: 1489937839 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Packages/ProceduralToolkit/Shaders/Debug/Debug Bitangents.shader b/Assets/Packages/ProceduralToolkit/Shaders/Debug/Debug Bitangents.shader new file mode 100644 index 0000000000000000000000000000000000000000..bdda2831db57ff39753c449bffec1fa97d270ed9 --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/Shaders/Debug/Debug Bitangents.shader @@ -0,0 +1,45 @@ +Shader "Procedural Toolkit/Debug/Binormals" +{ + SubShader + { + Pass + { + Fog { Mode Off } + CGPROGRAM + + #pragma vertex vert + #pragma fragment frag + #include "UnityCG.cginc" + + struct appdata + { + float4 position : POSITION; + float3 normal : NORMAL; + float4 tangent : TANGENT; + }; + + struct v2f + { + float4 position : SV_POSITION; + float4 color : COLOR; + }; + + v2f vert (appdata v) + { + v2f o; + o.position = UnityObjectToClipPos(v.position); + float3 binormal = cross(v.normal, v.tangent.xyz) * v.tangent.w; + o.color.rgb = binormal * 0.5 + 0.5; + o.color.a = 1; + return o; + } + + fixed4 frag (v2f i) : SV_Target + { + return i.color; + } + + ENDCG + } + } +} \ No newline at end of file diff --git a/Assets/Packages/ProceduralToolkit/Shaders/Debug/Debug Bitangents.shader.meta b/Assets/Packages/ProceduralToolkit/Shaders/Debug/Debug Bitangents.shader.meta new file mode 100644 index 0000000000000000000000000000000000000000..cdcb0b0ede5d55420164bde18a0c6bb8c8e229e2 --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/Shaders/Debug/Debug Bitangents.shader.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 7b125bb51660cb24da5d58eba53a543f +ShaderImporter: + defaultTextures: [] + userData: diff --git a/Assets/Packages/ProceduralToolkit/Shaders/Debug/Debug Normals.shader b/Assets/Packages/ProceduralToolkit/Shaders/Debug/Debug Normals.shader new file mode 100644 index 0000000000000000000000000000000000000000..e56b727be41c36cec6f57f0fb9f9e4fb91baf55b --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/Shaders/Debug/Debug Normals.shader @@ -0,0 +1,43 @@ +Shader "Procedural Toolkit/Debug/Normals" +{ + SubShader + { + Pass + { + Fog { Mode Off } + CGPROGRAM + + #pragma vertex vert + #pragma fragment frag + #include "UnityCG.cginc" + + struct appdata + { + float4 position : POSITION; + float3 normal : NORMAL; + }; + + struct v2f + { + float4 position : SV_POSITION; + fixed4 color : COLOR; + }; + + v2f vert (appdata v) + { + v2f o; + o.position = UnityObjectToClipPos(v.position); + o.color.rgb = v.normal * 0.5 + 0.5; + o.color.a = 1; + return o; + } + + fixed4 frag (v2f i) : SV_Target + { + return i.color; + } + + ENDCG + } + } +} \ No newline at end of file diff --git a/Assets/Packages/ProceduralToolkit/Shaders/Debug/Debug Normals.shader.meta b/Assets/Packages/ProceduralToolkit/Shaders/Debug/Debug Normals.shader.meta new file mode 100644 index 0000000000000000000000000000000000000000..c05dd803eb8d0d118c756c6e40148cee7674015a --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/Shaders/Debug/Debug Normals.shader.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: bec5a55c1d8cfb347b5eeab59c20493a +ShaderImporter: + defaultTextures: [] + userData: diff --git a/Assets/Packages/ProceduralToolkit/Shaders/Debug/Debug Tangents.shader b/Assets/Packages/ProceduralToolkit/Shaders/Debug/Debug Tangents.shader new file mode 100644 index 0000000000000000000000000000000000000000..f43904977928dfe72f8ba0dc7280d6cb33a1de3d --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/Shaders/Debug/Debug Tangents.shader @@ -0,0 +1,42 @@ +Shader "Procedural Toolkit/Debug/Tangents" +{ + SubShader + { + Pass + { + Fog { Mode Off } + CGPROGRAM + + #pragma vertex vert + #pragma fragment frag + #include "UnityCG.cginc" + + struct appdata + { + float4 position : POSITION; + float4 tangent : TANGENT; + }; + + struct v2f + { + float4 position : SV_POSITION; + fixed4 color : COLOR; + }; + + v2f vert (appdata v) + { + v2f o; + o.position = UnityObjectToClipPos(v.position); + o.color = v.tangent * 0.5 + 0.5; + return o; + } + + fixed4 frag (v2f i) : SV_Target + { + return i.color; + } + + ENDCG + } + } +} \ No newline at end of file diff --git a/Assets/Packages/ProceduralToolkit/Shaders/Debug/Debug Tangents.shader.meta b/Assets/Packages/ProceduralToolkit/Shaders/Debug/Debug Tangents.shader.meta new file mode 100644 index 0000000000000000000000000000000000000000..e01129c3000ea49ef8c1b19f5afe65b5852aeb53 --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/Shaders/Debug/Debug Tangents.shader.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 983d15af482c62944b1c3393d1dfa0e5 +ShaderImporter: + defaultTextures: [] + userData: diff --git a/Assets/Packages/ProceduralToolkit/Shaders/Debug/Debug UV1.shader b/Assets/Packages/ProceduralToolkit/Shaders/Debug/Debug UV1.shader new file mode 100644 index 0000000000000000000000000000000000000000..3eed3379815ba9d14d749af212d254afc92140c9 --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/Shaders/Debug/Debug UV1.shader @@ -0,0 +1,47 @@ +Shader "Procedural Toolkit/Debug/UV1" +{ + SubShader + { + Pass + { + Fog { Mode Off } + CGPROGRAM + + #pragma vertex vert + #pragma fragment frag + #include "UnityCG.cginc" + + struct appdata + { + float4 position : POSITION; + float2 uv : TEXCOORD0; + }; + + struct v2f + { + float4 position : SV_POSITION; + float2 uv : TEXCOORD0; + }; + + v2f vert (appdata v) + { + v2f o; + o.position = UnityObjectToClipPos(v.position); + o.uv = v.uv; + return o; + } + + fixed4 frag (v2f i) : SV_Target + { + half4 color = fixed4(frac(i.uv), 0, 0); + if (any(saturate(i.uv) - i.uv)) + { + color.b = 0.5; + } + return color; + } + + ENDCG + } + } +} \ No newline at end of file diff --git a/Assets/Packages/ProceduralToolkit/Shaders/Debug/Debug UV1.shader.meta b/Assets/Packages/ProceduralToolkit/Shaders/Debug/Debug UV1.shader.meta new file mode 100644 index 0000000000000000000000000000000000000000..9cc258d08d0a538d33a0630bbcc5442c89393015 --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/Shaders/Debug/Debug UV1.shader.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: c646f6a5a0f26c9488ccb28c32f621ac +ShaderImporter: + defaultTextures: [] + userData: diff --git a/Assets/Packages/ProceduralToolkit/Shaders/Debug/Debug UV2.shader b/Assets/Packages/ProceduralToolkit/Shaders/Debug/Debug UV2.shader new file mode 100644 index 0000000000000000000000000000000000000000..b68e8364eec347dcc2c6c47cbe8b33266bda9ee2 --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/Shaders/Debug/Debug UV2.shader @@ -0,0 +1,47 @@ +Shader "Procedural Toolkit/Debug/UV2" +{ + SubShader + { + Pass + { + Fog { Mode Off } + CGPROGRAM + + #pragma vertex vert + #pragma fragment frag + #include "UnityCG.cginc" + + struct appdata + { + float4 position : POSITION; + float2 uv : TEXCOORD1; + }; + + struct v2f + { + float4 position : SV_POSITION; + float2 uv : TEXCOORD0; + }; + + v2f vert (appdata v) + { + v2f o; + o.position = UnityObjectToClipPos(v.position); + o.uv = v.uv; + return o; + } + + fixed4 frag (v2f i) : SV_Target + { + half4 color = fixed4(frac(i.uv), 0, 0); + if (any(saturate(i.uv) - i.uv)) + { + color.b = 0.5; + } + return color; + } + + ENDCG + } + } +} \ No newline at end of file diff --git a/Assets/Packages/ProceduralToolkit/Shaders/Debug/Debug UV2.shader.meta b/Assets/Packages/ProceduralToolkit/Shaders/Debug/Debug UV2.shader.meta new file mode 100644 index 0000000000000000000000000000000000000000..3de4be11f0107159d1d1dbe8d629b7fd1071f70d --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/Shaders/Debug/Debug UV2.shader.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 4c8710ecf6e757a4b92212d84d255009 +ShaderImporter: + defaultTextures: [] + userData: diff --git a/Assets/Packages/ProceduralToolkit/Shaders/Diffuse Vertex Color.shader b/Assets/Packages/ProceduralToolkit/Shaders/Diffuse Vertex Color.shader new file mode 100644 index 0000000000000000000000000000000000000000..9a4e115a62e98993a90b65ddfeaef4a4a888cdc8 --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/Shaders/Diffuse Vertex Color.shader @@ -0,0 +1,26 @@ +Shader "Procedural Toolkit/Diffuse Vertex Color" +{ + SubShader + { + Tags { "RenderType"="Opaque" } + LOD 200 + + CGPROGRAM + + #pragma surface surf Lambert + + struct Input + { + float4 color: Color; + }; + + void surf (Input IN, inout SurfaceOutput o) + { + o.Albedo = IN.color.rgb; + o.Alpha = IN.color.a; + } + + ENDCG + } + FallBack "Diffuse" +} diff --git a/Assets/Packages/ProceduralToolkit/Shaders/Diffuse Vertex Color.shader.meta b/Assets/Packages/ProceduralToolkit/Shaders/Diffuse Vertex Color.shader.meta new file mode 100644 index 0000000000000000000000000000000000000000..c7f12a2afc0105f743a7ff0787de8e7a74b9cadf --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/Shaders/Diffuse Vertex Color.shader.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: ed30f33ca046d494cb8f02a356e97613 +ShaderImporter: + defaultTextures: [] + userData: diff --git a/Assets/Packages/ProceduralToolkit/Shaders/Gradient Skybox.shader b/Assets/Packages/ProceduralToolkit/Shaders/Gradient Skybox.shader new file mode 100644 index 0000000000000000000000000000000000000000..c00cb75b0a01ff97db68e4143bd15d33155f9484 --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/Shaders/Gradient Skybox.shader @@ -0,0 +1,71 @@ +Shader "Procedural Toolkit/Gradient Skybox" +{ + Properties + { + _SkyColor("Sky Color", Color) = (1, 1, 1, 0) + _HorizonColor("Horizon Color", Color) = (0.25, 0.25, 0.25, 0) + _GroundColor("Ground Color", Color) = (0.75, 0.75, 0.75, 0) + _Exponent1("Sky Exponent", Float) = 3 + _Exponent2("Ground Exponent", Float) = 1 + _Intensity("Intensity", Float) = 1 + } + + SubShader + { + Tags { "Queue" = "Background" "RenderType" = "Background" "PreviewType" = "Skybox" } + Cull Off + ZWrite Off + + Pass + { + CGPROGRAM + #pragma fragmentoption ARB_precision_hint_fastest + #pragma vertex vert + #pragma fragment frag + + #include "UnityCG.cginc" + #include "Lighting.cginc" + + half3 _SkyColor; + half3 _HorizonColor; + half3 _GroundColor; + half _Exponent1; + half _Exponent2; + half _Intensity; + + struct appdata + { + float4 position : POSITION; + float3 texcoord : TEXCOORD0; + }; + + struct v2f + { + float4 position : SV_POSITION; + float3 texcoord : TEXCOORD0; + }; + + v2f vert(appdata v) + { + v2f o; + o.position = UnityObjectToClipPos(v.position); + o.texcoord = v.texcoord; + return o; + } + + half4 frag (v2f i) : SV_Target + { + float y = normalize(i.texcoord).y; + float c1 = 1 - pow(min(1, 1 - y), _Exponent1); + float c3 = 1 - pow(min(1, 1 + y), _Exponent2); + float c2 = 1 - c1 - c3; + + half3 color = (_SkyColor * c1 + _HorizonColor * c2 + _GroundColor * c3)*_Intensity; + return half4(color, 1); + } + ENDCG + } + } + + Fallback Off +} \ No newline at end of file diff --git a/Assets/Packages/ProceduralToolkit/Shaders/Gradient Skybox.shader.meta b/Assets/Packages/ProceduralToolkit/Shaders/Gradient Skybox.shader.meta new file mode 100644 index 0000000000000000000000000000000000000000..f0e7bb9f0a02ea3f1827ecd06ff2b70c0ae204ec --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/Shaders/Gradient Skybox.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 0bfcf4c10b2626940ad26b7f045faf56 +timeCreated: 1472324772 +licenseType: Store +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Packages/ProceduralToolkit/Shaders/Specular Vertex Color.shader b/Assets/Packages/ProceduralToolkit/Shaders/Specular Vertex Color.shader new file mode 100644 index 0000000000000000000000000000000000000000..a5121171c42908eb78090d4ad5f0cbb54a15b648 --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/Shaders/Specular Vertex Color.shader @@ -0,0 +1,35 @@ +Shader "Procedural Toolkit/Specular Vertex Color" +{ + Properties + { + _SpecColor ("Specular Color", Color) = (0.5, 0.5, 0.5, 1) + _Shininess ("Shininess", Range (0.01, 1)) = 0.078125 + } + SubShader + { + Tags { "RenderType"="Opaque" } + LOD 200 + + CGPROGRAM + + #pragma surface surf BlinnPhong + + half _Shininess; + + struct Input + { + float4 color: Color; + }; + + void surf (Input IN, inout SurfaceOutput o) + { + o.Albedo = IN.color.rgb; + o.Alpha = IN.color.a; + o.Gloss = IN.color.a; + o.Specular = _Shininess; + } + + ENDCG + } + FallBack "Diffuse" +} diff --git a/Assets/Packages/ProceduralToolkit/Shaders/Specular Vertex Color.shader.meta b/Assets/Packages/ProceduralToolkit/Shaders/Specular Vertex Color.shader.meta new file mode 100644 index 0000000000000000000000000000000000000000..f00a2a2982c5c4740bd92e70d946ffd0d09d1533 --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/Shaders/Specular Vertex Color.shader.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 33193f8d8bf73874eb14f10521bd852d +ShaderImporter: + defaultTextures: [] + userData: diff --git a/Assets/Packages/ProceduralToolkit/Shaders/Standard Vertex Color.shader b/Assets/Packages/ProceduralToolkit/Shaders/Standard Vertex Color.shader new file mode 100644 index 0000000000000000000000000000000000000000..ed2c12d438b06dace7f6f20cd278d8c4819e669c --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/Shaders/Standard Vertex Color.shader @@ -0,0 +1,36 @@ +Shader "Procedural Toolkit/Standard Vertex Color" +{ + Properties + { + _Smoothness("Smoothness", Range(0.0, 1.0)) = 0.5 + _Metallic("Metallic", Range(0.0, 1.0)) = 0.0 + } + SubShader + { + Tags { "RenderType"="Opaque" } + LOD 200 + + CGPROGRAM + + #pragma surface surf Standard + + struct Input + { + float4 color: Color; + }; + + half _Smoothness; + half _Metallic; + + void surf (Input IN, inout SurfaceOutputStandard o) + { + o.Metallic = _Metallic; + o.Smoothness = _Smoothness; + o.Albedo = IN.color.rgb; + o.Alpha = IN.color.a; + } + + ENDCG + } + FallBack "Diffuse" +} diff --git a/Assets/Packages/ProceduralToolkit/Shaders/Standard Vertex Color.shader.meta b/Assets/Packages/ProceduralToolkit/Shaders/Standard Vertex Color.shader.meta new file mode 100644 index 0000000000000000000000000000000000000000..4a8a9d7478f595189bbfc301a0cfe2e02dd57c11 --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/Shaders/Standard Vertex Color.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 40dd86119e3f8e74d8f7d84425c926aa +timeCreated: 1431456251 +licenseType: Store +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Packages/ProceduralToolkit/Shaders/Unlit Vertex Color.shader b/Assets/Packages/ProceduralToolkit/Shaders/Unlit Vertex Color.shader new file mode 100644 index 0000000000000000000000000000000000000000..1f9a9ac6e59087febbe2801fd8a13d87c4e510d2 --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/Shaders/Unlit Vertex Color.shader @@ -0,0 +1,44 @@ +Shader "Procedural Toolkit/Unlit Vertex Color" +{ + SubShader + { + Tags { "RenderType"="Opaque" } + LOD 100 + + Pass + { + CGPROGRAM + + #pragma vertex vert + #pragma fragment frag + #include "UnityCG.cginc" + + struct appdata + { + float4 position : POSITION; + fixed4 color : COLOR; + }; + + struct v2f + { + float4 position : SV_POSITION; + fixed4 color : COLOR; + }; + + v2f vert (appdata v) + { + v2f o; + o.position = UnityObjectToClipPos(v.position); + o.color = v.color; + return o; + } + + fixed4 frag (v2f i) : COLOR + { + return i.color; + } + + ENDCG + } + } +} \ No newline at end of file diff --git a/Assets/Packages/ProceduralToolkit/Shaders/Unlit Vertex Color.shader.meta b/Assets/Packages/ProceduralToolkit/Shaders/Unlit Vertex Color.shader.meta new file mode 100644 index 0000000000000000000000000000000000000000..cf52375299b0dee25bc9616e5c196d65026a1d5d --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/Shaders/Unlit Vertex Color.shader.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 05631ea81b09d1f4fa8885bd25ecd4ce +ShaderImporter: + defaultTextures: [] + userData: diff --git a/Assets/Packages/ProceduralToolkit/TextureE.cs b/Assets/Packages/ProceduralToolkit/TextureE.cs new file mode 100644 index 0000000000000000000000000000000000000000..5a075498c3f68ab94c91143f59d2a890110e845f --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/TextureE.cs @@ -0,0 +1,236 @@ +using System; +using UnityEngine; + +namespace ProceduralToolkit +{ + /// + /// Texture extensions + /// + public static class TextureE + { + /// + /// Draws line on texture + /// + public static void DrawLine(this Texture2D texture, Vector2Int v0, Vector2Int v1, Color color) + { + if (texture == null) + { + throw new ArgumentNullException("texture"); + } + Draw.RasterLine(v0, v1, (x, y) => texture.SetPixel(x, y, color)); + } + + /// + /// Draws line on texture + /// + public static void DrawLine(this Texture2D texture, int x0, int y0, int x1, int y1, Color color) + { + if (texture == null) + { + throw new ArgumentNullException("texture"); + } + Draw.RasterLine(x0, y0, x1, y1, (x, y) => texture.SetPixel(x, y, color)); + } + + /// + /// Draws anti-aliased line on texture + /// + public static void DrawAALine(this Texture2D texture, Vector2Int v0, Vector2Int v1, Color color) + { + if (texture == null) + { + throw new ArgumentNullException("texture"); + } + Draw.RasterAALine(v0, v1, + (x, y, t) => texture.SetPixel(x, y, Color.Lerp(texture.GetPixel(x, y), color, t))); + } + + /// + /// Draws anti-aliased line on texture + /// + public static void DrawAALine(this Texture2D texture, int x0, int y0, int x1, int y1, Color color) + { + if (texture == null) + { + throw new ArgumentNullException("texture"); + } + Draw.RasterAALine(x0, y0, x1, y1, + (x, y, t) => texture.SetPixel(x, y, Color.Lerp(texture.GetPixel(x, y), color, t))); + } + + /// + /// Draws circle on texture + /// + public static void DrawCircle(this Texture2D texture, Vector2Int center, int radius, Color color) + { + if (texture == null) + { + throw new ArgumentNullException("texture"); + } + Draw.RasterCircle(center, radius, (x, y) => texture.SetPixel(x, y, color)); + } + + /// + /// Draws circle on texture + /// + public static void DrawCircle(this Texture2D texture, int centerX, int centerY, int radius, Color color) + { + if (texture == null) + { + throw new ArgumentNullException("texture"); + } + Draw.RasterCircle(centerX, centerY, radius, (x, y) => texture.SetPixel(x, y, color)); + } + + /// + /// Draws filled circle on texture using Bresenham's algorithm + /// + public static void DrawFilledCircle(this Texture2D texture, Vector2Int center, int radius, Color color) + { + if (texture == null) + { + throw new ArgumentNullException("texture"); + } + Draw.RasterFilledCircle(center, radius, (x, y) => texture.SetPixel(x, y, color)); + } + + /// + /// Draws filled circle on texture using Bresenham's algorithm + /// + public static void DrawFilledCircle(this Texture2D texture, int centerX, int centerY, int radius, Color color) + { + if (texture == null) + { + throw new ArgumentNullException("texture"); + } + Draw.RasterFilledCircle(centerX, centerY, radius, (x, y) => texture.SetPixel(x, y, color)); + } + + /// + /// Draws filled rectangle on texture + /// + public static void DrawRect(this Texture2D texture, int x, int y, int blockWidth, int blockHeight, Color color) + { + if (texture == null) + { + throw new ArgumentNullException("texture"); + } + var colors = new Color[blockWidth*blockHeight]; + for (int _y = 0; _y < blockHeight; _y++) + { + for (int _x = 0; _x < blockWidth; _x++) + { + colors[_x + _y*blockWidth] = color; + } + } + texture.SetPixels(x, y, blockWidth, blockHeight, colors); + } + + /// + /// Fills texture with gradient + /// + public static void DrawGradient(this Texture2D texture, Gradient gradient, Directions progressionDirection) + { + if (texture == null) + { + throw new ArgumentNullException("texture"); + } + texture.DrawGradientRect(0, 0, texture.width, texture.height, gradient, progressionDirection); + } + + /// + /// Draws gradient rectangle on texture + /// t + public static void DrawGradientRect(this Texture2D texture, int x, int y, int blockWidth, int blockHeight, + Gradient gradient, Directions progressionDirection) + { + if (texture == null) + { + throw new ArgumentNullException("texture"); + } + Func getColor; + switch (progressionDirection) + { + case Directions.Left: + getColor = (_x, _y) => gradient.Evaluate(1 - (float) _x/(float) blockWidth); + break; + case Directions.Right: + getColor = (_x, _y) => gradient.Evaluate((float) _x/(float) blockWidth); + break; + case Directions.Down: + getColor = (_x, _y) => gradient.Evaluate(1 - (float) _y/(float) blockHeight); + break; + case Directions.Up: + getColor = (_x, _y) => gradient.Evaluate((float) _y/(float) blockHeight); + break; + default: + throw new ArgumentException("Not supported direction: " + progressionDirection, + "progressionDirection"); + } + + var colors = new Color[blockWidth*blockHeight]; + for (int _y = 0; _y < blockHeight; _y++) + { + for (int _x = 0; _x < blockWidth; _x++) + { + colors[_x + _y*blockWidth] = getColor(_x, _y); + } + } + texture.SetPixels(x, y, blockWidth, blockHeight, colors); + } + + /// + /// Fills texture with white color + /// + public static void Clear(this Texture2D texture) + { + if (texture == null) + { + throw new ArgumentNullException("texture"); + } + var pixels = new Color[texture.width*texture.height]; + for (var i = 0; i < pixels.Length; i++) + { + pixels[i] = Color.white; + } + texture.SetPixels(pixels); + } + + /// + /// Fills texture with specified color + /// + public static void Clear(this Texture2D texture, Color color) + { + if (texture == null) + { + throw new ArgumentNullException("texture"); + } + var pixels = new Color[texture.width*texture.height]; + for (var i = 0; i < pixels.Length; i++) + { + pixels[i] = color; + } + texture.SetPixels(pixels); + } + + /// + /// Fills texture with specified color + /// + public static void Clear(this Texture2D texture, Color color, ref Color[] pixels) + { + if (texture == null) + { + throw new ArgumentNullException("texture"); + } + if (pixels == null) + { + throw new ArgumentNullException("pixels"); + } + for (var i = 0; i < pixels.Length; i++) + { + pixels[i] = color; + } + texture.SetPixels(pixels); + } + } +} \ No newline at end of file diff --git a/Assets/Packages/ProceduralToolkit/TextureE.cs.meta b/Assets/Packages/ProceduralToolkit/TextureE.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..0e7df341fb87511900e3346b9f39c734f2f3071f --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/TextureE.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: c42a1bb146781de408e54b8c55414425 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/Packages/ProceduralToolkit/Vector2Int.cs b/Assets/Packages/ProceduralToolkit/Vector2Int.cs new file mode 100644 index 0000000000000000000000000000000000000000..dc1c95aa01ddb08d4267310bcf2663454572b1b5 --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/Vector2Int.cs @@ -0,0 +1,177 @@ +using System; + +namespace ProceduralToolkit +{ + /// + /// Representation of 2D vectors and points using integers + /// + [Serializable] + public struct Vector2Int + { + /// + /// X component of the vector + /// + public int x; + + /// + /// Y component of the vector + /// + public int y; + + #region Static constructors + + /// + /// Shorthand for writing new Vector2Int(0, 0) + /// + public static Vector2Int zero { get { return new Vector2Int(0, 0); } } + /// + /// Shorthand for writing new Vector2Int(1, 1) + /// + public static Vector2Int one { get { return new Vector2Int(1, 1); } } + /// + /// Shorthand for writing new Vector2Int(1, 0) + /// + public static Vector2Int right { get { return new Vector2Int(1, 0); } } + /// + /// Shorthand for writing new Vector2Int(-1, 0) + /// + public static Vector2Int left { get { return new Vector2Int(-1, 0); } } + /// + /// Shorthand for writing new Vector2Int(0, 1) + /// + public static Vector2Int up { get { return new Vector2Int(0, 1); } } + /// + /// Shorthand for writing new Vector2Int(0, -1) + /// + public static Vector2Int down { get { return new Vector2Int(0, -1); } } + + #endregion Static constructors + + /// + /// Returns the length of this vector (RO) + /// + public int magnitude { get { return (int) Math.Sqrt(sqrMagnitude); } } + + /// + /// Returns the squared length of this vector (RO) + /// + public int sqrMagnitude { get { return x*x + y*y; } } + + /// + /// Returns this vector with a magnitude of 1 (RO) + /// + public Vector2Int normalized + { + get + { + var vector = new Vector2Int(x, y); + vector.Normalize(); + return vector; + } + } + + /// + /// Constructs a new vector with given x, y components + /// + public Vector2Int(int x, int y) + { + this.x = x; + this.y = y; + } + + /// + /// Makes this vector have a magnitude of 1 + /// + public void Normalize() + { + int magnitude = this.magnitude; + if (magnitude > 0) + { + this /= magnitude; + } + else + { + this = zero; + } + } + + /// + /// Dot Product of two vectors + /// + public static int Dot(Vector2Int lhs, Vector2Int rhs) + { + return lhs.x*rhs.x + lhs.y*rhs.y; + } + + #region Operators + + public static Vector2Int operator +(Vector2Int a, Vector2Int b) + { + return new Vector2Int(a.x + b.x, a.y + b.y); + } + + public static Vector2Int operator -(Vector2Int a, Vector2Int b) + { + return new Vector2Int(a.x - b.x, a.y - b.y); + } + + public static Vector2Int operator -(Vector2Int a) + { + return new Vector2Int(-a.x, -a.y); + } + + public static Vector2Int operator *(int d, Vector2Int a) + { + return new Vector2Int(a.x*d, a.y*d); + } + + public static Vector2Int operator *(Vector2Int a, int d) + { + return new Vector2Int(a.x*d, a.y*d); + } + + public static Vector2Int operator /(Vector2Int a, int d) + { + return new Vector2Int(a.x/d, a.y/d); + } + + public static bool operator ==(Vector2Int a, Vector2Int b) + { + return a.x == b.x && a.y == b.y; + } + + public static bool operator !=(Vector2Int a, Vector2Int b) + { + return !(a == b); + } + + #endregion Operators + + public override int GetHashCode() + { + return x.GetHashCode() ^ y.GetHashCode() << 2; + } + + public override bool Equals(object other) + { + if (!(other is Vector2Int)) + { + return false; + } + Vector2Int vector2Int = (Vector2Int) other; + if (x.Equals(vector2Int.x)) + { + return y.Equals(vector2Int.y); + } + return false; + } + + /// + /// Returns a nicely formatted string for this vector + /// + public override string ToString() + { + return string.Format("({0}, {1})", x, y); + } + } +} \ No newline at end of file diff --git a/Assets/Packages/ProceduralToolkit/Vector2Int.cs.meta b/Assets/Packages/ProceduralToolkit/Vector2Int.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..9851ae1fca096e1634a3303747fe1073343ed685 --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/Vector2Int.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 62eff255d0e456249be0fecc7a056eb6 +timeCreated: 1447086010 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Packages/ProceduralToolkit/VectorE.cs b/Assets/Packages/ProceduralToolkit/VectorE.cs new file mode 100644 index 0000000000000000000000000000000000000000..d289d3d37545612727a295950e6498f1f6d6de2f --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/VectorE.cs @@ -0,0 +1,129 @@ +using UnityEngine; + +namespace ProceduralToolkit +{ + /// + /// Vector extensions + /// + public static class VectorE + { + private const float epsilon = 0.00001f; + + #region Vector2 + + /// + /// Returns new vector with zero Y component + /// + public static Vector2 OnlyX(this Vector2 vector) + { + return new Vector2(vector.x, 0); + } + + /// + /// Returns new vector with zero X component + /// + public static Vector2 OnlyY(this Vector2 vector) + { + return new Vector2(0, vector.y); + } + + /// + /// Projects vector onto three dimensional XY plane + /// + public static Vector3 ToVector3XY(this Vector2 vector) + { + return new Vector3(vector.x, vector.y, 0); + } + + /// + /// Projects vector onto three dimensional XZ plane + /// + public static Vector3 ToVector3XZ(this Vector2 vector) + { + return new Vector3(vector.x, 0, vector.y); + } + + /// + /// Projects vector onto three dimensional YZ plane + /// + public static Vector3 ToVector3YZ(this Vector2 vector) + { + return new Vector3(0, vector.x, vector.y); + } + + /// + /// Returns true if vectors lie on the same line, false otherwise + /// + public static bool IsCollinear(this Vector2 vector, Vector2 other) + { + return Mathf.Abs(PTUtils.PerpDot(vector, other)) < epsilon; + } + + /// + /// Returns new vector rotated clockwise by specified angle + /// + public static Vector2 RotateCW(this Vector2 vector, float degrees) + { + float radians = degrees*Mathf.Deg2Rad; + float sin = Mathf.Sin(radians); + float cos = Mathf.Cos(radians); + return new Vector2( + vector.x*cos + vector.y*sin, + -vector.x*sin + vector.y*cos); + } + + #endregion Vector2 + + #region Vector3 + + /// + /// Returns new vector with zero Y and Z components + /// + public static Vector3 OnlyX(this Vector3 vector) + { + return new Vector3(vector.x, 0, 0); + } + + /// + /// Returns new vector with zero X and Z components + /// + public static Vector3 OnlyY(this Vector3 vector) + { + return new Vector3(0, vector.y, 0); + } + + /// + /// Returns new vector with zero X and Y components + /// + public static Vector3 OnlyZ(this Vector3 vector) + { + return new Vector3(0, 0, vector.z); + } + + /// + /// Returns new vector with zero Z component + /// + public static Vector3 OnlyXY(this Vector3 vector) + { + return new Vector3(vector.x, vector.y, 0); + } + + /// + /// Returns new vector with zero Y component + /// + public static Vector3 OnlyXZ(this Vector3 vector) + { + return new Vector3(vector.x, 0, vector.z); + } + + /// + /// Returns new vector with zero X component + /// + public static Vector3 OnlyYZ(this Vector3 vector) + { + return new Vector3(0, vector.y, vector.z); + } + + #endregion Vector3 + } +} \ No newline at end of file diff --git a/Assets/Packages/ProceduralToolkit/VectorE.cs.meta b/Assets/Packages/ProceduralToolkit/VectorE.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..853176f6c5573456c209d264611f2d9394cca6df --- /dev/null +++ b/Assets/Packages/ProceduralToolkit/VectorE.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 624630ee85e96864489fd8323d06d41e +timeCreated: 1473444275 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Packages/Standard Assets.meta b/Assets/Packages/Standard Assets.meta new file mode 100644 index 0000000000000000000000000000000000000000..cef5e3b257849125821aad16e8f1f07808e6c925 --- /dev/null +++ b/Assets/Packages/Standard Assets.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 0853fa8b9dc4bac4d853c4ee9cc0d574 +folderAsset: yes +timeCreated: 1492164309 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Packages/Standard Assets/Editor.meta b/Assets/Packages/Standard Assets/Editor.meta new file mode 100644 index 0000000000000000000000000000000000000000..a31a62cbdcef10faafb6d3b9c18d2ecda31f40dc --- /dev/null +++ b/Assets/Packages/Standard Assets/Editor.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 8041fefad3a1ae646a15026162cce0b2 +folderAsset: yes +timeCreated: 1492164309 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Packages/Standard Assets/Editor/ImageEffects.meta b/Assets/Packages/Standard Assets/Editor/ImageEffects.meta new file mode 100644 index 0000000000000000000000000000000000000000..1dfb5360b48f843b4a46b62ee78d9bbd9ec70fca --- /dev/null +++ b/Assets/Packages/Standard Assets/Editor/ImageEffects.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: 225198e07aaae3547a6d1f6e7177555f +folderAsset: yes +DefaultImporter: + userData: + assetBundleName: diff --git a/Assets/Packages/Standard Assets/Editor/ImageEffects/AntialiasingEditor.cs b/Assets/Packages/Standard Assets/Editor/ImageEffects/AntialiasingEditor.cs new file mode 100644 index 0000000000000000000000000000000000000000..795b9d87c77602127ad65af518fa908f6be07d86 --- /dev/null +++ b/Assets/Packages/Standard Assets/Editor/ImageEffects/AntialiasingEditor.cs @@ -0,0 +1,75 @@ +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/Assets/Packages/Standard Assets/Editor/ImageEffects/AntialiasingEditor.cs.meta b/Assets/Packages/Standard Assets/Editor/ImageEffects/AntialiasingEditor.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..bbf3d2e1772deb01d91d5a4b414469cd0c48a40a --- /dev/null +++ b/Assets/Packages/Standard Assets/Editor/ImageEffects/AntialiasingEditor.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: ba15fa37442517749a3c4640a4ad4054 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Packages/Standard Assets/Editor/ImageEffects/BloomAndFlaresEditor.cs b/Assets/Packages/Standard Assets/Editor/ImageEffects/BloomAndFlaresEditor.cs new file mode 100644 index 0000000000000000000000000000000000000000..2966e5ddd853b5c4595fe62eaaa60e7dd18eb0ce --- /dev/null +++ b/Assets/Packages/Standard Assets/Editor/ImageEffects/BloomAndFlaresEditor.cs @@ -0,0 +1,157 @@ +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 (screenBlendMode.enumValueIndex==0 && ((cam.hdr && hdr.enumValueIndex==0) || (hdr.enumValueIndex==1))) { + 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/Assets/Packages/Standard Assets/Editor/ImageEffects/BloomAndFlaresEditor.cs.meta b/Assets/Packages/Standard Assets/Editor/ImageEffects/BloomAndFlaresEditor.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..a4f4e00be90b7c167baa010bbbf2a6c2e75c192c --- /dev/null +++ b/Assets/Packages/Standard Assets/Editor/ImageEffects/BloomAndFlaresEditor.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 4deca87cb459d1642ac8f734856ca84e +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Packages/Standard Assets/Editor/ImageEffects/BloomEditor.cs b/Assets/Packages/Standard Assets/Editor/ImageEffects/BloomEditor.cs new file mode 100644 index 0000000000000000000000000000000000000000..6957591fc432af242ce19498f10830cf8cf707cb --- /dev/null +++ b/Assets/Packages/Standard Assets/Editor/ImageEffects/BloomEditor.cs @@ -0,0 +1,162 @@ +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 (screenBlendMode.enumValueIndex==0 && ((cam.hdr && hdr.enumValueIndex==0) || (hdr.enumValueIndex==1))) { + 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/Assets/Packages/Standard Assets/Editor/ImageEffects/BloomEditor.cs.meta b/Assets/Packages/Standard Assets/Editor/ImageEffects/BloomEditor.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..ad4d3b3e058082db97239e017cbe065193ead7c3 --- /dev/null +++ b/Assets/Packages/Standard Assets/Editor/ImageEffects/BloomEditor.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 43fcc28c40e404d4eabfc88b1dbda7b5 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Packages/Standard Assets/Editor/ImageEffects/CameraMotionBlurEditor.cs b/Assets/Packages/Standard Assets/Editor/ImageEffects/CameraMotionBlurEditor.cs new file mode 100644 index 0000000000000000000000000000000000000000..bc1f5ffdb535dc07ef1a653815dd7c461cb772c4 --- /dev/null +++ b/Assets/Packages/Standard Assets/Editor/ImageEffects/CameraMotionBlurEditor.cs @@ -0,0 +1,99 @@ +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/Assets/Packages/Standard Assets/Editor/ImageEffects/CameraMotionBlurEditor.cs.meta b/Assets/Packages/Standard Assets/Editor/ImageEffects/CameraMotionBlurEditor.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..af6696961cd0988e4761025766e34511d3317c78 --- /dev/null +++ b/Assets/Packages/Standard Assets/Editor/ImageEffects/CameraMotionBlurEditor.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 80cbbe1c107bf5e43a96347d3dfc2658 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Packages/Standard Assets/Editor/ImageEffects/ColorCorrectionCurvesEditor.cs b/Assets/Packages/Standard Assets/Editor/ImageEffects/ColorCorrectionCurvesEditor.cs new file mode 100644 index 0000000000000000000000000000000000000000..f37adb09e5cc52f4f3e355ea584185cb1ee9c623 --- /dev/null +++ b/Assets/Packages/Standard Assets/Editor/ImageEffects/ColorCorrectionCurvesEditor.cs @@ -0,0 +1,124 @@ +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/Assets/Packages/Standard Assets/Editor/ImageEffects/ColorCorrectionCurvesEditor.cs.meta b/Assets/Packages/Standard Assets/Editor/ImageEffects/ColorCorrectionCurvesEditor.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..b1c7fa3ab3df7b4a3f0e384b0f301db8ecf70513 --- /dev/null +++ b/Assets/Packages/Standard Assets/Editor/ImageEffects/ColorCorrectionCurvesEditor.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: a4a9489f73e4f0344ab3fc97bdf5170b +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Packages/Standard Assets/Editor/ImageEffects/ColorCorrectionLookupEditor.cs b/Assets/Packages/Standard Assets/Editor/ImageEffects/ColorCorrectionLookupEditor.cs new file mode 100644 index 0000000000000000000000000000000000000000..4d6c4bc9795803327ff5c90f53bf0b9de2a7fa76 --- /dev/null +++ b/Assets/Packages/Standard Assets/Editor/ImageEffects/ColorCorrectionLookupEditor.cs @@ -0,0 +1,90 @@ +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/Assets/Packages/Standard Assets/Editor/ImageEffects/ColorCorrectionLookupEditor.cs.meta b/Assets/Packages/Standard Assets/Editor/ImageEffects/ColorCorrectionLookupEditor.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..9286d0efad9a4d505b75f71e57e7e40d050948da --- /dev/null +++ b/Assets/Packages/Standard Assets/Editor/ImageEffects/ColorCorrectionLookupEditor.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 66c17be95fbf398439ea09f8892a8b43 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Packages/Standard Assets/Editor/ImageEffects/CreaseShadingEditor.cs b/Assets/Packages/Standard Assets/Editor/ImageEffects/CreaseShadingEditor.cs new file mode 100644 index 0000000000000000000000000000000000000000..da5d62d6f6f7523a4c6396795c129a1c0810ad6f --- /dev/null +++ b/Assets/Packages/Standard Assets/Editor/ImageEffects/CreaseShadingEditor.cs @@ -0,0 +1,60 @@ +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/Assets/Packages/Standard Assets/Editor/ImageEffects/CreaseShadingEditor.cs.meta b/Assets/Packages/Standard Assets/Editor/ImageEffects/CreaseShadingEditor.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..85fb4bae9892432b65dbecaff524ec3e77104469 --- /dev/null +++ b/Assets/Packages/Standard Assets/Editor/ImageEffects/CreaseShadingEditor.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 6788af605d2f1244789565913bb4e7f6 +timeCreated: 1434032656 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Packages/Standard Assets/Editor/ImageEffects/DepthOfFieldDeprecatedEditor.cs b/Assets/Packages/Standard Assets/Editor/ImageEffects/DepthOfFieldDeprecatedEditor.cs new file mode 100644 index 0000000000000000000000000000000000000000..b1e5b84e19f3b3f04b0959b20a450ca83503c722 --- /dev/null +++ b/Assets/Packages/Standard Assets/Editor/ImageEffects/DepthOfFieldDeprecatedEditor.cs @@ -0,0 +1,149 @@ +using System; +using UnityEditor; +using UnityEngine; + +namespace UnityStandardAssets.ImageEffects +{ + [CustomEditor (typeof(DepthOfFieldDeprecated))] + class DepthOfFieldDeprecatedEditor : Editor + { + SerializedObject serObj; + + SerializedProperty simpleTweakMode; + + SerializedProperty focalPoint; + SerializedProperty smoothness; + + SerializedProperty focalSize; + + SerializedProperty focalZDistance; + SerializedProperty focalStartCurve; + SerializedProperty focalEndCurve; + + SerializedProperty visualizeCoc; + + SerializedProperty resolution; + SerializedProperty quality; + + SerializedProperty objectFocus; + + SerializedProperty bokeh; + SerializedProperty bokehScale; + SerializedProperty bokehIntensity; + SerializedProperty bokehThresholdLuminance; + SerializedProperty bokehThresholdContrast; + SerializedProperty bokehDownsample; + SerializedProperty bokehTexture; + SerializedProperty bokehDestination; + + SerializedProperty bluriness; + SerializedProperty maxBlurSpread; + SerializedProperty foregroundBlurExtrude; + + void OnEnable () { + serObj = new SerializedObject (target); + + simpleTweakMode = serObj.FindProperty ("simpleTweakMode"); + + // simple tweak mode + focalPoint = serObj.FindProperty ("focalPoint"); + smoothness = serObj.FindProperty ("smoothness"); + + // complex tweak mode + focalZDistance = serObj.FindProperty ("focalZDistance"); + focalStartCurve = serObj.FindProperty ("focalZStartCurve"); + focalEndCurve = serObj.FindProperty ("focalZEndCurve"); + focalSize = serObj.FindProperty ("focalSize"); + + visualizeCoc = serObj.FindProperty ("visualize"); + + objectFocus = serObj.FindProperty ("objectFocus"); + + resolution = serObj.FindProperty ("resolution"); + quality = serObj.FindProperty ("quality"); + bokehThresholdContrast = serObj.FindProperty ("bokehThresholdContrast"); + bokehThresholdLuminance = serObj.FindProperty ("bokehThresholdLuminance"); + + bokeh = serObj.FindProperty ("bokeh"); + bokehScale = serObj.FindProperty ("bokehScale"); + bokehIntensity = serObj.FindProperty ("bokehIntensity"); + bokehDownsample = serObj.FindProperty ("bokehDownsample"); + bokehTexture = serObj.FindProperty ("bokehTexture"); + bokehDestination = serObj.FindProperty ("bokehDestination"); + + bluriness = serObj.FindProperty ("bluriness"); + maxBlurSpread = serObj.FindProperty ("maxBlurSpread"); + foregroundBlurExtrude = serObj.FindProperty ("foregroundBlurExtrude"); + } + + + public override void OnInspectorGUI () { + serObj.Update (); + + GameObject go = (target as DepthOfFieldDeprecated).gameObject; + + if (!go) + return; + + if (!go.GetComponent()) + return; + + if (simpleTweakMode.boolValue) + GUILayout.Label ("Current: "+go.GetComponent().name+", near "+go.GetComponent().nearClipPlane+", far: "+go.GetComponent().farClipPlane+", focal: "+focalPoint.floatValue, EditorStyles.miniBoldLabel); + else + GUILayout.Label ("Current: "+go.GetComponent().name+", near "+go.GetComponent().nearClipPlane+", far: "+go.GetComponent().farClipPlane+", focal: "+focalZDistance.floatValue, EditorStyles.miniBoldLabel); + + EditorGUILayout.PropertyField (resolution, new GUIContent("Resolution")); + EditorGUILayout.PropertyField (quality, new GUIContent("Quality")); + + EditorGUILayout.PropertyField (simpleTweakMode, new GUIContent("Simple tweak")); + EditorGUILayout.PropertyField (visualizeCoc, new GUIContent("Visualize focus")); + EditorGUILayout.PropertyField (bokeh, new GUIContent("Enable bokeh")); + + + EditorGUILayout.Separator (); + + GUILayout.Label ("Focal Settings", EditorStyles.boldLabel); + + if (simpleTweakMode.boolValue) { + focalPoint.floatValue = EditorGUILayout.Slider ("Focal distance", focalPoint.floatValue, go.GetComponent().nearClipPlane, go.GetComponent().farClipPlane); + EditorGUILayout.PropertyField (objectFocus, new GUIContent("Transform")); + EditorGUILayout.PropertyField (smoothness, new GUIContent("Smoothness")); + focalSize.floatValue = EditorGUILayout.Slider ("Focal size", focalSize.floatValue, 0.0f, (go.GetComponent().farClipPlane - go.GetComponent().nearClipPlane)); + } + else { + focalZDistance.floatValue = EditorGUILayout.Slider ("Distance", focalZDistance.floatValue, go.GetComponent().nearClipPlane, go.GetComponent().farClipPlane); + EditorGUILayout.PropertyField (objectFocus, new GUIContent("Transform")); + focalSize.floatValue = EditorGUILayout.Slider ("Size", focalSize.floatValue, 0.0f, (go.GetComponent().farClipPlane - go.GetComponent().nearClipPlane)); + focalStartCurve.floatValue = EditorGUILayout.Slider ("Start curve", focalStartCurve.floatValue, 0.05f, 20.0f); + focalEndCurve.floatValue = EditorGUILayout.Slider ("End curve", focalEndCurve.floatValue, 0.05f, 20.0f); + } + + EditorGUILayout.Separator (); + + GUILayout.Label ("Blur (Fore- and Background)", EditorStyles.boldLabel); + EditorGUILayout.PropertyField (bluriness, new GUIContent("Blurriness")); + EditorGUILayout.PropertyField (maxBlurSpread, new GUIContent("Blur spread")); + + if (quality.enumValueIndex > 0) { + EditorGUILayout.PropertyField (foregroundBlurExtrude, new GUIContent("Foreground size")); + } + + EditorGUILayout.Separator (); + + if (bokeh.boolValue) { + EditorGUILayout.Separator (); + GUILayout.Label ("Bokeh Settings", EditorStyles.boldLabel); + EditorGUILayout.PropertyField (bokehDestination, new GUIContent("Destination")); + bokehIntensity.floatValue = EditorGUILayout.Slider ("Intensity", bokehIntensity.floatValue, 0.0f, 1.0f); + bokehThresholdLuminance.floatValue = EditorGUILayout.Slider ("Min luminance", bokehThresholdLuminance.floatValue, 0.0f, 0.99f); + bokehThresholdContrast.floatValue = EditorGUILayout.Slider ("Min contrast", bokehThresholdContrast.floatValue, 0.0f, 0.25f); + bokehDownsample.intValue = EditorGUILayout.IntSlider ("Downsample", bokehDownsample.intValue, 1, 3); + bokehScale.floatValue = EditorGUILayout.Slider ("Size scale", bokehScale.floatValue, 0.0f, 20.0f); + EditorGUILayout.PropertyField (bokehTexture , new GUIContent("Texture mask")); + } + + serObj.ApplyModifiedProperties(); + } + } +} diff --git a/Assets/Packages/Standard Assets/Editor/ImageEffects/DepthOfFieldDeprecatedEditor.cs.meta b/Assets/Packages/Standard Assets/Editor/ImageEffects/DepthOfFieldDeprecatedEditor.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..cf226312bf0290cf247c66d747fdd4e13e14c37f --- /dev/null +++ b/Assets/Packages/Standard Assets/Editor/ImageEffects/DepthOfFieldDeprecatedEditor.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 943c59645eb905144a0990b57e13a6f9 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Packages/Standard Assets/Editor/ImageEffects/DepthOfFieldEditor.cs b/Assets/Packages/Standard Assets/Editor/ImageEffects/DepthOfFieldEditor.cs new file mode 100644 index 0000000000000000000000000000000000000000..acd7aca58d821ada89da884ab762f389505b7bdd --- /dev/null +++ b/Assets/Packages/Standard Assets/Editor/ImageEffects/DepthOfFieldEditor.cs @@ -0,0 +1,161 @@ +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/Assets/Packages/Standard Assets/Editor/ImageEffects/DepthOfFieldEditor.cs.meta b/Assets/Packages/Standard Assets/Editor/ImageEffects/DepthOfFieldEditor.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..8d85a2e4e96ada0d8659fbf8fc894496848d19ca --- /dev/null +++ b/Assets/Packages/Standard Assets/Editor/ImageEffects/DepthOfFieldEditor.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 427fdf36119bab44a9131abd19b90f57 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Packages/Standard Assets/Editor/ImageEffects/EdgeDetectionEditor.cs b/Assets/Packages/Standard Assets/Editor/ImageEffects/EdgeDetectionEditor.cs new file mode 100644 index 0000000000000000000000000000000000000000..9d2d7a5daf7e65cbe5268b4d6aa900a4a21223f8 --- /dev/null +++ b/Assets/Packages/Standard Assets/Editor/ImageEffects/EdgeDetectionEditor.cs @@ -0,0 +1,72 @@ +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/Assets/Packages/Standard Assets/Editor/ImageEffects/EdgeDetectionEditor.cs.meta b/Assets/Packages/Standard Assets/Editor/ImageEffects/EdgeDetectionEditor.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..3ec10ca6ab3389bd2aa3b67eea27ae9331884782 --- /dev/null +++ b/Assets/Packages/Standard Assets/Editor/ImageEffects/EdgeDetectionEditor.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: b5f1618d14cd80f4da910f00b04af37f +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Packages/Standard Assets/Editor/ImageEffects/NoiseAndGrainEditor.cs b/Assets/Packages/Standard Assets/Editor/ImageEffects/NoiseAndGrainEditor.cs new file mode 100644 index 0000000000000000000000000000000000000000..5b31336b91e43b1b3888368ddc76c3a0c8c6e6a0 --- /dev/null +++ b/Assets/Packages/Standard Assets/Editor/ImageEffects/NoiseAndGrainEditor.cs @@ -0,0 +1,111 @@ +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/Assets/Packages/Standard Assets/Editor/ImageEffects/NoiseAndGrainEditor.cs.meta b/Assets/Packages/Standard Assets/Editor/ImageEffects/NoiseAndGrainEditor.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..1ca666a011d62c22858e062a668fed3dcb8229c2 --- /dev/null +++ b/Assets/Packages/Standard Assets/Editor/ImageEffects/NoiseAndGrainEditor.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: abd63abcc46fbcb4588164b671b52d3b +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Packages/Standard Assets/Editor/ImageEffects/SunShaftsEditor.cs b/Assets/Packages/Standard Assets/Editor/ImageEffects/SunShaftsEditor.cs new file mode 100644 index 0000000000000000000000000000000000000000..51deae7edfc15f301132fc63f5b860b96914f1cc --- /dev/null +++ b/Assets/Packages/Standard Assets/Editor/ImageEffects/SunShaftsEditor.cs @@ -0,0 +1,105 @@ +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/Assets/Packages/Standard Assets/Editor/ImageEffects/SunShaftsEditor.cs.meta b/Assets/Packages/Standard Assets/Editor/ImageEffects/SunShaftsEditor.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..b8d901ffb793892e49191d1c81c75f201cb7b023 --- /dev/null +++ b/Assets/Packages/Standard Assets/Editor/ImageEffects/SunShaftsEditor.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 54f6f6313f2aecc4d81035ec0031e313 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Packages/Standard Assets/Editor/ImageEffects/TonemappingEditor.cs b/Assets/Packages/Standard Assets/Editor/ImageEffects/TonemappingEditor.cs new file mode 100644 index 0000000000000000000000000000000000000000..613631f0f2ae790ab1b4a639874014fd678bc457 --- /dev/null +++ b/Assets/Packages/Standard Assets/Editor/ImageEffects/TonemappingEditor.cs @@ -0,0 +1,81 @@ +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 (!cam.hdr) { + 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/Assets/Packages/Standard Assets/Editor/ImageEffects/TonemappingEditor.cs.meta b/Assets/Packages/Standard Assets/Editor/ImageEffects/TonemappingEditor.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..40c242ad06e8729b3dc562c9758729483528f402 --- /dev/null +++ b/Assets/Packages/Standard Assets/Editor/ImageEffects/TonemappingEditor.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 0f7cab214f141f642b87a5bdbd14653e +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Packages/Standard Assets/Editor/ImageEffects/VignetteAndChromaticAberrationEditor.cs b/Assets/Packages/Standard Assets/Editor/ImageEffects/VignetteAndChromaticAberrationEditor.cs new file mode 100644 index 0000000000000000000000000000000000000000..7ccec20eff39193602ddc78f5551402674c7130a --- /dev/null +++ b/Assets/Packages/Standard Assets/Editor/ImageEffects/VignetteAndChromaticAberrationEditor.cs @@ -0,0 +1,62 @@ +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/Assets/Packages/Standard Assets/Editor/ImageEffects/VignetteAndChromaticAberrationEditor.cs.meta b/Assets/Packages/Standard Assets/Editor/ImageEffects/VignetteAndChromaticAberrationEditor.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..278b4eba3feffde8f4f835fe99efbdb6b900b366 --- /dev/null +++ b/Assets/Packages/Standard Assets/Editor/ImageEffects/VignetteAndChromaticAberrationEditor.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 08126bf2baa528c4cb9c60340a24e5d6 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Packages/Standard Assets/Effects.meta b/Assets/Packages/Standard Assets/Effects.meta new file mode 100644 index 0000000000000000000000000000000000000000..fc4ec9cd8c9e7fe9b2b295f0edba422982cd5f5c --- /dev/null +++ b/Assets/Packages/Standard Assets/Effects.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: 115d1f9d9bd29064ab981e57c8fc8cdf +folderAsset: yes +DefaultImporter: + userData: + assetBundleName: diff --git a/Assets/Packages/Standard Assets/Effects/ImageEffects.meta b/Assets/Packages/Standard Assets/Effects/ImageEffects.meta new file mode 100644 index 0000000000000000000000000000000000000000..5b717ba4c51b72d6747bfe75d616d67fb2faef63 --- /dev/null +++ b/Assets/Packages/Standard Assets/Effects/ImageEffects.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: d6e0c95a128e14227939c51b5d9ad74e +folderAsset: yes +DefaultImporter: + userData: + assetBundleName: diff --git a/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts.meta b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts.meta new file mode 100644 index 0000000000000000000000000000000000000000..0ca768ea2e56f46d853859c17badca5894e5b1ec --- /dev/null +++ b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: cd3e1490c3d9a7a498538315414d5129 +folderAsset: yes +DefaultImporter: + userData: + assetBundleName: diff --git a/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/Antialiasing.cs b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/Antialiasing.cs new file mode 100644 index 0000000000000000000000000000000000000000..fdecc11b7f4bca54f73e504a5a47db6fb514399c --- /dev/null +++ b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/Antialiasing.cs @@ -0,0 +1,177 @@ +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/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/Antialiasing.cs.meta b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/Antialiasing.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..6284674da98e194c32b752ae31bdbd85b3bfef8d --- /dev/null +++ b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/Antialiasing.cs.meta @@ -0,0 +1,16 @@ +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/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/Bloom.cs b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/Bloom.cs new file mode 100644 index 0000000000000000000000000000000000000000..d5fd7a6d4e39a63b93a4ed274b517b48e1c48c2a --- /dev/null +++ b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/Bloom.cs @@ -0,0 +1,358 @@ +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) + doHdr = source.format == RenderTextureFormat.ARGBHalf && GetComponent().hdr; + 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/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/Bloom.cs.meta b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/Bloom.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..edcd45d53ca46f90c531bb626b40189047818103 --- /dev/null +++ b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/Bloom.cs.meta @@ -0,0 +1,17 @@ +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/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/BloomAndFlares.cs b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/BloomAndFlares.cs new file mode 100644 index 0000000000000000000000000000000000000000..3769c21cd4cfea2be995160c71c02b5cf6138b2f --- /dev/null +++ b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/BloomAndFlares.cs @@ -0,0 +1,314 @@ +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) + doHdr = source.format == RenderTextureFormat.ARGBHalf && GetComponent().hdr; + 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/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/BloomAndFlares.cs.meta b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/BloomAndFlares.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..d3b3c7b435aa1b728997782fef4bcb10dba0e176 --- /dev/null +++ b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/BloomAndFlares.cs.meta @@ -0,0 +1,22 @@ +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/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/BloomOptimized.cs b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/BloomOptimized.cs new file mode 100644 index 0000000000000000000000000000000000000000..f7d9251bce7a6c9bb7dfa27ba1651226968d53f0 --- /dev/null +++ b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/BloomOptimized.cs @@ -0,0 +1,109 @@ +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/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/BloomOptimized.cs.meta b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/BloomOptimized.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..68dcfc14c15db7509a3efb43ced4ef577424770b --- /dev/null +++ b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/BloomOptimized.cs.meta @@ -0,0 +1,10 @@ +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/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/Blur.cs b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/Blur.cs new file mode 100644 index 0000000000000000000000000000000000000000..1db8a3f913838b3ff0d99b5c0a2d70f38da41a29 --- /dev/null +++ b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/Blur.cs @@ -0,0 +1,108 @@ +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/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/Blur.cs.meta b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/Blur.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..c4bb7e770c80352a3a3cd0d060ea120a3b18482b --- /dev/null +++ b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/Blur.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 34382083ad114a07d000fbfb8d76c639 +MonoImporter: + serializedVersion: 2 + defaultReferences: + - blurShader: {fileID: 4800000, guid: 57e6deea7c2924e22a5138e2b70bb4dc, type: 3} + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/BlurOptimized.cs b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/BlurOptimized.cs new file mode 100644 index 0000000000000000000000000000000000000000..c922dbe48a8df6d5c1605a21d5aa203294270c3d --- /dev/null +++ b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/BlurOptimized.cs @@ -0,0 +1,93 @@ +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/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/BlurOptimized.cs.meta b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/BlurOptimized.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..47ca17b3133479e49c249990709a64abc6f0b16d --- /dev/null +++ b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/BlurOptimized.cs.meta @@ -0,0 +1,10 @@ +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/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/CameraMotionBlur.cs b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/CameraMotionBlur.cs new file mode 100644 index 0000000000000000000000000000000000000000..b9cba5d264099773fe54800cf3ff460b07f51934 --- /dev/null +++ b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/CameraMotionBlur.cs @@ -0,0 +1,408 @@ +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/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/CameraMotionBlur.cs.meta b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/CameraMotionBlur.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..ef1820098b8ccc34281c3a251b64c99f1d9ca1b4 --- /dev/null +++ b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/CameraMotionBlur.cs.meta @@ -0,0 +1,14 @@ +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/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/ColorCorrectionCurves.cs b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/ColorCorrectionCurves.cs new file mode 100644 index 0000000000000000000000000000000000000000..0425da96f2803fd9229b540621b2caabd52bcbe0 --- /dev/null +++ b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/ColorCorrectionCurves.cs @@ -0,0 +1,181 @@ +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/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/ColorCorrectionCurves.cs.meta b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/ColorCorrectionCurves.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..e60e1660e98fc21178881c6e82799d6f64b70c05 --- /dev/null +++ b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/ColorCorrectionCurves.cs.meta @@ -0,0 +1,15 @@ +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/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/ColorCorrectionLookup.cs b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/ColorCorrectionLookup.cs new file mode 100644 index 0000000000000000000000000000000000000000..e85bb595f1c6c499661491dfb5c5cd46c34f9e80 --- /dev/null +++ b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/ColorCorrectionLookup.cs @@ -0,0 +1,130 @@ +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/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/ColorCorrectionLookup.cs.meta b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/ColorCorrectionLookup.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..82f6837f9ae460a37abcc08be8b6c9401797e315 --- /dev/null +++ b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/ColorCorrectionLookup.cs.meta @@ -0,0 +1,11 @@ +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/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/ColorCorrectionRamp.cs b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/ColorCorrectionRamp.cs new file mode 100644 index 0000000000000000000000000000000000000000..ae594f8bfc59e797c0e62756a194a092f1dd392a --- /dev/null +++ b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/ColorCorrectionRamp.cs @@ -0,0 +1,17 @@ +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/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/ColorCorrectionRamp.cs.meta b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/ColorCorrectionRamp.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..009d84159d76605008ca1e8c894f94c832bdbdc0 --- /dev/null +++ b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/ColorCorrectionRamp.cs.meta @@ -0,0 +1,10 @@ +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/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/ContrastEnhance.cs b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/ContrastEnhance.cs new file mode 100644 index 0000000000000000000000000000000000000000..00c28201b6106f4639d5f20c5912229a9666c9e7 --- /dev/null +++ b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/ContrastEnhance.cs @@ -0,0 +1,80 @@ +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/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/ContrastEnhance.cs.meta b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/ContrastEnhance.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..c469a7cff54330fd11f8dcd39dbace403904b481 --- /dev/null +++ b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/ContrastEnhance.cs.meta @@ -0,0 +1,13 @@ +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/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/ContrastStretch.cs b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/ContrastStretch.cs new file mode 100644 index 0000000000000000000000000000000000000000..a349d5c0821182e117ce88a907597a2d1e10c7c6 --- /dev/null +++ b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/ContrastStretch.cs @@ -0,0 +1,200 @@ +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/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/ContrastStretch.cs.meta b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/ContrastStretch.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..a9285bb9e1ede1a137714d3987ea288ee13621b7 --- /dev/null +++ b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/ContrastStretch.cs.meta @@ -0,0 +1,12 @@ +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/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/CreaseShading.cs b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/CreaseShading.cs new file mode 100644 index 0000000000000000000000000000000000000000..a26d007dc4b35fb6ae05ad405215bccdb874038b --- /dev/null +++ b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/CreaseShading.cs @@ -0,0 +1,82 @@ +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/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/CreaseShading.cs.meta b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/CreaseShading.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..c6ebebe06962b0f11ca8ccb45e544ea7b5b16899 --- /dev/null +++ b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/CreaseShading.cs.meta @@ -0,0 +1,12 @@ +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/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/DepthOfField.cs b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/DepthOfField.cs new file mode 100644 index 0000000000000000000000000000000000000000..59aee655761ac87f41463615bed1db7fe180e4ac --- /dev/null +++ b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/DepthOfField.cs @@ -0,0 +1,387 @@ +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/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/DepthOfField.cs.meta b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/DepthOfField.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..82a4f57d80f88ce89333f42a2465cb662c299c12 --- /dev/null +++ b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/DepthOfField.cs.meta @@ -0,0 +1,13 @@ +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/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/DepthOfFieldDeprecated.cs b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/DepthOfFieldDeprecated.cs new file mode 100644 index 0000000000000000000000000000000000000000..c0953df6231386d10854ea5863225728f6ebd7f2 --- /dev/null +++ b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/DepthOfFieldDeprecated.cs @@ -0,0 +1,427 @@ +using System; +using UnityEngine; + +namespace UnityStandardAssets.ImageEffects +{ + [ExecuteInEditMode] + [RequireComponent (typeof(Camera))] + [AddComponentMenu ("Image Effects/Camera/Depth of Field (deprecated)") ] + public class DepthOfFieldDeprecated : PostEffectsBase + { + public enum Dof34QualitySetting + { + OnlyBackground = 1, + BackgroundAndForeground = 2, + } + + public enum DofResolution + { + High = 2, + Medium = 3, + Low = 4, + } + + public enum DofBlurriness + { + Low = 1, + High = 2, + VeryHigh = 4, + } + + public enum BokehDestination + { + Background = 0x1, + Foreground = 0x2, + BackgroundAndForeground = 0x3, + } + + static private int SMOOTH_DOWNSAMPLE_PASS = 6; + static private float BOKEH_EXTRA_BLUR = 2.0f; + + public Dof34QualitySetting quality = Dof34QualitySetting.OnlyBackground; + public DofResolution resolution = DofResolution.Low; + public bool simpleTweakMode = true; + + public float focalPoint = 1.0f; + public float smoothness = 0.5f; + + public float focalZDistance = 0.0f; + public float focalZStartCurve = 1.0f; + public float focalZEndCurve = 1.0f; + + private float focalStartCurve = 2.0f; + private float focalEndCurve = 2.0f; + private float focalDistance01 = 0.1f; + + public Transform objectFocus = null; + public float focalSize = 0.0f; + + public DofBlurriness bluriness = DofBlurriness.High; + public float maxBlurSpread = 1.75f; + + public float foregroundBlurExtrude = 1.15f; + + public Shader dofBlurShader; + private Material dofBlurMaterial = null; + + public Shader dofShader; + private Material dofMaterial = null; + + public bool visualize = false; + public BokehDestination bokehDestination = BokehDestination.Background; + + private float widthOverHeight = 1.25f; + private float oneOverBaseSize = 1.0f / 512.0f; + + public bool bokeh = false; + public bool bokehSupport = true; + public Shader bokehShader; + public Texture2D bokehTexture; + public float bokehScale = 2.4f; + public float bokehIntensity = 0.15f; + public float bokehThresholdContrast = 0.1f; + public float bokehThresholdLuminance = 0.55f; + public int bokehDownsample = 1; + private Material bokehMaterial; + + private Camera _camera; + + void CreateMaterials () { + dofBlurMaterial = CheckShaderAndCreateMaterial (dofBlurShader, dofBlurMaterial); + dofMaterial = CheckShaderAndCreateMaterial (dofShader,dofMaterial); + bokehSupport = bokehShader.isSupported; + + if (bokeh && bokehSupport && bokehShader) + bokehMaterial = CheckShaderAndCreateMaterial (bokehShader, bokehMaterial); + } + + + public override bool CheckResources () { + CheckSupport (true); + + dofBlurMaterial = CheckShaderAndCreateMaterial (dofBlurShader, dofBlurMaterial); + dofMaterial = CheckShaderAndCreateMaterial (dofShader,dofMaterial); + bokehSupport = bokehShader.isSupported; + + if (bokeh && bokehSupport && bokehShader) + bokehMaterial = CheckShaderAndCreateMaterial (bokehShader, bokehMaterial); + + if (!isSupported) + ReportAutoDisable (); + return isSupported; + } + + void OnDisable () { + Quads.Cleanup (); + } + + void OnEnable () { + _camera = GetComponent(); + _camera.depthTextureMode |= DepthTextureMode.Depth; + } + + float FocalDistance01 ( float worldDist) { + return _camera.WorldToViewportPoint((worldDist-_camera.nearClipPlane) * _camera.transform.forward + _camera.transform.position).z / (_camera.farClipPlane-_camera.nearClipPlane); + } + + int GetDividerBasedOnQuality () { + int divider = 1; + if (resolution == DofResolution.Medium) + divider = 2; + else if (resolution == DofResolution.Low) + divider = 2; + return divider; + } + + int GetLowResolutionDividerBasedOnQuality ( int baseDivider) { + int lowTexDivider = baseDivider; + if (resolution == DofResolution.High) + lowTexDivider *= 2; + if (resolution == DofResolution.Low) + lowTexDivider *= 2; + return lowTexDivider; + } + + private RenderTexture foregroundTexture = null; + private RenderTexture mediumRezWorkTexture = null; + private RenderTexture finalDefocus = null; + private RenderTexture lowRezWorkTexture = null; + private RenderTexture bokehSource = null; + private RenderTexture bokehSource2 = null; + + void OnRenderImage (RenderTexture source, RenderTexture destination) { + if (CheckResources()==false) { + Graphics.Blit (source, destination); + return; + } + + if (smoothness < 0.1f) + smoothness = 0.1f; + + // update needed focal & rt size parameter + + bokeh = bokeh && bokehSupport; + float bokehBlurAmplifier = bokeh ? BOKEH_EXTRA_BLUR : 1.0f; + + bool blurForeground = quality > Dof34QualitySetting.OnlyBackground; + float focal01Size = focalSize / (_camera.farClipPlane - _camera.nearClipPlane);; + + if (simpleTweakMode) { + focalDistance01 = objectFocus ? (_camera.WorldToViewportPoint (objectFocus.position)).z / (_camera.farClipPlane) : FocalDistance01 (focalPoint); + focalStartCurve = focalDistance01 * smoothness; + focalEndCurve = focalStartCurve; + blurForeground = blurForeground && (focalPoint > (_camera.nearClipPlane + Mathf.Epsilon)); + } + else { + if (objectFocus) { + var vpPoint= _camera.WorldToViewportPoint (objectFocus.position); + vpPoint.z = (vpPoint.z) / (_camera.farClipPlane); + focalDistance01 = vpPoint.z; + } + else + focalDistance01 = FocalDistance01 (focalZDistance); + + focalStartCurve = focalZStartCurve; + focalEndCurve = focalZEndCurve; + blurForeground = blurForeground && (focalPoint > (_camera.nearClipPlane + Mathf.Epsilon)); + } + + widthOverHeight = (1.0f * source.width) / (1.0f * source.height); + oneOverBaseSize = 1.0f / 512.0f; + + dofMaterial.SetFloat ("_ForegroundBlurExtrude", foregroundBlurExtrude); + dofMaterial.SetVector ("_CurveParams", new Vector4 (simpleTweakMode ? 1.0f / focalStartCurve : focalStartCurve, simpleTweakMode ? 1.0f / focalEndCurve : focalEndCurve, focal01Size * 0.5f, focalDistance01)); + dofMaterial.SetVector ("_InvRenderTargetSize", new Vector4 (1.0f / (1.0f * source.width), 1.0f / (1.0f * source.height),0.0f,0.0f)); + + int divider = GetDividerBasedOnQuality (); + int lowTexDivider = GetLowResolutionDividerBasedOnQuality (divider); + + AllocateTextures (blurForeground, source, divider, lowTexDivider); + + // WRITE COC to alpha channel + // source is only being bound to detect y texcoord flip + Graphics.Blit (source, source, dofMaterial, 3); + + // better DOWNSAMPLE (could actually be weighted for higher quality) + Downsample (source, mediumRezWorkTexture); + + // BLUR A LITTLE first, which has two purposes + // 1.) reduce jitter, noise, aliasing + // 2.) produce the little-blur buffer used in composition later + Blur (mediumRezWorkTexture, mediumRezWorkTexture, DofBlurriness.Low, 4, maxBlurSpread); + + if ((bokeh) && ((BokehDestination.Foreground & bokehDestination) != 0)) + { + dofMaterial.SetVector ("_Threshhold", new Vector4(bokehThresholdContrast, bokehThresholdLuminance, 0.95f, 0.0f)); + + // add and mark the parts that should end up as bokeh shapes + Graphics.Blit (mediumRezWorkTexture, bokehSource2, dofMaterial, 11); + + // remove those parts (maybe even a little tittle bittle more) from the regurlarly blurred buffer + //Graphics.Blit (mediumRezWorkTexture, lowRezWorkTexture, dofMaterial, 10); + Graphics.Blit (mediumRezWorkTexture, lowRezWorkTexture);//, dofMaterial, 10); + + // maybe you want to reblur the small blur ... but not really needed. + //Blur (mediumRezWorkTexture, mediumRezWorkTexture, DofBlurriness.Low, 4, maxBlurSpread); + + // bigger BLUR + Blur (lowRezWorkTexture, lowRezWorkTexture, bluriness, 0, maxBlurSpread * bokehBlurAmplifier); + } + else { + // bigger BLUR + Downsample (mediumRezWorkTexture, lowRezWorkTexture); + Blur (lowRezWorkTexture, lowRezWorkTexture, bluriness, 0, maxBlurSpread); + } + + dofBlurMaterial.SetTexture ("_TapLow", lowRezWorkTexture); + dofBlurMaterial.SetTexture ("_TapMedium", mediumRezWorkTexture); + Graphics.Blit (null, finalDefocus, dofBlurMaterial, 3); + + // we are only adding bokeh now if the background is the only part we have to deal with + if ((bokeh) && ((BokehDestination.Foreground & bokehDestination) != 0)) + AddBokeh (bokehSource2, bokehSource, finalDefocus); + + dofMaterial.SetTexture ("_TapLowBackground", finalDefocus); + dofMaterial.SetTexture ("_TapMedium", mediumRezWorkTexture); // needed for debugging/visualization + + // FINAL DEFOCUS (background) + Graphics.Blit (source, blurForeground ? foregroundTexture : destination, dofMaterial, visualize ? 2 : 0); + + // FINAL DEFOCUS (foreground) + if (blurForeground) { + // WRITE COC to alpha channel + Graphics.Blit (foregroundTexture, source, dofMaterial, 5); + + // DOWNSAMPLE (unweighted) + Downsample (source, mediumRezWorkTexture); + + // BLUR A LITTLE first, which has two purposes + // 1.) reduce jitter, noise, aliasing + // 2.) produce the little-blur buffer used in composition later + BlurFg (mediumRezWorkTexture, mediumRezWorkTexture, DofBlurriness.Low, 2, maxBlurSpread); + + if ((bokeh) && ((BokehDestination.Foreground & bokehDestination) != 0)) + { + dofMaterial.SetVector ("_Threshhold", new Vector4(bokehThresholdContrast * 0.5f, bokehThresholdLuminance, 0.0f, 0.0f)); + + // add and mark the parts that should end up as bokeh shapes + Graphics.Blit (mediumRezWorkTexture, bokehSource2, dofMaterial, 11); + + // remove the parts (maybe even a little tittle bittle more) that will end up in bokeh space + //Graphics.Blit (mediumRezWorkTexture, lowRezWorkTexture, dofMaterial, 10); + Graphics.Blit (mediumRezWorkTexture, lowRezWorkTexture);//, dofMaterial, 10); + + // big BLUR + BlurFg (lowRezWorkTexture, lowRezWorkTexture, bluriness, 1, maxBlurSpread * bokehBlurAmplifier); + } + else { + // big BLUR + BlurFg (mediumRezWorkTexture, lowRezWorkTexture, bluriness, 1, maxBlurSpread); + } + + // simple upsample once + Graphics.Blit (lowRezWorkTexture, finalDefocus); + + dofMaterial.SetTexture ("_TapLowForeground", finalDefocus); + Graphics.Blit (source, destination, dofMaterial, visualize ? 1 : 4); + + if ((bokeh) && ((BokehDestination.Foreground & bokehDestination) != 0)) + AddBokeh (bokehSource2, bokehSource, destination); + } + + ReleaseTextures (); + } + + void Blur ( RenderTexture from, RenderTexture to, DofBlurriness iterations, int blurPass, float spread) { + RenderTexture tmp = RenderTexture.GetTemporary (to.width, to.height); + if ((int)iterations > 1) { + BlurHex (from, to, blurPass, spread, tmp); + if ((int)iterations > 2) { + dofBlurMaterial.SetVector ("offsets", new Vector4 (0.0f, spread * oneOverBaseSize, 0.0f, 0.0f)); + Graphics.Blit (to, tmp, dofBlurMaterial, blurPass); + dofBlurMaterial.SetVector ("offsets", new Vector4 (spread / widthOverHeight * oneOverBaseSize, 0.0f, 0.0f, 0.0f)); + Graphics.Blit (tmp, to, dofBlurMaterial, blurPass); + } + } + else { + dofBlurMaterial.SetVector ("offsets", new Vector4 (0.0f, spread * oneOverBaseSize, 0.0f, 0.0f)); + Graphics.Blit (from, tmp, dofBlurMaterial, blurPass); + dofBlurMaterial.SetVector ("offsets", new Vector4 (spread / widthOverHeight * oneOverBaseSize, 0.0f, 0.0f, 0.0f)); + Graphics.Blit (tmp, to, dofBlurMaterial, blurPass); + } + RenderTexture.ReleaseTemporary (tmp); + } + + void BlurFg ( RenderTexture from, RenderTexture to, DofBlurriness iterations, int blurPass, float spread) { + // we want a nice, big coc, hence we need to tap once from this (higher resolution) texture + dofBlurMaterial.SetTexture ("_TapHigh", from); + + RenderTexture tmp = RenderTexture.GetTemporary (to.width, to.height); + if ((int)iterations > 1) { + BlurHex (from, to, blurPass, spread, tmp); + if ((int)iterations > 2) { + dofBlurMaterial.SetVector ("offsets", new Vector4 (0.0f, spread * oneOverBaseSize, 0.0f, 0.0f)); + Graphics.Blit (to, tmp, dofBlurMaterial, blurPass); + dofBlurMaterial.SetVector ("offsets", new Vector4 (spread / widthOverHeight * oneOverBaseSize, 0.0f, 0.0f, 0.0f)); + Graphics.Blit (tmp, to, dofBlurMaterial, blurPass); + } + } + else { + dofBlurMaterial.SetVector ("offsets", new Vector4 (0.0f, spread * oneOverBaseSize, 0.0f, 0.0f)); + Graphics.Blit (from, tmp, dofBlurMaterial, blurPass); + dofBlurMaterial.SetVector ("offsets", new Vector4 (spread / widthOverHeight * oneOverBaseSize, 0.0f, 0.0f, 0.0f)); + Graphics.Blit (tmp, to, dofBlurMaterial, blurPass); + } + RenderTexture.ReleaseTemporary (tmp); + } + + void BlurHex ( RenderTexture from, RenderTexture to, int blurPass, float spread, RenderTexture tmp) { + dofBlurMaterial.SetVector ("offsets", new Vector4 (0.0f, spread * oneOverBaseSize, 0.0f, 0.0f)); + Graphics.Blit (from, tmp, dofBlurMaterial, blurPass); + dofBlurMaterial.SetVector ("offsets", new Vector4 (spread / widthOverHeight * oneOverBaseSize, 0.0f, 0.0f, 0.0f)); + Graphics.Blit (tmp, to, dofBlurMaterial, blurPass); + dofBlurMaterial.SetVector ("offsets", new Vector4 (spread / widthOverHeight * oneOverBaseSize, spread * oneOverBaseSize, 0.0f, 0.0f)); + Graphics.Blit (to, tmp, dofBlurMaterial, blurPass); + dofBlurMaterial.SetVector ("offsets", new Vector4 (spread / widthOverHeight * oneOverBaseSize, -spread * oneOverBaseSize, 0.0f, 0.0f)); + Graphics.Blit (tmp, to, dofBlurMaterial, blurPass); + } + + void Downsample ( RenderTexture from, RenderTexture to) { + dofMaterial.SetVector ("_InvRenderTargetSize", new Vector4 (1.0f / (1.0f * to.width), 1.0f / (1.0f * to.height), 0.0f, 0.0f)); + Graphics.Blit (from, to, dofMaterial, SMOOTH_DOWNSAMPLE_PASS); + } + + void AddBokeh ( RenderTexture bokehInfo, RenderTexture tempTex, RenderTexture finalTarget) { + if (bokehMaterial) { + var meshes = Quads.GetMeshes (tempTex.width, tempTex.height); // quads: exchanging more triangles with less overdraw + + RenderTexture.active = tempTex; + GL.Clear (false, true, new Color (0.0f, 0.0f, 0.0f, 0.0f)); + + GL.PushMatrix (); + GL.LoadIdentity (); + + // point filter mode is important, otherwise we get bokeh shape & size artefacts + bokehInfo.filterMode = FilterMode.Point; + + float arW = (bokehInfo.width * 1.0f) / (bokehInfo.height * 1.0f); + float sc = 2.0f / (1.0f * bokehInfo.width); + sc += bokehScale * maxBlurSpread * BOKEH_EXTRA_BLUR * oneOverBaseSize; + + bokehMaterial.SetTexture ("_Source", bokehInfo); + bokehMaterial.SetTexture ("_MainTex", bokehTexture); + bokehMaterial.SetVector ("_ArScale",new Vector4 (sc, sc * arW, 0.5f, 0.5f * arW)); + bokehMaterial.SetFloat ("_Intensity", bokehIntensity); + bokehMaterial.SetPass (0); + + foreach(Mesh m in meshes) + if (m) Graphics.DrawMeshNow (m, Matrix4x4.identity); + + GL.PopMatrix (); + + Graphics.Blit (tempTex, finalTarget, dofMaterial, 8); + + // important to set back as we sample from this later on + bokehInfo.filterMode = FilterMode.Bilinear; + } + } + + + void ReleaseTextures () { + if (foregroundTexture) RenderTexture.ReleaseTemporary (foregroundTexture); + if (finalDefocus) RenderTexture.ReleaseTemporary (finalDefocus); + if (mediumRezWorkTexture) RenderTexture.ReleaseTemporary (mediumRezWorkTexture); + if (lowRezWorkTexture) RenderTexture.ReleaseTemporary (lowRezWorkTexture); + if (bokehSource) RenderTexture.ReleaseTemporary (bokehSource); + if (bokehSource2) RenderTexture.ReleaseTemporary (bokehSource2); + } + + void AllocateTextures ( bool blurForeground, RenderTexture source, int divider, int lowTexDivider) { + foregroundTexture = null; + if (blurForeground) + foregroundTexture = RenderTexture.GetTemporary (source.width, source.height, 0); + mediumRezWorkTexture = RenderTexture.GetTemporary (source.width / divider, source.height / divider, 0); + finalDefocus = RenderTexture.GetTemporary (source.width / divider, source.height / divider, 0); + lowRezWorkTexture = RenderTexture.GetTemporary (source.width / lowTexDivider, source.height / lowTexDivider, 0); + bokehSource = null; + bokehSource2 = null; + if (bokeh) { + bokehSource = RenderTexture.GetTemporary (source.width / (lowTexDivider * bokehDownsample), source.height / (lowTexDivider * bokehDownsample), 0, RenderTextureFormat.ARGBHalf); + bokehSource2 = RenderTexture.GetTemporary (source.width / (lowTexDivider * bokehDownsample), source.height / (lowTexDivider * bokehDownsample), 0, RenderTextureFormat.ARGBHalf); + bokehSource.filterMode = FilterMode.Bilinear; + bokehSource2.filterMode = FilterMode.Bilinear; + RenderTexture.active = bokehSource2; + GL.Clear (false, true, new Color(0.0f, 0.0f, 0.0f, 0.0f)); + } + + // to make sure: always use bilinear filter setting + + source.filterMode = FilterMode.Bilinear; + finalDefocus.filterMode = FilterMode.Bilinear; + mediumRezWorkTexture.filterMode = FilterMode.Bilinear; + lowRezWorkTexture.filterMode = FilterMode.Bilinear; + if (foregroundTexture) + foregroundTexture.filterMode = FilterMode.Bilinear; + } + } +} diff --git a/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/DepthOfFieldDeprecated.cs.meta b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/DepthOfFieldDeprecated.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..b252a6ce5c31fc6df5e59c7eb805955a44a72bfb --- /dev/null +++ b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/DepthOfFieldDeprecated.cs.meta @@ -0,0 +1,14 @@ +fileFormatVersion: 2 +guid: 83d8db0ec466c14429f58c68c16398a1 +MonoImporter: + serializedVersion: 2 + defaultReferences: + - objectFocus: {instanceID: 0} + - dofBlurShader: {fileID: 4800000, guid: bb4af680337344a4abad65a4e8873c50, type: 3} + - dofShader: {fileID: 4800000, guid: 987fb0677d01f43ce8a9dbf12271e668, type: 3} + - bokehShader: {fileID: 4800000, guid: 57cdacf9b217546aaa18edf39a6151c0, type: 3} + - bokehTexture: {fileID: 2800000, guid: fc00ec05a89da4ff695a4273715cd5ce, type: 3} + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/EdgeDetection.cs b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/EdgeDetection.cs new file mode 100644 index 0000000000000000000000000000000000000000..9f95aa0fd2d56420bed2a5f3bc21821a15b202b5 --- /dev/null +++ b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/EdgeDetection.cs @@ -0,0 +1,89 @@ +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/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/EdgeDetection.cs.meta b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/EdgeDetection.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..22ad6e8d5e68f29f930febb3281179aa00dc5918 --- /dev/null +++ b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/EdgeDetection.cs.meta @@ -0,0 +1,10 @@ +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/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/Fisheye.cs b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/Fisheye.cs new file mode 100644 index 0000000000000000000000000000000000000000..069affa787b85541708f22c1fff0f18c3b5d5e5b --- /dev/null +++ b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/Fisheye.cs @@ -0,0 +1,46 @@ +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/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/Fisheye.cs.meta b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/Fisheye.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..deb7976c438f9eade827a167136a399ab283eb40 --- /dev/null +++ b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/Fisheye.cs.meta @@ -0,0 +1,10 @@ +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/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/GlobalFog.cs b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/GlobalFog.cs new file mode 100644 index 0000000000000000000000000000000000000000..3d17fc2f9c668bb1998f4d4abefa8100b201c0e7 --- /dev/null +++ b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/GlobalFog.cs @@ -0,0 +1,100 @@ +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/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/GlobalFog.cs.meta b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/GlobalFog.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..fa21d256185eec082f172864aea13b3cfa2d1800 --- /dev/null +++ b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/GlobalFog.cs.meta @@ -0,0 +1,10 @@ +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/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/Grayscale.cs b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/Grayscale.cs new file mode 100644 index 0000000000000000000000000000000000000000..369d5cdee71f72ea5ffc23967d3c8c3b3fbfee3f --- /dev/null +++ b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/Grayscale.cs @@ -0,0 +1,21 @@ +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/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/Grayscale.cs.meta b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/Grayscale.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..b23db6236a5209628e132ddff519f6d5f0038411 --- /dev/null +++ b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/Grayscale.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 243a781cad112c75d0008dfa8d76c639 +MonoImporter: + serializedVersion: 2 + defaultReferences: + - shader: {fileID: 4800000, guid: daf9781cad112c75d0008dfa8d76c639, type: 3} + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/ImageEffectBase.cs b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/ImageEffectBase.cs new file mode 100644 index 0000000000000000000000000000000000000000..0158215fac08ac1929cffcb861d8ea693ee49412 --- /dev/null +++ b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/ImageEffectBase.cs @@ -0,0 +1,55 @@ +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/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/ImageEffectBase.cs.meta b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/ImageEffectBase.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..f3c002508f9544d83a63655a60ef56123b881cbc --- /dev/null +++ b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/ImageEffectBase.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: f6469eb0ad1119d6d00011d98d76c639 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/ImageEffects.cs b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/ImageEffects.cs new file mode 100644 index 0000000000000000000000000000000000000000..c8d4afceeffe112b8ea1bdc86af73a3531ea0b26 --- /dev/null +++ b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/ImageEffects.cs @@ -0,0 +1,42 @@ +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/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/ImageEffects.cs.meta b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/ImageEffects.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..9d82a1114510ad721f1cb9b2c326eedf9a9950be --- /dev/null +++ b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/ImageEffects.cs.meta @@ -0,0 +1,17 @@ +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/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/MotionBlur.cs b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/MotionBlur.cs new file mode 100644 index 0000000000000000000000000000000000000000..2b7968bab76213c58b307dce4beeacbe688c41d9 --- /dev/null +++ b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/MotionBlur.cs @@ -0,0 +1,71 @@ +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/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/MotionBlur.cs.meta b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/MotionBlur.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..5fe9ed8aefd76c86e75b8ca4f51d14d42cd32f7e --- /dev/null +++ b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/MotionBlur.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 478a2083ad114a07d000fbfb8d76c639 +MonoImporter: + serializedVersion: 2 + defaultReferences: + - shader: {fileID: 4800000, guid: e9ba2083ad114a07d000fbfb8d76c639, type: 3} + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/NoiseAndGrain.cs b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/NoiseAndGrain.cs new file mode 100644 index 0000000000000000000000000000000000000000..3230bdb940cf0d9a9be10a2ddadfbbe406c89545 --- /dev/null +++ b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/NoiseAndGrain.cs @@ -0,0 +1,181 @@ +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/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/NoiseAndGrain.cs.meta b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/NoiseAndGrain.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..6d740fcafb260c11c75d80bb695313bcaa1717b2 --- /dev/null +++ b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/NoiseAndGrain.cs.meta @@ -0,0 +1,12 @@ +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/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/NoiseAndScratches.cs b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/NoiseAndScratches.cs new file mode 100644 index 0000000000000000000000000000000000000000..4f894a93e63d75828d4a444ed7bffb390a919763 --- /dev/null +++ b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/NoiseAndScratches.cs @@ -0,0 +1,142 @@ +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/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/NoiseAndScratches.cs.meta b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/NoiseAndScratches.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..6d5b8214f44aba6f0d7c8f8b249fdba8a77048b9 --- /dev/null +++ b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/NoiseAndScratches.cs.meta @@ -0,0 +1,12 @@ +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/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/PostEffectsBase.cs b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/PostEffectsBase.cs new file mode 100644 index 0000000000000000000000000000000000000000..9dc4be9fd199c72f2095c66415bdbbee0048f247 --- /dev/null +++ b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/PostEffectsBase.cs @@ -0,0 +1,261 @@ +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/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/PostEffectsBase.cs.meta b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/PostEffectsBase.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..a310534247b83369fc8293f7db55cc2a1b940f11 --- /dev/null +++ b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/PostEffectsBase.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: b6f4318ec6c2bf643a0f9edfeeaba0ec +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/PostEffectsHelper.cs b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/PostEffectsHelper.cs new file mode 100644 index 0000000000000000000000000000000000000000..156370f3b16adf0ce4a58f96582a4fcd108d5dc1 --- /dev/null +++ b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/PostEffectsHelper.cs @@ -0,0 +1,188 @@ +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/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/PostEffectsHelper.cs.meta b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/PostEffectsHelper.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..4ccd0332ec55c0bb9307f652f6c5478b2e7d536a --- /dev/null +++ b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/PostEffectsHelper.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 50b03df8f04b5c441aaac5b7fccb4734 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/Quads.cs b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/Quads.cs new file mode 100644 index 0000000000000000000000000000000000000000..3d2cacac2f15641568f49f6febfc40010b28ae85 --- /dev/null +++ b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/Quads.cs @@ -0,0 +1,125 @@ +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/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/Quads.cs.meta b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/Quads.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..14c9d592541199a971a90eb0eb698706f72cb048 --- /dev/null +++ b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/Quads.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: a20852ce049f64e4695a48b6a354be83 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/ScreenOverlay.cs b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/ScreenOverlay.cs new file mode 100644 index 0000000000000000000000000000000000000000..790593ce03dca705034ac050f45063005b55612d --- /dev/null +++ b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/ScreenOverlay.cs @@ -0,0 +1,69 @@ +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/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/ScreenOverlay.cs.meta b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/ScreenOverlay.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..75c03f9a23e93be731d4675c4fe22e558717763a --- /dev/null +++ b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/ScreenOverlay.cs.meta @@ -0,0 +1,11 @@ +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/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/ScreenSpaceAmbientObscurance.cs b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/ScreenSpaceAmbientObscurance.cs new file mode 100644 index 0000000000000000000000000000000000000000..c6b794977a9428f60c5b78353cc2bc01dcfae6f5 --- /dev/null +++ b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/ScreenSpaceAmbientObscurance.cs @@ -0,0 +1,123 @@ +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/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/ScreenSpaceAmbientObscurance.cs.meta b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/ScreenSpaceAmbientObscurance.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..99d4452718b957ff61939150ee8ab1c11f925213 --- /dev/null +++ b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/ScreenSpaceAmbientObscurance.cs.meta @@ -0,0 +1,11 @@ +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/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/ScreenSpaceAmbientOcclusion.cs b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/ScreenSpaceAmbientOcclusion.cs new file mode 100644 index 0000000000000000000000000000000000000000..7981ff8f6ed1f0aeb40e726c09a738b611e8061f --- /dev/null +++ b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/ScreenSpaceAmbientOcclusion.cs @@ -0,0 +1,205 @@ +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/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/ScreenSpaceAmbientOcclusion.cs.meta b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/ScreenSpaceAmbientOcclusion.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..8fda23ba6dc6710ca57a442576d40a4c74d2b747 --- /dev/null +++ b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/ScreenSpaceAmbientOcclusion.cs.meta @@ -0,0 +1,10 @@ +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/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/SepiaTone.cs b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/SepiaTone.cs new file mode 100644 index 0000000000000000000000000000000000000000..86ac0c12a8e674955400a80c317b4ab3e99ca032 --- /dev/null +++ b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/SepiaTone.cs @@ -0,0 +1,16 @@ +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/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/SepiaTone.cs.meta b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/SepiaTone.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..94ff94c890fbe278d1169e9adcb8e367b8145ca6 --- /dev/null +++ b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/SepiaTone.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: a07a781cad112c75d0008dfa8d76c639 +MonoImporter: + serializedVersion: 2 + defaultReferences: + - shader: {fileID: 4800000, guid: b6aa781cad112c75d0008dfa8d76c639, type: 3} + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/SunShafts.cs b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/SunShafts.cs new file mode 100644 index 0000000000000000000000000000000000000000..480ef259fe018d00df80e23a9f1c00c14638928e --- /dev/null +++ b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/SunShafts.cs @@ -0,0 +1,147 @@ +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) { + var format= GetComponent().hdr ? RenderTextureFormat.DefaultHDR: RenderTextureFormat.Default; + 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/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/SunShafts.cs.meta b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/SunShafts.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..acf1863d29514551dae3cf8da02e947c32cbd476 --- /dev/null +++ b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/SunShafts.cs.meta @@ -0,0 +1,12 @@ +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/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/TiltShift.cs b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/TiltShift.cs new file mode 100644 index 0000000000000000000000000000000000000000..c5a23c9c7a53efd43111b7b9c2f802ab5c849726 --- /dev/null +++ b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/TiltShift.cs @@ -0,0 +1,76 @@ +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/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/TiltShift.cs.meta b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/TiltShift.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..6fb44f4174d47bf7a8b6f51d6c91b532ccaf389c --- /dev/null +++ b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/TiltShift.cs.meta @@ -0,0 +1,10 @@ +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/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/Tonemapping.cs b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/Tonemapping.cs new file mode 100644 index 0000000000000000000000000000000000000000..665ee9870a9ba909cd7399efdbb1df35d4dcda9e --- /dev/null +++ b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/Tonemapping.cs @@ -0,0 +1,274 @@ +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/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/Tonemapping.cs.meta b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/Tonemapping.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..4443b428ac1c538aca7dfac235eba0d5e678dae1 --- /dev/null +++ b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/Tonemapping.cs.meta @@ -0,0 +1,10 @@ +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/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/Triangles.cs b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/Triangles.cs new file mode 100644 index 0000000000000000000000000000000000000000..516bded9b3af394aa4b6baa1f933b86713cddd38 --- /dev/null +++ b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/Triangles.cs @@ -0,0 +1,112 @@ +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/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/Triangles.cs.meta b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/Triangles.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..2ea56f0f02fe2433157a91115f3c41a24adf02cc --- /dev/null +++ b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/Triangles.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 18b91636de2ba3445913e4cf38528dc8 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/Twirl.cs b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/Twirl.cs new file mode 100644 index 0000000000000000000000000000000000000000..a7b57e934011ecb446e4ddcbf5ef7fbb1497ad06 --- /dev/null +++ b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/Twirl.cs @@ -0,0 +1,22 @@ +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/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/Twirl.cs.meta b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/Twirl.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..4b0b6c84ad22587ab092ef1e86693927c8faea6f --- /dev/null +++ b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/Twirl.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: bdda781cad112c75d0008dfa8d76c639 +MonoImporter: + serializedVersion: 2 + defaultReferences: + - shader: {fileID: 4800000, guid: 641b781cad112c75d0008dfa8d76c639, type: 3} + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/VignetteAndChromaticAberration.cs b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/VignetteAndChromaticAberration.cs new file mode 100644 index 0000000000000000000000000000000000000000..e34321b10326caca44ccf5fdf1587648626dfd4d --- /dev/null +++ b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/VignetteAndChromaticAberration.cs @@ -0,0 +1,114 @@ +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/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/VignetteAndChromaticAberration.cs.meta b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/VignetteAndChromaticAberration.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..6b6a8139f13683e16a1a28f64c6228dafa251b5b --- /dev/null +++ b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/VignetteAndChromaticAberration.cs.meta @@ -0,0 +1,14 @@ +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/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/Vortex.cs b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/Vortex.cs new file mode 100644 index 0000000000000000000000000000000000000000..8a2d8665e0d7af387a74e0d66b4c08a0b9066b5c --- /dev/null +++ b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/Vortex.cs @@ -0,0 +1,20 @@ +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/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/Vortex.cs.meta b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/Vortex.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..f6b808918f6e7cfa4e73186f2e80becbd858123e --- /dev/null +++ b/Assets/Packages/Standard Assets/Effects/ImageEffects/Scripts/Vortex.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: a94b781cad112c75d0008dfa8d76c639 +MonoImporter: + serializedVersion: 2 + defaultReferences: + - shader: {fileID: 4800000, guid: 708b781cad112c75d0008dfa8d76c639, type: 3} + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/Packages/Standard Assets/Effects/ImageEffects/Shaders.meta b/Assets/Packages/Standard Assets/Effects/ImageEffects/Shaders.meta new file mode 100644 index 0000000000000000000000000000000000000000..b68c7f9bbe7316a10dceff729937cbe135b025d8 --- /dev/null +++ b/Assets/Packages/Standard Assets/Effects/ImageEffects/Shaders.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: b2145489f7c704db8acb14a52bddeee9 +folderAsset: yes +DefaultImporter: + userData: + assetBundleName: diff --git a/Assets/Packages/Standard Assets/Effects/ImageEffects/Shaders/BlendModesOverlay.shader b/Assets/Packages/Standard Assets/Effects/ImageEffects/Shaders/BlendModesOverlay.shader new file mode 100644 index 0000000000000000000000000000000000000000..1910244b6cc99cd0d0d0d99a31356f085ab03fae --- /dev/null +++ b/Assets/Packages/Standard Assets/Effects/ImageEffects/Shaders/BlendModesOverlay.shader @@ -0,0 +1,138 @@ +// 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/Assets/Packages/Standard Assets/Effects/ImageEffects/Shaders/BlendModesOverlay.shader.meta b/Assets/Packages/Standard Assets/Effects/ImageEffects/Shaders/BlendModesOverlay.shader.meta new file mode 100644 index 0000000000000000000000000000000000000000..ebf8628a3e07b99650f78f8eee61997e660671a9 --- /dev/null +++ b/Assets/Packages/Standard Assets/Effects/ImageEffects/Shaders/BlendModesOverlay.shader.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: 8c81db0e527d24acc9bcec04e87781bd +ShaderImporter: + userData: diff --git a/Assets/Packages/Standard Assets/Effects/ImageEffects/Shaders/BlurEffectConeTaps.shader b/Assets/Packages/Standard Assets/Effects/ImageEffects/Shaders/BlurEffectConeTaps.shader new file mode 100644 index 0000000000000000000000000000000000000000..743667d8210971ddf56657464a91170824852589 --- /dev/null +++ b/Assets/Packages/Standard Assets/Effects/ImageEffects/Shaders/BlurEffectConeTaps.shader @@ -0,0 +1,54 @@ +// 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/Assets/Packages/Standard Assets/Effects/ImageEffects/Shaders/BlurEffectConeTaps.shader.meta b/Assets/Packages/Standard Assets/Effects/ImageEffects/Shaders/BlurEffectConeTaps.shader.meta new file mode 100644 index 0000000000000000000000000000000000000000..5d9fd5e4d0f6ac33d3d1f5316a0b5133772ba77f --- /dev/null +++ b/Assets/Packages/Standard Assets/Effects/ImageEffects/Shaders/BlurEffectConeTaps.shader.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: 57e6deea7c2924e22a5138e2b70bb4dc +ShaderImporter: + userData: diff --git a/Assets/Packages/Standard Assets/Effects/ImageEffects/Shaders/CameraMotionBlur.shader b/Assets/Packages/Standard Assets/Effects/ImageEffects/Shaders/CameraMotionBlur.shader new file mode 100644 index 0000000000000000000000000000000000000000..c9afc63dbe53c4ba35bb30ad57fac56e41ed9f59 --- /dev/null +++ b/Assets/Packages/Standard Assets/Effects/ImageEffects/Shaders/CameraMotionBlur.shader @@ -0,0 +1,534 @@ +// 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; l