Skip to content

Instantly share code, notes, and snippets.

View huhlig's full-sized avatar

Hans W. Uhlig huhlig

View GitHub Profile
@huhlig
huhlig / wgsl_noise.md
Created April 16, 2022 03:58 — forked from munrocket/wgsl_noise.md
WGSL Noise Algorithms

WGSL Noise Algorithms

Operator % has changed, probably current code need a fix

Value noise

fn rand(n: f32) -> f32 { return fract(sin(n) * 43758.5453123); }
fn noise(p: f32) -> f32 {
  let fl = floor(p);
@huhlig
huhlig / gist:3667660
Created September 7, 2012 16:41
LLVM Builder. Just drop in Crontab
#!/bin/bash
BUILD=~/llvm
rm -Rf $BUILD
mkdir -p $BUILD/build
svn co http://llvm.org/svn/llvm-project/llvm/trunk $BUILD/src
svn co http://llvm.org/svn/llvm-project/cfe/trunk $BUILD/src/tools/clang
svn co http://llvm.org/svn/llvm-project/clang-tools-extra/trunk $BUILD/src/tools/clang/tools/extra
svn co http://llvm.org/svn/llvm-project/compiler-rt/trunk $BUILD/src/projects/compiler-rt
(cd $BUILD/build; ../src/configure --enable-optimized; make; make install)