Skip to content

Instantly share code, notes, and snippets.

View sugi-cho's full-sized avatar
😪
zzz

Hironori Sugino sugi-cho

😪
zzz
View GitHub Profile
@sugi-cho
sugi-cho / TileAnimattor.shader
Created August 13, 2014 06:59
タイルアニメーションする、シェーダ
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"
@sugi-cho
sugi-cho / AfterEffects.cs
Last active August 25, 2019 18:58
しんぷる
using UnityEngine;
using System.Collections;
public class AfterEffect : MonoBehaviour {
public Material m,
public Material[] targetMats;
public string propName = "_Tex";
RenderTexture rt;
@sugi-cho
sugi-cho / MobileBlur.shader
Created August 5, 2014 09:02
アルファチャンネルもブラーする!
Shader "Hidden/FastBlur" {
Properties {
_MainTex ("Base (RGB)", 2D) = "white" {}
_Bloom ("Bloom (RGB)", 2D) = "black" {}
}
CGINCLUDE
#include "UnityCG.cginc"
Shader "Custom/YokoMieru" {
Properties {
_MainTex("texture", 2D) = "white" {}
_T ("mieru",Float) = 0
}
CGINCLUDE
sampler2D _MainTex;
uniform half _T;
struct Input {
float4 vColor;
@sugi-cho
sugi-cho / CheckUV.shader
Last active August 25, 2019 19:05
ato de matomeru!!!
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;
@sugi-cho
sugi-cho / TestWindow.cs
Created June 24, 2014 13:22
create background editor process
using UnityEngine;
using UnityEditor;
using System.Collections;
public class TestWindow : EditorWindow
{
[MenuItem("Window/Test")]
public static void Init ()
{
EditorWindow.GetWindow (typeof(TestWindow));
@sugi-cho
sugi-cho / Extentions.cs
Created June 16, 2014 03:59
拡張メソッド
using UnityEngine;
using System.Collections;
static class Extentions
{
public static Vector2 XY (this Vector3 vec3)
{
return new Vector2 (vec3.x, vec3.y);
}
@sugi-cho
sugi-cho / sugiBlur.shader
Created June 11, 2014 13:32
デフォルトのmobile blurをもとに。
// blur, no down sample, fullscreen mobile blur
Shader "Custom/sugiBlur" {
Properties {
_MainTex ("Base (RGB)", 2D) = "white" {}
_Size ("blur size", Float) = 0.1
}
CGINCLUDE
#include "UnityCG.cginc"
sampler2D _MainTex;
using UnityEngine;
using System.Collections;
[RequireComponent(typeof(Camera))]
public class Draw : MonoBehaviour
{
public Color brushColor;
public float
brushSize = 10f,
brushIntencity = 1f;
@sugi-cho
sugi-cho / BrushTest.shader
Last active August 29, 2015 14:02
テクスチャを、特定の位置、サイズで、出す!
Shader "Custom/BrushTest" {
Properties {
_MainTex ("Base (RGB)", 2D) = "white" {}
_ShapeTex ("brush tex", 2D) = "white" {}
_Draw ("draw prop(s,y,size,alpha)",Vector) = (0,0,0,0)
}
SubShader {
Tags { "RenderType"="Opaque" }
LOD 200