This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /// ================ Half.cs ==================== | |
| /// The code is free to use for any reason without any restrictions. | |
| /// Ladislav Lang (2009), Joannes Vermorel (2017) | |
| using System; | |
| using System.Diagnostics; | |
| using System.Globalization; | |
| namespace SystemHalf | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using UnityEngine; | |
| /* | |
| Dual-Quaternions are an alternate encoding for rigid transforms (translation + rotation), | |
| with the special property that linear combinations will "arc" the translation in response | |
| to rotation, producing a skinning interpolation that prevents the kind of collapsing you | |
| get from simple linear interpolation of translations in their native coordinates. | |
| Copyright (c) 2018 Max Kaufmann |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using UnityEngine; | |
| using UnityEditor; | |
| using System; | |
| using System.Collections; | |
| [CustomPreview(typeof(YourCustomScriptableObject))] // THIS IS VERY IMPORTANT, this is so the editor knows what this is supposed to be previewing at all | |
| public class SkinnedMeshObjectPreviewExample : ObjectPreview { | |
| PreviewRenderUtility m_PreviewUtility; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // this code is under MIT License, by Robert Yang + others (credits in comments) | |
| // a lot of this is based on http://wiki.unity3d.com/index.php?title=SkinnedMeshCombiner | |
| // but I removed the atlasing stuff because I don't need it | |
| using UnityEngine; | |
| using System.Collections; | |
| using System.Collections.Generic; | |
| using System.Linq; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Shader "Custom/Texture2DArraySurfaceShader" | |
| { | |
| Properties | |
| { | |
| _Textures("Textures", 2DArray) = "" {} | |
| } | |
| SubShader | |
| { | |
| Tags { "RenderType"="Opaque" } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ^@/etc/init.d/%s^@/etc/cron.hourly/gcc.sh^@/etc/rc%d.d/S90%s^@/etc/rc.d/rc%d.d/S90%s^@--add^@chkconfig^@defaults^@update-rc.d^@^@sed -i '/\/etc\/cron.hourly$ | |
| Accept-Language: zh-cn | |
| User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; SV1; TencentTraveler ; .NET CLR 1.1.4322) | |
| ^@Connection: Keep-Alive | |
| ^@http://^@^@POST %s HTTP/1.1 | |
| %sHost: %s | |
| Content-Type: application/x-www-form-urlencoded | |
| Content-Length: %d | |
| %s%s^@GET %s HTTP/1.1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import binascii | |
| import itertools | |
| # XORs two byte strings together | |
| def xor_bytes(bytes1, bytes2): | |
| return [ chr(ord(a) ^ b) for (a, b) in zip(bytes1, bytes2) ] | |
| # XORs a ciphertext with the malware's hardcoded key, and repeats it until it's long enough to match the ciphertext length. | |
| def decrypt(cipher, key_hex = 'BB2FA36AAA9541F0'): | |
| key_bytes = [ ord(a) for a in key_hex ] |
NewerOlder