Skip to content

Instantly share code, notes, and snippets.

@ippan
ippan / godot_billboard.shader
Last active February 1, 2019 09:32
Godot Billboard Shader
// billboard
MODELVIEW_MATRIX = INV_CAMERA_MATRIX * mat4(CAMERA_MATRIX[0], CAMERA_MATRIX[1], CAMERA_MATRIX[2], WORLD_MATRIX[3]);
// scale
MODELVIEW_MATRIX = MODELVIEW_MATRIX * mat4(vec4(length(WORLD_MATRIX[0].xyz), 0, 0, 0), vec4(0, length(WORLD_MATRIX[1].xyz), 0, 0), vec4(0, 0, length(WORLD_MATRIX[2].xyz), 0), vec4(0, 0, 0, 1));
@ippan
ippan / git_osx_keychain.sh
Created May 18, 2017 11:00
git use osx keychain
git config --global credential.helper osxkeychain
@ippan
ippan / earth.shd
Last active October 5, 2017 13:00
a simple earth shader in Godot
// author: PanPan
// random3 and simplex noise is come form
// https://thebookofshaders.com/edit.php#11/iching-03.frag
shader_type spatial;
vec3 random3(vec3 c)
{
float j = 4096.0 * sin(dot(c,vec3(17.0, 59.4, 15.0)));
vec3 r;
@ippan
ippan / .bashrc
Created March 23, 2017 05:41
auto start zsh in bash
if [ -t 1 ]; then
exec zsh
fi