Skip to content

Instantly share code, notes, and snippets.


Keijiro Takahashi keijiro

View GitHub Profile
View RawToTexture3D.cs
using UnityEngine;
using UnityEditor;
static class RawToTexture3D
static Color IntToColor(uint b1, uint b2)
=> new Color((b2 + (b1 << 8)) / 65536.0f, 0, 0);
[MenuItem("Tool/Raw to Texture3D")]
static void ConvertRawToTexture3D()
keijiro /
Last active Sep 22, 2021



KlakNDI is a Unity plugin that allows sending/receiving video streams between several devices using [NDI]®.

[NDI]® (Network Device Interface) is a standard developed by [NewTek], Inc that enables applications to deliver video streams via a local area network. Please

keijiro /
Created Sep 13, 2021
Archive an FCP project with tar/pigz
tar --use-compress-program=pigz -c -v -f foo.fcpbundle.tar.gz foo.fcpbundle
keijiro /
Last active Aug 29, 2021
My Unity-Axidraw workflow

The following is my plotter art workflow with Unity.

  1. On Unity, render a monochrome line-art image using the Recolor (contour line) effect. The resolution of the image should be high enough. I usually use 2400x3840.

  2. Rotate it if needed. convert temp.png -rotate 90 render.png

  3. Convert it into SVG using autotrace. autotrace --centerline --output-format=svg render.png > plot.svg



gif screenshot

KlakSpout is a Unity plugin that allows Unity to send/receive video streams using the Spout system.

keijiro / EdgeDetection.hlsl
Created Feb 18, 2021
Edge detection with shader graph custom function
View EdgeDetection.hlsl
void UVEdge_float(float2 uv, float width, out float edge)
uv = min(uv, 1 - uv);
float2 bd = saturate(1 - uv / (fwidth(uv) * width));
edge = max(bd.x, bd.y);


gif gif

TinyYOLOv2Barracuda is a Unity sample project that shows how to run the [YOLO] object detection system on the Unity [Barracuda] neural network inference library.


jp.keijiro.apriltag - AprilTag package for Unity


jp.keijiro.apriltag is a Unity package that provides an implementation of the AprilTag tracker.

AprilTag is a marker based tracking system developed by the APRIL Robotics Laboratory at the University of Michigan. Please see [the AprilTag web page]

keijiro /
Last active Jan 14, 2021
BoltとMIDIでグリグリコントロール!UnityでMIDI デバイスを使ってみよう! - Unityステーション
keijiro /
Last active Jan 6, 2021
How to make a backup of a Plastic SCM repository

Taking a snapshot of a Plastic SCM workspace with tar


cat ignore.conf | sed -e s/^/./ | tar -I pigz -c -v --exclude=.plastic -X - -f ../snapshot.tar.gz .

Making a backup of a Plastic SCM repository using the fast-export format