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
Shader "Hidden/MeshDataWriter"
{
SubShader
{
Pass
{
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#pragma target 4.5
@sugi-cho
sugi-cho / startApp.bat
Last active February 18, 2019 08:20
Unityのアプリを30秒待ってから起動する。起動前にエクスプローラーを殺す。もしアプリがフリーズしたら、10秒で再起動。バッチ自体は最小化した状態で実行
@echo off
if not "%~0"=="%~dp0.\%~nx0" (
start /min cmd /c,"%~dp0.\%~nx0" %*
exit
)
timeout /T 30
:begin
taskkill /F /IM explorer.exe
using UnityEngine;
public class Converter
{
public static Texture2D ConvertTextureUV(Texture tex, Mesh mesh, int width = 512, int height = 512)
{
var rt = new RenderTexture(width, height, 0, RenderTextureFormat.ARGB32);
RenderTexture.active = rt;
GL.Clear(true, true, Color.clear);
@sugi-cho
sugi-cho / InvokeMethod.cs
Created September 20, 2016 07:07
UnityのInvokeの拡張。メソッド名を文字列指定しなくてよくなるので、タイプミスによるエラーが無くなる!
using UnityEngine;
using System.Collections;
public class InvokeMethod : MonoBehaviour
{
void Start()
{
this.Invoke(SomeMethod, 5f);
}
@sugi-cho
sugi-cho / kosen.md
Last active June 1, 2018 09:22
teamLab Meet-up #8「高専からチームラボのエンジニアなった」 http://teamlab.connpass.com/event/34689/

自己紹介

杉野 裕則

インタラクティブチーム リーダー

お絵かき水族館画像 鈴鹿高専を経て武蔵野美術大学を卒業後、2011年チームラボ入社。イベント演出、アートインスタレーション等、インタラクティブコンテンツの開発を行う。「チームラボアイランド 学ぶ!未来の遊園地」では、「お絵かき水族館」等を担当。昨年開催されたミラノ万博では、「HARMONY」にて映像プログラミングを担当

@sugi-cho
sugi-cho / aboutMe.md
Created July 13, 2016 07:08
自己紹介用

#杉野 裕則

  • 三重県四日市市出身
  • 鈴鹿高専卒業(2007)
  • 武蔵野美術大学卒業(2011)
  • チームラボ入社(2011/新卒)

鈴鹿高専を経て武蔵野美術大学を卒業後、2011年チームラボ入社。

Shader "Unlit/SimpleGeometry"
{
Properties
{
_MainTex ("Texture", 2D) = "white" {}
}
SubShader
{
Tags { "RenderType"="Opaque" }
LOD 100
@sugi-cho
sugi-cho / CreateCginc.cs
Last active April 18, 2016 08:31
.cgincファイルを作る、EditorScript
using UnityEngine;
using UnityEditor;
using System.IO;
public class CreateCgincExtent{
[MenuItem("Assets/Create/cginc file")]
public static void CreateCginc()
{
var path = GetCurrentProjectWindowPath();
path = Path.Combine(path, "newCginc.cginc");
@sugi-cho
sugi-cho / UnlitCastShadow.shader
Last active March 29, 2021 01:17
ShadowCastの使い方
Shader "Unlit/UnlitCastShadow"
{
Properties
{
_MainTex("Texture", 2D) = "white" {}
}
CGINCLUDE
#include "UnityCG.cginc"
struct appdata