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
inline float inverselerp(float min, float max, float x) | |
{ | |
return (x - min) / (max - min); | |
} | |
float hash(float n) | |
{ | |
return frac(sin(n)*43758.5453); | |
} |
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
// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' | |
Shader "Custom/Airwave" | |
{ | |
Properties | |
{ | |
_TintColor("Color", Color) = (1, 1, 1, 1) | |
_AlphaMask("Alpha Mask", 2D) = "white" {} | |
_WaveNormal("Wave Normal", 2D) = "white" {} | |
_WaveStrength("Wave Strength", Float) = 0.3 |
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/StandardGradientValue" | |
{ | |
Properties | |
{ | |
_Color ("Color", Color) = (1,1,1,1) | |
_Color2 ("Color2", Color) = (1, 1, 1, 1) | |
_MainTex ("Albedo (RGB)", 2D) = "white" {} | |
_GradientScale ("Gradient Scale", Float) = 1.0 | |
_GradientOffset ("Gradient Offset", Float) = 0.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
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEditor; | |
public static class ExportTerrainTrees | |
{ | |
[MenuItem("Utilities/Export Terrain Trees")] | |
static void ExportTrees() | |
{ |
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
[ExecuteInEditMode] | |
public class IndoorMaskEffect : ImageEffectBase | |
{ | |
void OnPostRender() | |
{ | |
Graphics.Blit(null as RenderTexture, material); | |
} | |
} |
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 struct FloatRange | |
{ | |
public float min; | |
public float max; | |
public FloatRange(float inMin, float inMax) | |
{ | |
min = inMin; | |
max = inMax; | |
} |
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
[MenuItem("Sausage Soccer/Screenshot Characters")] | |
static void ScreenshotCharacters() | |
{ | |
SkinData[] skinData = Resources.LoadAll<SkinData>("Characters/SkinData"); | |
Transform pivotRoot = Selection.activeGameObject.transform; | |
bool prevRootActive = pivotRoot.gameObject.activeSelf; | |
pivotRoot.gameObject.SetActive(false); | |
string directory = Application.dataPath + "/../CharacterUI/"; |
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
struct Input | |
{ | |
float3 worldPos; | |
half4 screenPos; | |
half4 grabPassPos; | |
half4 waveUV; | |
half4 grabPos; | |
}; | |
half _NormalScale; |
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 System.IO; | |
using System.Net; | |
using System.Xml; | |
using System.Collections.Generic; | |
using System.Text; | |
using System.Collections; | |
using System.Text.RegularExpressions; | |
using System.Globalization; | |
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
using System; | |
using System.IO; | |
using System.Net; | |
using System.Xml; | |
using System.Collections.Generic; | |
using System.Text; | |
using System.Collections; | |
using System.Text.RegularExpressions; | |
using System.Globalization; | |
using System.Linq; |