Skip to content

Instantly share code, notes, and snippets.

@mgerhardy
mgerhardy / svo.hpp
Created June 7, 2020 20:51 — forked from Eisenwave/svo.hpp
C++ implementation of a sparse voxel octree
#ifndef SVO_HPP
#define SVO_HPP
#include "common_types.hpp"
#include "vec.hpp"
#include "vec_math.hpp"
#include "util_bits.hpp"
#include "util_common.hpp"
#include <algorithm>
// change YOURID with... YOUR ngrok id ;)
var lastModelTimestamp = null
var intervalCheck = setInterval(newModelReady, 500)
function newModelReady(){
fetch('http://YOURID.ngrok.io/timestamp.txt').then( response => { return response.json() } )
.then( timestamp => checkIfNovelModelAvailable(timestamp) )
}
@Eisenwave
Eisenwave / svo.hpp
Created May 7, 2020 16:08
C++ implementation of a sparse voxel octree
#ifndef SVO_HPP
#define SVO_HPP
#include "common_types.hpp"
#include "vec.hpp"
#include "vec_math.hpp"
#include "util_bits.hpp"
#include "util_common.hpp"
#include <algorithm>
@brianpeiris
brianpeiris / .gitignore
Last active December 3, 2018 22:41
Exokit Magic Leap fast feedback
node_modules
package-lock.json
@mairod
mairod / Webgl shader Hue Shift function
Last active April 26, 2024 07:12
Optimised Hue shift function in GLSL
vec3 hueShift( vec3 color, float hueAdjust ){
const vec3 kRGBToYPrime = vec3 (0.299, 0.587, 0.114);
const vec3 kRGBToI = vec3 (0.596, -0.275, -0.321);
const vec3 kRGBToQ = vec3 (0.212, -0.523, 0.311);
const vec3 kYIQToR = vec3 (1.0, 0.956, 0.621);
const vec3 kYIQToG = vec3 (1.0, -0.272, -0.647);
const vec3 kYIQToB = vec3 (1.0, -1.107, 1.704);
@jimmywarting
jimmywarting / readme.md
Last active September 19, 2024 08:23
Cors proxies
Exposed headers
Service SSL status Response Type Allowed methods Allowed headers
@patriciogonzalezvivo
patriciogonzalezvivo / GLSL-Noise.md
Last active September 19, 2024 10:28
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);