Skip to content

Instantly share code, notes, and snippets.

View CharStiles's full-sized avatar

Char CharStiles

View GitHub Profile
// http://www.iquilezles.org/www/articles/palettes/palettes.htm
// to see this function graphed out go to: https://www.desmos.com/calculator/18rq4ybrru
vec3 cosPalette( float t , vec3 brightness, vec3 contrast, vec3 osc, vec3 phase)
{
return brightness + contrast*cos( 6.28318*(osc*t+phase) );
}
vec3 hsb2rgb(vec3 c)
{
#version 150
uniform float time;
uniform vec2 resolution;
uniform vec2 mouse;
uniform vec3 spectrum;
uniform sampler2D noise2;
uniform sampler2D noise1;
uniform sampler2D texture0;
float circ(vec2 p){
return length(p) - .50;
}
// Repeat in two dimensions
vec2 pMod2(inout vec2 p, vec2 size) {
vec2 c = floor((p + size*0.5)/size);
p = mod(p + size*0.5,size) - size*0.5;
return c;
}
/*{
"DESCRIPTION": "",
"CREDIT": "",
"ISFVSN": "2",
"CATEGORIES": [
"XXX"
],
"INPUTS": [
{
"NAME": "inputImage",
#ifdef GL_ES
precision highp float;
#endif
// These are defined by Kodelife, or whatever environment you are using.
uniform float time;
uniform vec2 resolution;
varying vec3 v_normal;
varying vec2 v_texcoord;
/*
mix of the code provided by pulse to visulize BPM, and random code on the internet and some code that i wrote
THIS CODE PROVIDED AS IS, WITH NO CLAIMS OF FUNCTIONALITY OR EVEN IF IT WILL WORK
*/
import java.lang.management.ManagementFactory;
import java.lang.management.OperatingSystemMXBean;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
#version 150
// All of the uniform variables are declared in the side control panel
uniform float time;
uniform vec2 resolution;
uniform sampler2D texture0;
uniform sampler2D prevFrame;
palindromeGif() {
if [[ -n "$1" ]]; then
ffmpeg -i $1 -r 10 -vcodec png out-static-%05d.png
if [[ $2 != '--big' ]]; then
a=$(ls out-static* | wc -l)
for p in $(ls -r out-static*);
do
out=$(printf "out-static-%05d.png" $a)
let "a++"
// Author: charstiles
// Title: raymarch at at parsons
#ifdef GL_ES
precision mediump float;
#endif
uniform vec2 u_resolution;
// Author: CHAR
// Title: RAYMARCH ART AT RECURSE
#ifdef GL_ES
precision mediump float;
#endif
uniform vec2 u_resolution;
uniform vec2 u_mouse;
uniform float u_time;