π
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
public static class ExtensionMethods | |
{ | |
public static TaskAwaiter GetAwaiter(this AsyncOperation asyncOp) | |
{ | |
var tcs = new TaskCompletionSource<object>(); | |
asyncOp.completed += obj => { tcs.SetResult(null); }; | |
return ((Task)tcs.Task).GetAwaiter(); | |
} | |
} |
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 "Universal Render Pipeline/Custom/VertexLit" | |
{ | |
Properties | |
{ | |
_MainTex ("Texture", 2D) = "white" {} | |
_Gain ("Gain", Float) = 1.5 | |
_Color ("Color", Color) = (1,1,1,1) | |
_EdgeColor ("Edge Color", Color) = (0,0,0,1) | |
[Toggle] _RemoveDiag("Remove diagonals", Float) = 0. |
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
bl_info = { | |
"name": "Run Script in PyConsole", | |
"author": "CoDEmanX", | |
"version": (1, 0), | |
"blender": (2, 80, 0), | |
"location": "Python Console > Console > Run Script", | |
"description": "Execute the code of a textblock within the python console.", | |
"warning": "", | |
"wiki_url": "", | |
"tracker_url": "", |
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
#define moire_mitigation_factor 64.0 | |
#define warpX 0.031 | |
#define warpY 0.041 | |
// Convert from linear to sRGB. | |
//float Srgb(float c){return(c<0.0031308?c*12.92:1.055*pow(c,0.41666)-0.055);} | |
vec4 Srgb(vec4 c){return pow(c, vec4(1.0 / 2.2));} | |
// Convert from sRGB to linear. | |
//float Linear(float c){return(c<=0.04045)?c/12.92:pow((c+0.055)/1.055,2.4);} |
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 System; | |
using UnityEngine; | |
[Serializable] | |
public struct MinMax | |
{ | |
[SerializeField] | |
private float min; | |
[SerializeField] |
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
#ifndef __QUATERNION_INCLUDED__ | |
#define __QUATERNION_INCLUDED__ | |
#define QUATERNION_IDENTITY float4(0, 0, 0, 1) | |
#ifndef PI | |
#define PI 3.14159265359f | |
#endif | |
// Quaternion multiplication |
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
{ | |
"emojis": [ | |
{"emoji": "π©βπ©βπ§βπ§", "name": "family: woman, woman, girl, girl", "shortname": ":woman_woman_girl_girl:", "unicode": "1F469 200D 1F469 200D 1F467 200D 1F467", "html": "👩‍👩‍👧‍👧", "category": "People & Body (family)", "order": ""}, | |
{"emoji": "π©βπ©βπ§βπ¦", "name": "family: woman, woman, girl, boy", "shortname": ":woman_woman_girl_boy:", "unicode": "1F469 200D 1F469 200D 1F467 200D 1F466", "html": "👩‍👩‍👧‍👦", "category": "People & Body (family)", "order": ""}, | |
{"emoji": "π©βπ©βπ¦βπ¦", "name": "family: woman, woman, boy, boy", "shortname": ":woman_woman_boy_boy:", "unicode": "1F469 200D 1F469 200D 1F466 200D 1F466", "html": "👩‍👩‍👦‍👦", "category": "People & Body (family)", "order": ""}, | |
{"emoji": "π¨βπ©βπ§βπ§", "name": "family: man, woman, girl, girl", "shortname": ":man_woman_girl_girl:", "unicode": "1F468 200D 1F469 200D 1F467 200D 1F467", "html": "👨‍👩&z |
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
public static void Shuffle<T>(this IList<T> ts) | |
{ | |
var count = ts.Count; | |
var last = count - 1; | |
for (var i = 0; i < last; ++i) | |
{ | |
var r = UnityEngine.Random.Range(i, count); | |
var tmp = ts[i]; | |
ts[i] = ts[r]; | |
ts[r] = tmp; |
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; | |
public static class Colors | |
{ | |
public static readonly Color AbsoluteZero = new Color32( 0, 72, 186, 255 ); | |
public static readonly Color Acajou = new Color32( 76, 47, 39, 255 ); | |
public static readonly Color AcidGreen = new Color32( 176, 191, 26, 255 ); | |
public static readonly Color Aero = new Color32( 124, 185, 232, 255 ); | |
public static readonly Color AeroBlue = new Color32( 201, 255, 229, 255 ); | |
public static readonly Color AfricanViolet = new Color32( 178, 132, 190, 255 ); |
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; | |
public static class ConvertToSpriteExtensiton | |
{ | |
public static Sprite ConvertToSprite(this Texture2D texture) | |
{ | |
return Sprite.Create(texture, new Rect(0, 0, texture.width, texture.height), Vector2.zero); | |
} | |
} |
NewerOlder