Skip to content

Instantly share code, notes, and snippets.

View ofZach's full-sized avatar

ofZach

View GitHub Profile
// written by Golan Levin
// for example, huntForBlendFunc(1, -1, -1);
void huntForBlendFunc(float period, int defaultSid, int defaultDid){
// sets all possible (24) combinations of blend functions,
// changing modes every period seconds.
int sfact[] = {
GL_ZERO,
// this code takes a src string,
// tries to fine multiline strings that are
// of the form
// var fs = ` .... ` or let vs = `....`
// and tries to compress them via
// glslx
// I found renaming hard to manage so this is set to not rename. (my approach is to rename myself to something small)
function compressShaders(src) {