This file contains 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 System.Collections; | |
static class Extentions | |
{ | |
public static Vector2 XY (this Vector3 vec3) | |
{ | |
return new Vector2 (vec3.x, vec3.y); | |
} |
This file contains 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.Collections; | |
public class TestWindow : EditorWindow | |
{ | |
[MenuItem("Window/Test")] | |
public static void Init () | |
{ | |
EditorWindow.GetWindow (typeof(TestWindow)); |
This file contains 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/CheckUV" { | |
CGINCLUDE | |
sampler2D _MainTex; | |
struct Input { | |
float4 vColor; | |
float2 tex; | |
}; | |
void vert (inout appdata_full v, out Input o){ | |
UNITY_INITIALIZE_OUTPUT(Input,o); | |
o.vColor = v.color; |
This file contains 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/YokoMieru" { | |
Properties { | |
_MainTex("texture", 2D) = "white" {} | |
_T ("mieru",Float) = 0 | |
} | |
CGINCLUDE | |
sampler2D _MainTex; | |
uniform half _T; | |
struct Input { | |
float4 vColor; |
This file contains 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 "Hidden/FastBlur" { | |
Properties { | |
_MainTex ("Base (RGB)", 2D) = "white" {} | |
_Bloom ("Bloom (RGB)", 2D) = "black" {} | |
} | |
CGINCLUDE | |
#include "UnityCG.cginc" |
This file contains 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 System.Collections; | |
public class AfterEffect : MonoBehaviour { | |
public Material m, | |
public Material[] targetMats; | |
public string propName = "_Tex"; | |
RenderTexture rt; |
This file contains 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/TextureSheetAnimator" { | |
Properties { | |
_MainTex ("Base (RGB)", 2D) = "white" {} | |
_TileX ("tile x", Float) = 1 | |
_TileY ("tile y", Float) = 1 | |
_T ("t",float) = 0 | |
} | |
CGINCLUDE | |
#include "UnityCG.cginc" |
This file contains 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 void GetBlurTex(RenderTexture targetTexture, int iteration, int ds){ | |
RenderTexture rt = targetTexture; | |
float | |
widthMod = 1f / (1f * (1 << ds)); | |
int | |
rtW = rt.width, | |
rtH = rt.height; | |
for(int i = 0; i < iteration; i++){ | |
float iterationOffs = (float)i; |
This file contains 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 System.Collections; | |
public class SetCamRect : MonoBehaviour | |
{ | |
public Camera[] cams; | |
string | |
propRectMinX = "RectMinX", | |
propRectMinY = "RectMinY", | |
propRectMaxX = "RectMaxX", |
This file contains 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/FragmentLit" { | |
CGINCLUDE | |
#include "UnityCG.cginc" | |
sampler2D _MainTex; | |
fixed4 _Color; | |
struct v2f { | |
float4 pos : SV_POSITION; | |
fixed4 color : COLOR; | |