Skip to content

Instantly share code, notes, and snippets.

View keijiro's full-sized avatar

Keijiro Takahashi keijiro

View GitHub Profile
@keijiro
keijiro / gpd_win.md
Last active May 18, 2024 18:29
My notes on using GPD Win

image

GPD Win is a really enjoyable piece of hardware.

Windows 10 Clean Installation

@keijiro
keijiro / prng.cginc
Last active May 15, 2024 13:23
One liner pseudo random generator with HLSL
float nrand(float2 uv)
{
return frac(sin(dot(uv, float2(12.9898, 78.233))) * 43758.5453);
}
@keijiro
keijiro / fbm-camera-shaking-effect.md
Created September 16, 2012 06:30
Perlin Noise (fBm) を使ったカメラ揺れエフェクト

Perlin Noise (fBm) を使ったカメラ揺れエフェクト

概要

Perlin Noise (fBm 関数)をオブジェクトの動きに取り入れることによって、色々と面白い効果が生み出せます。例えば、これを位置と回転に適用するだけで、カメラの手ブレ風エフェクトなどを作り出せます。

サンプル

http://keijiro.github.com/unity-perlin/

@keijiro
keijiro / setup_scoped_registry.md
Last active April 21, 2024 04:56
How to add "Keijiro" scoped registry to your Unity project

How to add "Keijiro" scoped registry to your Unity project

Open the Package Manager page in the Project Settings window and add the following entry to the "Scoped Registries" list:

  • Name: Keijiro
  • URL: https://registry.npmjs.com
  • Scope: jp.keijiro

Scoped Registry

@keijiro
keijiro / kitty.conf
Created March 17, 2024 03:12
My Kitty configuration
# vim:fileencoding=utf-8:foldmethod=marker
#: Fonts {{{
#: kitty has very powerful font management. You can configure
#: individual font faces and even specify special fonts for particular
#: characters.
font_family Lilex Nerd Font Mono
# bold_font auto
@keijiro
keijiro / AngleAxis3x3.hlsl
Last active March 16, 2024 04:16
3x3 Rotation matrix with an angle and an arbitrary vector
// Rotation with angle (in radians) and axis
float3x3 AngleAxis3x3(float angle, float3 axis)
{
float c, s;
sincos(angle, s, c);
float t = 1 - c;
float x = axis.x;
float y = axis.y;
float z = axis.z;
@keijiro
keijiro / borg-with-gs.md
Last active February 5, 2024 01:58
Using Borg and Google Cloud Storage for backing up personal projects

Why do you prefer [Borg] over [git-lfs]/[git-annex]?

  • GitHub LFS has a 2GB limit on file size. This never works with large projects like video productions.
  • git-annex uses symlinks to manage annexed files. This doesn't work well on Windows.

So my conclusion at the moment is that Borg is the best backup software for mid/large-sized personal projects.

@keijiro
keijiro / install-ndi.sh
Last active January 27, 2024 09:25
Install the NDI shared library into a Linux system
#!/bin/sh
DEST=/usr/local/lib/x86_64-linux-gnu
test -d $DEST || mkdir $DEST
cp -P lib/x86_64-linux-gnu/libndi.so* $DEST
ldconfig
@keijiro
keijiro / UnlitTransparentColored.shader
Created January 26, 2012 04:47
Unlit Transparent Colored Shader
Shader "Unlit/Transparent Colored" {
Properties {
_Color ("Main Color", Color) = (1,1,1,1)
_MainTex ("Base (RGB) Trans (A)", 2D) = "white" {}
}
SubShader {
Tags {"Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent"}
ZWrite Off
@keijiro
keijiro / transfer.sh
Created December 24, 2015 10:36
Transferring a repository from GitHub to BitBucket.
git clone --mirror https://github.com/keijiro/Foobar.git
git remote set-url --push origin https://keijiro@bitbucket.org/keijiro/Foobar
git push --mirror