Skip to content

Instantly share code, notes, and snippets.

View cedricpinson's full-sized avatar

Cedric Pinson cedricpinson

View GitHub Profile
@zeux
zeux / vertexcodec-comparison.txt
Last active May 23, 2019 16:45
Comparison of vertexcodec/indexcodec from meshoptimizer with Google Draco
Using fixed-point encoding for position (14 bits per component) and texture coordinates (12 bits per component), with 32-bit index buffer
and this vertex format:
// 12 bytes
struct PackedVertexOct
{
unsigned short px, py, pz;
unsigned char nu, nv; // octahedron encoded normal, aliases .pw
unsigned short tx, ty;
};
@zakkak
zakkak / .git-commit-template
Last active March 21, 2024 14:26 — forked from adeekshith/.git-commit-template.txt
This commit message template that helps you write great commit messages and enforce it across your team.
# [<tag>] (If applied, this commit will...) <subject> (Max 72 char)
# |<---- Preferably using up to 50 chars --->|<------------------->|
# Example:
# [feat] Implement automated commit messages
# (Optional) Explain why this change is being made
# |<---- Try To Limit Each Line to a Maximum Of 72 Characters ---->|
# (Optional) Provide links or keys to any relevant tickets, articles or other resources
# Example: Github issue #23
@palmerc
palmerc / mac-clang-omp-setup.sh
Last active August 29, 2015 14:05
Download, compile LLVM and OpenMP Runtime for Mac
INTEL_OPENMP_LATEST_BUILD_LINK=https://www.openmprtl.org/sites/default/files/libomp_20131209_oss.tgz
CLANG_INCLUDE=~/code/llvm/include
CLANG_BIN=~/code/llvm/build/Debug+Asserts/bin
CLANG_LIB=~/code/llvm/build/Debug+Asserts/lib
OPENMP_INCLUDE=~/code/libomp_oss/exports/common/include
OPENMP_LIB=~/code/libomp_oss/exports/mac_32e/lib.thin
cd ~/
mkdir code
cd ~/code
@patriciogonzalezvivo
patriciogonzalezvivo / GLSL-Noise.md
Last active May 8, 2024 18:44
GLSL Noise Algorithms

Please consider using http://lygia.xyz instead of copy/pasting this functions. It expand suport for voronoi, voronoise, fbm, noise, worley, noise, derivatives and much more, through simple file dependencies. Take a look to https://github.com/patriciogonzalezvivo/lygia/tree/main/generative

Generic 1,2,3 Noise

float rand(float n){return fract(sin(n) * 43758.5453123);}

float noise(float p){
	float fl = floor(p);
  float fc = fract(p);
@willurd
willurd / web-servers.md
Last active May 9, 2024 05:48
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@unscriptable
unscriptable / tiny Promise.js
Created February 7, 2011 06:02
A minimalist implementation of a javascript promise
// (c) copyright unscriptable.com / John Hann
// License MIT
// For more robust promises, see https://github.com/briancavalier/when.js.
function Promise () {
this._thens = [];
}
Promise.prototype = {