Skip to content

Instantly share code, notes, and snippets.

View yottahmd's full-sized avatar

YotaHamada yottahmd

View GitHub Profile
@t-takasaka
t-takasaka / gist:99af38d930b2284a499c
Last active September 11, 2015 08:06
shader test
bool HelloWorld::init(){
if(!Layer::init()){ return false; }
//ブラーの幅等を設定
const int maxRadius = 64;
int step = 1, radius = 40;
int radiusWithStep = radius / step;
Vec2 *weights = new Vec2[maxRadius];
calculateGaussianWeights(radiusWithStep, weights);
@patriciogonzalezvivo
patriciogonzalezvivo / GLSL-Noise.md
Last active July 18, 2025 09:10
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);
@rstacruz
rstacruz / index.md
Last active May 21, 2025 10:07
Rails models cheatsheet

Rails Models

Generating models

$ rails g model User

Associations

belongs_to

has_one