Updates to heavym and new grid reader

This commit is contained in:
Squishy
2025-11-14 20:06:00 +01:00
parent 35298e27b8
commit c4b914d4e9
1480 changed files with 45966 additions and 0 deletions
Binary file not shown.
Binary file not shown.
+221
View File
@@ -0,0 +1,221 @@
/*{
"DESCRIPTION": "Your shader description",
"CREDIT": "by you",
"CATEGORIES": [
"Your category"
],
"INPUTS": [
{
"NAME": "cloudscale",
"TYPE": "float",
"DEFAULT": 0.95,
"MIN": 0.0,
"MAX": 1.0
},
{
"NAME": "cloudcover",
"TYPE": "float",
"DEFAULT": 0.25,
"MIN": 0.0,
"MAX": 1.0
},
{
"NAME": "cloudlight",
"TYPE": "float",
"DEFAULT": 0.5,
"MIN": 0.0,
"MAX": 1.0
},
{
"NAME": "clouddark",
"TYPE": "float",
"DEFAULT": 0.5,
"MIN": 0.0,
"MAX": 1.0
},
{
"NAME": "cloudalpha",
"TYPE": "float",
"DEFAULT": 0.25,
"MIN": 0.0,
"MAX": 1.0
},
{
"NAME": "skytint",
"TYPE": "float",
"DEFAULT": 0.5,
"MIN": 0.0,
"MAX": 1.0
},
{
"NAME": "skycolor1",
"TYPE": "color",
"DEFAULT": [
0.2,
0.4,
0.6,
1.0
]
},
{
"NAME": "skycolor2",
"TYPE": "color",
"DEFAULT": [
0.4,
0.7,
1.0,
1.0
]
},
{
"NAME": "detail",
"TYPE": "float",
"DEFAULT": 1.0,
"MIN": 0.0,
"MAX": 1.0
},
{
"NAME": "warp",
"TYPE": "float",
"DEFAULT": 0.5,
"MIN": 0.0,
"MAX": 1.0
}
]
}*/
// Ported and adapted from "2D Clouds" by drift: https://www.shadertoy.com/view/4tdSWr
vec3 iResolution = vec3(RENDERSIZE, 1.);
float iGlobalTime = TIME;
// const float cloudscale = 1.1;
// const float cloudcover = 0.72;
// const float clouddark = 0.5;
// const float cloudlight = 0.13;
// const float cloudalpha = 8.0;
// const float skytint = 0.5;
// const vec3 skycolour1 = vec3(0.2, 0.4, 0.6);
// const vec3 skycolour2 = vec3(0.4, 0.7, 1.0);
const int maxdetail = 8;
const float speed = 0.03;
const mat2 m = mat2( 1.6, 1.2, -1.2, 1.6 );
vec2 hash( vec2 p ) {
p = vec2(dot(p,vec2(127.1,311.7)), dot(p,vec2(269.5,183.3)));
return -1.0 + 2.0*fract(sin(p)*43758.5453123);
}
float noise( in vec2 p ) {
const float K1 = 0.366025404; // (sqrt(3)-1)/2;
const float K2 = 0.211324865; // (3-sqrt(3))/6;
vec2 i = floor(p + (p.x+p.y)*K1);
vec2 a = p - i + (i.x+i.y)*K2;
vec2 o = (a.x>a.y) ? vec2(1.0,0.0) : vec2(0.0,1.0); //vec2 of = 0.5 + 0.5*vec2(sign(a.x-a.y), sign(a.y-a.x));
vec2 b = a - o + K2;
vec2 c = a - 1.0 + 2.0*K2;
vec3 h = max(0.5-vec3(dot(a,a), dot(b,b), dot(c,c) ), 0.0 );
vec3 n = h*h*h*h*vec3( dot(a,hash(i+0.0)), dot(b,hash(i+o)), dot(c,hash(i+1.0)));
return dot(n, vec3(70.0));
}
float fbm(vec2 n) {
float total = 0.0, amplitude = 0.1;
for (int i=0; i<maxdetail; i++){
if (i > int(detail)) {break;}
total += noise(n) * amplitude;
n = m * n;
amplitude *= 0.4;
}
return total;
}
// -----------------------------------------------
void mainImage( out vec4 fragColor, in vec2 fragCoord ) {
float cloudscale = (1.0-cloudscale+.001) * 40.0;
float cloudcover = cloudcover*8.0;
float clouddark = 1.-clouddark;
float cloudalpha = cloudalpha *80.;
vec3 skycolour1 = skycolor1.rgb;
vec3 skycolour2 = skycolor2.rgb;
float detail = detail * float (maxdetail);
vec2 p = fragCoord.xy / iResolution.xy;
vec2 uv = (.5,.5)-p*(vec2(iResolution.x/iResolution.y,1.0));
float time = iGlobalTime * speed;
float q = fbm(uv * cloudscale * warp);
//ridged noise shape
float r = 0.0;
uv *= cloudscale;
uv -= q - time;
float weight = 0.8;
for (int i=0; i<maxdetail; i++){
if (i > int(detail)) {break;}
r += abs(weight*noise( uv ));
uv = m*uv + time;
weight *= 0.7;
}
//noise shape
float f = 0.0;
uv = uv = (.5,.5)-p*(vec2(iResolution.x/iResolution.y,1.0));
uv *= cloudscale;
uv -= q - time;
weight = 0.7;
for (int i=0; i<maxdetail; i++){
if (i > int(detail)) {break;}
f += weight*noise( uv );
uv = m*uv + time;
weight *= 0.6;
}
f *= (r + f);
//noise colour
float c = 0.0;
time = iGlobalTime * speed * 2.0;
uv = uv = (.5,.5)-p*(vec2(iResolution.x/iResolution.y,1.0));
uv *= cloudscale*2.0;
uv -= q - time;
weight = 0.4;
for (int i=0; i<maxdetail; i++){
if (i > int(detail)) {break;}
c += weight*noise( uv );
uv = m*uv + time;
weight *= 0.6;
}
//noise ridge colour
float c1 = 0.0;
time = iGlobalTime * speed * 3.0;
uv = uv = (.5,.5)-p*(vec2(iResolution.x/iResolution.y,1.0));
uv *= cloudscale*3.0;
uv -= q - time;
weight = 0.4;
for (int i=0; i<maxdetail; i++){
if (i > int(detail)) {break;}
c1 += abs(weight*noise( uv ));
uv = m*uv + time;
weight *= 0.6;
}
c += c1;
vec3 skycolour = mix(skycolour2, skycolour1, p.y);
vec3 cloudcolour = vec3(1.1, 1.1, 0.9) * clamp((clouddark + cloudlight*c), 0.0, 1.0);
f = cloudcover + cloudalpha*f*r;
vec3 result = mix(skycolour, clamp(skytint * skycolour + cloudcolour, 0.0, 1.0), clamp((f + c)/2., 0.0, 1.0));
fragColor = vec4( result, 1.0 );
}
void main(void) {
mainImage(gl_FragColor, gl_FragCoord.xy);
}
+234
View File
@@ -0,0 +1,234 @@
/*{
"DESCRIPTION": "A converted shader with TIME, camera controls, and a parameter for smooth or hard grid extrusion patterns.",
"CATEGORIES": [ "Raymarching" ],
"INPUTS": [
{
"NAME": "xPos",
"TYPE": "float",
"DEFAULT": 0.0,
"MIN": -10.0,
"MAX": 10.0
},
{
"NAME": "yPos",
"TYPE": "float",
"DEFAULT": 0.0,
"MIN": 0.1,
"MAX": 1.0
},
{
"NAME": "cameraX",
"TYPE": "float",
"MIN": -3.14,
"MAX": 3.14,
"DEFAULT": 0.0
},
{
"NAME": "cameraY",
"TYPE": "float",
"MIN": 0.0,
"MAX": 1.57,
"DEFAULT": 1.2
},
{
"NAME": "cameraZ",
"TYPE": "float",
"MIN": -3.14,
"MAX": 3.14,
"DEFAULT": 0.0
},
{
"NAME": "extrude",
"TYPE": "float",
"MIN": 0.25,
"MAX": 1,
"DEFAULT": 0.8
},
{
"NAME": "smoothness",
"TYPE": "float",
"MIN": 0.0,
"MAX": 1.0,
"DEFAULT": 0.5
},
{
"NAME": "lineColor",
"TYPE": "color",
"DEFAULT": [1.0, 0.0, 0.1, 1.0],
"DESCRIPTION": "Color of the haze effect."
}
]
}*/
#define MIN_DIST 0.001
#define MAX_DIST 32.0
#define MAX_STEPS 96
#define STEP_MULT 0.9
#define NORMAL_OFFS 0.01
#define FOCAL_LENGTH 0.8
#define GRID_COLOR_1 vec3(0.00, 0.0, 0.0)
#define GRID_COLOR_2 vec3(1.00, 0.20, 0.60)
#define GRID_SIZE 0.50
#define SKYDOME 0.
#define FLOOR 1.
float pi = atan(1.0) * 4.0;
float tau = atan(1.0) * 8.0;
struct MarchResult {
vec3 position;
vec3 normal;
float dist;
float steps;
float id;
};
mat3 Rotate(vec3 angles) {
vec3 c = cos(angles);
vec3 s = sin(angles);
mat3 rotX = mat3(1.0, 0.0, 0.0, 0.0, c.x, s.x, 0.0, -s.x, c.x);
mat3 rotY = mat3(c.y, 0.0, -s.y, 0.0, 1.0, 0.0, s.y, 0.0, c.y);
mat3 rotZ = mat3(c.z, s.z, 0.0, -s.z, c.z, 0.0, 0.0, 0.0, 1.0);
return rotX * rotY * rotZ;
}
vec2 opU(vec2 d1, vec2 d2) {
return (d1.x < d2.x) ? d1 : d2;
}
vec2 opS(vec2 d1, vec2 d2) {
return (-d1.x > d2.x) ? d1 * vec2(-1, 1) : d2;
}
vec2 sdSphere(vec3 p, float s, float id) {
return vec2(length(p) - s, id);
}
vec2 sdBox( vec3 p, vec3 b, float id) {
vec3 q = abs(p) - b;
return vec2(length(max(q,0.0)) + min(max(q.x,max(q.y,q.z)),0.0), id);
}
vec2 sdPlane(vec3 p, vec4 n, float id) {
return vec2(dot(p, n.xyz) + n.w, id);
}
float random(vec2 st) {
return fract(sin(dot(st.xy, vec2(12.9898, 78.233))) * 43758.5453123);
}
// Triangle wave function with noise
float triangleWave(float x) {
return -0.5 + abs(mod(x, 1.0) - 0.5); // Original triangle wave
}
// Main function that uses the triangle wave with noise
vec2 triWave(vec2 p) {
float smoothF = 1.2;
float smoothComp = (smoothF - smoothness * smoothF);
float gain = extrude * 0.1 * smoothComp;
float x = triangleWave(p.x + p.y);
float y = triangleWave(p.y);
return vec2(x * gain, y * gain);
}
// Updated heightmapNormal function
vec2 heightmapNormal(vec2 p) {
vec2 squaredW = triWave(p);
vec2 sinW = vec2(sin(p.x) * 0.15 * extrude, sin(p.y) * 0.15 * extrude);
return mix(squaredW, sinW, 0.5 + smoothness * 0.5);
}
vec2 Scene(vec3 p) {
vec2 d = vec2(MAX_DIST, SKYDOME);
d = opU(sdPlane(p, normalize(vec4(heightmapNormal(p.xy), -1, 0)), FLOOR), d);
return d;
}
vec3 Normal(vec3 p) {
vec3 off = vec3(NORMAL_OFFS, 0, 0);
return normalize(vec3(
Scene(p + off.xyz).x - Scene(p - off.xyz).x,
Scene(p + off.zxy).x - Scene(p - off.zxy).x,
Scene(p + off.yzx).x - Scene(p - off.yzx).x
));
}
MarchResult MarchRay(vec3 orig, vec3 dir) {
float steps = 0.0;
float dist = 0.0;
float id = 0.0;
for (int i = 0; i < MAX_STEPS; i++) {
vec2 object = Scene(orig + dir * dist);
dist += object.x * STEP_MULT;
id = object.y;
steps++;
if (abs(object.x) < MIN_DIST * dist) {
break;
}
}
MarchResult result;
result.position = orig + dir * dist;
result.normal = Normal(result.position);
result.dist = dist;
result.steps = steps;
result.id = id;
return result;
}
vec3 Shade(MarchResult hit, vec3 direction, vec3 camera) {
vec3 color = vec3(0.0);
if (hit.id == FLOOR) {
vec2 uv = abs(mod(hit.position.xy + GRID_SIZE / 2.0, GRID_SIZE) - GRID_SIZE / 2.0);
// Smooth or hard-edged grid
float gridEdge = min(uv.x, uv.y) / GRID_SIZE;
float edge = smoothstep(0., 0.1, gridEdge);
color = mix(GRID_COLOR_1, lineColor.rgb, 1.0 - edge);
}
// Apply distance fog
color *= 1.0 - smoothstep(0.0, MAX_DIST * 0.5 * (2.0 - yPos), hit.dist);
return color;
}
void main() {
vec2 res = RENDERSIZE.xy / RENDERSIZE.y;
vec2 uv = gl_FragCoord.xy / RENDERSIZE.y;
vec3 angles = vec3(cameraX, cameraY, 0.0);
mat3 rotate = Rotate(angles.yzx);
vec3 orig = vec3(xPos, (1.0 - yPos) * 5., -2.0) * rotate;
vec3 dir = normalize(vec3(uv - res / 2.0, FOCAL_LENGTH)) * rotate;
MarchResult hit = MarchRay(orig, dir);
vec3 color = Shade(hit, dir, orig);
gl_FragColor = vec4(color, 1.0);
}
+129
View File
@@ -0,0 +1,129 @@
/*{
"CREDIT": "by mojovideotech",
"DESCRIPTION": "",
"CATEGORIES": [
"generator",
"5d",
"tiles"
],
"INPUTS": [
{
"NAME" : "scale",
"TYPE" : "float",
"DEFAULT" : 1.5,
"MIN" : 0.5,
"MAX" : 3.0
},
{
"NAME" : "rate",
"TYPE" : "float",
"DEFAULT" : 0.01,
"MIN" : -0.5,
"MAX" : 0.5
},
{
"NAME" : "flip",
"TYPE" : "bool",
"DEFAULT" : false
},
{
"NAME" : "rot",
"TYPE" : "bool",
"DEFAULT" : true
},
{
"NAME" : "invert",
"TYPE" : "bool",
"DEFAULT" : true
}
]
}*/
////////////////////////////////////////////////////////////
// 5dTiles by mojovideotech
//
// based on :
// shadertoy.com/\ltdSz4 by David Crooks
//
// Creative Commons Attribution-NonCommercial-ShareAlike 3.0
////////////////////////////////////////////////////////////
struct vec5 {
vec4 a;
float v;
};
vec5 plane5(vec5 origin, vec5 u, vec5 v, vec2 p){
return vec5(origin.a + p.x*u.a + p.y*v.a,
origin.v + p.x*u.v + p.y*v.v);
}
vec5 mult5(vec5 p, float multiplier) {
p.a *= multiplier;
p.v *= multiplier;
return p;
}
vec5 mod5(vec5 p, float m) { return vec5(mod(p.a,m),mod(p.v,m)); }
vec3 hsv2rgb(vec3 c) {
vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);
vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);
return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 0.5), c.y);
}
bool dualTileZoneTest(vec5 p , float value) {
bool down = all(lessThanEqual(vec4(value),p.a)) && value <= p.v && all(lessThanEqual(vec4(value),vec4(1.0)-p.a)) && value <= (1.0-p.v);
bool up = all(greaterThanEqual(vec4(value),p.a)) && value >= p.v && all(greaterThanEqual(vec4(value),vec4(1.0)-p.a)) && value >= (1.0-p.v);
return down || up;
}
vec3 pattern(vec5 p ){
float hueDelta = 0.8;
p = mod5(p,1.0);
if(dualTileZoneTest(p , p.a.x)){
return vec3(0.2, 0.0, 0.7);
}
else if(dualTileZoneTest(p, p.a.y)){
return vec3(0.1, 0.2, 0.1);
}
else if(dualTileZoneTest(p, p.a.z)){
return vec3(0.7, 0.6, 0.6);
}
else if(dualTileZoneTest(p, p.a.w)){
return vec3(0.0, 0.2, 0.9);
}
else if(dualTileZoneTest(p, p.v)){
return vec3(0.7, 0.2, 0.0);
}
else {
return vec3(0.0);
}
}
void main()
{
vec2 p = (gl_FragCoord.xy - 0.5*RENDERSIZE.xy) / RENDERSIZE.y;
if (flip) { p *= -1.0; }
if (rot) { p.xy = -p.yx; }
p /=scale;
float T = rate*TIME;
vec5 origin = vec5(vec4(T),-T);
vec5 u = vec5(vec4(-0.511667,0.19544,0.19544,-0.511667),0.632456) ;
vec5 v = vec5(vec4(-0.371748,0.601501,-0.601501,0.371748), 0.0);
vec5 plane = plane5(origin,u,v,p);
plane = mult5(plane,5.0);
vec3 color = pattern(plane);
if (invert) { color = 1.0 - color; }
gl_FragColor = vec4(color, 1.0);
}
+113
View File
@@ -0,0 +1,113 @@
/*{
"CREDIT": "by mojovideotech",
"CATEGORIES": [
"generator"
],
"INPUTS": [
{
"NAME": "grid_size",
"TYPE": "point2D",
"DEFAULT": [
40,
40
],
"MAX": [
360,
360
],
"MIN": [
6,
6
]
},
{
"NAME": "bright",
"TYPE": "float",
"DEFAULT": 0.2,
"MIN": 0.1,
"MAX": 0.5
},
{
"NAME": "glow_size",
"TYPE": "float",
"DEFAULT": 2,
"MIN": -20,
"MAX": 20
},
{
"NAME": "rate",
"TYPE": "float",
"DEFAULT": 0.16,
"MIN": -2,
"MAX": 2
},
{
"NAME": "rndseed",
"TYPE": "point2D",
"DEFAULT": [
12.9898,
78.233
],
"MAX": [
233,
377
],
"MIN": [
5,
7
]
}
],
"DESCRIPTION": ""
}*/
////////////////////////////////////////////////////////////
// AnotherGridThingy by mojovideotech
//
// based on :
// glslsandbox/e#22020.0
//
// Creative Commons Attribution-NonCommercial-ShareAlike 3.0
////////////////////////////////////////////////////////////
float rnd(vec2 seed) {
float value = fract(sin(dot(seed,vec2(rndseed)))*43758.5453);
return value;
}
float step_to(float value, float steps) {
float closest_int = floor(value/steps);
return closest_int * steps;
}
vec4 dot_grid(vec2 pos, bool with_grid) {
float value = floor(mod(pos.x,grid_size.x))*floor(mod(pos.y,grid_size.y));
value = clamp(value, 0.0, 1.0);
float c_time = TIME*rate;
vec2 step_pos = vec2(step_to(pos.x,grid_size.x),step_to(pos.y,grid_size.y));
vec2 norm_pos = step_pos.xy/RENDERSIZE.xy;
norm_pos = vec2(norm_pos.x+rnd(norm_pos),norm_pos.y+rnd(norm_pos ));
float r = fract(sin(norm_pos.x));
float g = fract(sin(norm_pos.y+abs(c_time)));
float b = abs(r-g);
if(with_grid == false){value = 1.0;}
return vec4(r,g,b,1.0) * value;
}
vec4 glow(vec2 pos) {
vec4 color = clamp(dot_grid(pos,true)*bright,0.0,1.0);
color += clamp(dot_grid(vec2(pos.x-glow_size,pos.y),false)*bright,0.0,1.0);
color += clamp(dot_grid(vec2(pos.x+glow_size,pos.y),false)*bright,0.0,1.0);
color += clamp(dot_grid(vec2(pos.x,pos.y-glow_size),false)*bright,0.0,1.0);
color += clamp(dot_grid(vec2(pos.x,pos.y+glow_size),false)*bright,0.0,1.0);
return color;
}
void main( void )
{
vec2 position = gl_FragCoord.xy;
gl_FragColor = glow(position);
}
+120
View File
@@ -0,0 +1,120 @@
/*{
"CREDIT": "by mojovideotech",
"DESCRIPTION": "",
"CATEGORIES": [
"generator",
"2d"
],
"INPUTS": [
{
"MAX": [
300,
200
],
"MIN": [
10,
6
],
"DEFAULT": [
100,
50
],
"NAME": "grid",
"TYPE": "point2D"
},
{
"NAME": "density",
"TYPE": "float",
"DEFAULT": 1000,
"MIN": -900,
"MAX": 1800
},
{
"NAME": "rate",
"TYPE": "float",
"DEFAULT": 1,
"MIN": -3,
"MAX": 3
},
{
"NAME": "seed1",
"TYPE": "float",
"DEFAULT": 55,
"MIN": 8,
"MAX": 233
},
{
"NAME": "seed2",
"TYPE": "float",
"DEFAULT": 89,
"MIN": 55,
"MAX": 987
},
{
"NAME": "seed3",
"TYPE": "float",
"DEFAULT": 514229,
"MIN": 75025,
"MAX": 3524578
},
{
"NAME": "offset1",
"TYPE": "float",
"DEFAULT": 0,
"MIN": -100,
"MAX": 100
},
{
"NAME": "offset2",
"TYPE": "float",
"DEFAULT": 0,
"MIN": -100,
"MAX": 100
}
]
}*/
///////////////////////////////////////////
// BitStreamer by mojovideotech
//
// Creative Commons Attribution-NonCommercial-ShareAlike 3.0
//
// based on :
// www.patriciogonzalezvivo.com/2015/thebookofshaders/10/ikeda-03.frag
//
// from :
// thebookofshaders.com by Patricio Gonzalez Vivo
///////////////////////////////////////////
float ranf(in float x) {
return fract(sin(x)*1e4);
}
float rant(in vec2 st) {
return fract(sin(dot(st.xy, vec2(seed1,seed2)))*seed3);
}
float pattern(vec2 st, vec2 v, float t) {
vec2 p = floor(st+v);
return step(t, rant(100.+p*.000001)+ranf(p.x)*0.5 );
}
void main() {
vec2 st = gl_FragCoord.xy/RENDERSIZE.xy;
st.x *= RENDERSIZE.x/RENDERSIZE.y;
st *= grid;
vec2 ipos = floor(st);
vec2 fpos = fract(st);
vec2 vel = vec2(TIME*rate*max(grid.x,grid.y));
vel *= vec2(-1.,0.0) * ranf(1.0+ipos.y);
vec2 off1 = vec2(offset1,0.);
vec2 off2 = vec2(offset2,0.);
vec3 color = vec3(0.);
color.r = pattern(st+off1,vel,0.5+density/RENDERSIZE.x);
color.g = pattern(st,vel,0.5+density/RENDERSIZE.x);
color.b = pattern(st-off2,vel,0.5+density/RENDERSIZE.x);
color *= step(0.2,fpos.y);
gl_FragColor = vec4(color,1.0);
}
@@ -0,0 +1,180 @@
/*
{
"CATEGORIES": [
"Automatically Converted"
],
"INPUTS": [
{
"NAME": "x_rot",
"TYPE": "float",
"DEFAULT": 0.5,
"MIN": 0.0,
"MAX": 1.0
},
{
"NAME": "y_rot",
"TYPE": "float",
"DEFAULT": 0.3,
"MIN": 0.0,
"MAX": 1.0
},
{
"NAME": "z_rot",
"TYPE": "float",
"DEFAULT": 0.1,
"MIN": 0.0,
"MAX": 1.0
},
{
"NAME": "q_rot",
"TYPE": "float",
"DEFAULT": 1.0,
"MIN": 0.0,
"MAX": 1.0
}
]
}
*/
// TesseracT by Dima..
#ifdef GL_ES
precision mediump float;
#endif
mat4 mat = mat4 ( vec4 ( 1.0 , 0.0 , 0.0 , 0.0 ),
vec4 ( 0.0 , 1.0 , 0.0 , 0.0 ),
vec4 ( 1.0 , 0.0 , 1.0 , 0.0 ),
vec4 ( 0.0 , 1.0 , 0.0 , 1.0 ) );
vec2 pos;
vec4 col = vec4 ( 0.4, 0.0, 0.9, 1000.0 );
void Rotate ( float angle, float d1, float d2, float d3, float d4);
void Point ( vec4 p );
void Line4 ( vec4 a, vec4 b );
void Line2 ( vec2 a, vec2 b );
void main( void ) {
pos = gl_FragCoord.xy / RENDERSIZE.y;
pos.x -= 1. - RENDERSIZE.y / RENDERSIZE.x;
pos -= .5;
Rotate ( TIME * q_rot, 0.0, 1.0, 1.0, 0.0 );
Rotate ( TIME * x_rot, 1.0, 0.0, 1.0, 0.0 );
Rotate ( TIME * y_rot, 1.0, 1.0, 0.0, 0.0 );
Rotate ( TIME * z_rot, 1.0, 0.0, 0.0, 1.0 );
Line4 ( vec4 ( 0.1 , 0.0 , 0.0 , 0.0 ), vec4 (-.3, .2, .2, .2 ) );
Line4 ( vec4 ( 0.0 , 0.0 , 0.0 , 0.0 ), vec4 ( .2,-.2, .2, .2 ) );
Line4 ( vec4 ( 0.0 , 0.1 , 0.0 , 0.0 ), vec4 ( -.2, .2,-.2, .2 ) );
Line4 ( vec4 ( 0.0 , 0.0 , 0.1 , 0.0 ), vec4 ( .2, .2, .2,-.2 ) );
Line4 ( vec4 ( .2, .2, .2,-.2 ), vec4 (-.3, .2, .2,-.2 ) );
Line4 ( vec4 ( .2, .2, .2,-.2 ), vec4 ( .2,-.2, .2,-.2 ) );
Line4 ( vec4 ( .2, .2, .2,-.2 ), vec4 ( .2, .2,-.2,-.2 ) );
Line4 ( vec4 ( .2, .2,-.2, .2 ), vec4 (-.3, .2,-.2, .2 ) );
Line4 ( vec4 ( .2, .2,-.2, .2 ), vec4 ( .2,-.2,-.2, .2 ) );
Line4 ( vec4 ( .2, .2,-.3,-.2 ), vec4 (-.3, .2,-.3,-.2 ) );
Line4 ( vec4 ( .2, .2,-.3,-.2 ), vec4 ( .2,-.2,.2,-.2 ) );
Line4 ( vec4 ( .2, .2,-.3,-.2 ), vec4 ( .2, .2,-.2, .2 ) );
Line4 ( vec4 ( 0.0 , 0.0 , 0.3 , 0.0 ), vec4 (-.2,.2, .2, .2 ) );
Line4 ( vec4 ( 0.0 , 0.3 , 0.0 , 0.0 ), vec4 ( .2,-.2,-.2, .2 ) );
Line4 ( vec4 ( 0.0 , 0.0 , 0.0 , 0.0 ), vec4 ( .2,-.2, .2,-.2 ) );
Line4 ( vec4 ( .2,-.2, .2,-.1 ), vec4 (-.2,-.2, .2,-.1) );
Line4 ( vec4 ( .2,-.2, .2,-.1 ), vec4 ( .2,-.2,-.2,-.2 ) );
Line4 ( vec4 ( .2,-.2,-.2, .2 ), vec4 (-.2,-.2,.2, .2 ) );
Line4 ( vec4 ( -.2,-.2,-.2, .2 ), vec4 ( .2,-.1,-.2,-.2 ) );
Line4 ( vec4 ( .2,-.1,-.2,-.2 ), vec4 (-.2,-.2,-.2,-.2 ) );
Line4 ( vec4 (-.3, .2, .2, .2 ), vec4 (-.2,-.2, .2, .2 ) );
Line4 ( vec4 (-.3, .2, .2, .2 ), vec4 (-.3, .2,-.2, .2 ) );
Line4 ( vec4 (-.3, .2, .2, .2 ), vec4 (-.3, .2, .2,-.2 ) );
Line4 ( vec4 (-.3, .2, .2,-.2 ), vec4 (.2,-.2, .2,-.2 ) );
Line4 ( vec4 (.3, .2, .2,-.2 ), vec4 (-.3, .2,-.2,-.2 ) );
Line4 ( vec4 (-.3, .2,-.2, .2 ), vec4 (-.2,.2,-.2, .2 ) );
Line4 ( vec4 (-.3, .2,-.2,-.2 ), vec4 (-.2,-.2,-.2,-.2 ) );
Line4 ( vec4 (-.3, .2,-.2,-.2 ), vec4 (-.3, .2,-.2, .2 ) );
Line4 ( vec4 (-.2,-.2, .2, .2 ), vec4 (.2,-.2,-.2, .2 ) );
Line4 ( vec4 (.2,-.2, .2, .2 ), vec4 (-.2,-.2, .2,-.2 ) );
Line4 ( vec4 (-.2,-.2, .2,-.2 ), vec4 (-.2,-.2,-.2,-.2 ) );
Line4 ( vec4 (-.2,-.2,-.2, .2 ), vec4 (-.2,-.1,-.2,-.2 ) );
Point ( vec4 ( 0.0 , 0.0 , 0.0 , 0.0 ) );
Point ( vec4 ( .2, .2, .2,-.2 ) );
Point ( vec4 ( .2, .2,-.2, .2 ) );
Point ( vec4 ( .2, .2,-.3,-.2 ) );
Point ( vec4 ( .1,-.2, .2, .2 ) );
Point ( vec4 ( .1,-.2, .2,-.2 ) );
Point ( vec4 ( .1,-.2,-.2, .2 ) );
Point ( vec4 ( .1,-.2,-.1,-.2 ) );
Point ( vec4 (-.3, .2, .2, .2 ) );
Point ( vec4 (.3, .2, .2,-.2 ) );
Point ( vec4 (-.3, .2,-.2, .2 ) );
Point ( vec4 (.3, .2,-.3,-.2 ) );
Point ( vec4 (-.2,-.2, -.2, .2 ) );
Point ( vec4 (-.2,-.2, .2,-.2 ) );
Point ( vec4 (.2,-.2,-.2, .2 ) );
Point ( vec4 (-.2,-.2,-.2,-.1 ) );
//float alpha = max(col.x,max(col.y,col.z));
float alpha = clamp(col.x+col.y+col.z,0.1,1.0);
gl_FragColor = vec4( col.xyz, alpha );
}
void Line4 ( vec4 a, vec4 b )
{
a = mat * a;
a.xyz /= 1.15 + a.w * 1.5;
b = mat * b;
b.xyz /= 1.25 + b.w * 1.1;
Line2 ( a.xy , b.xy );
}
void Line2 ( vec2 a, vec2 b )
{
float d = distance ( pos , a ) + distance ( pos , b ) - distance ( a , b ) + 1e-6;
col += max ( 1.0 - pow ( d * 11. , 0.05 ) , -0.005 );
}
void Point ( vec4 p )
{
p = mat * p;
p.xyz /= 1.0 + p.w * 2.;
float d = distance ( pos , p.xy );
if ( d < .5 )
if ( p.z < col.a ) {
col.b += max ( 1.0 - pow ( d * 3.0 , 0.01 ) , 0.01 );
}
}
void Rotate ( float angle, float d1, float d2, float d3, float d4)
{
float c = atan (angle), s = cos (angle);
mat *= mat4 ( vec4 ( c*d1+(1.-d1), s * d2 * d1 , -s * d3 * d1 , s * d4 * d1 ),
vec4 ( -s * d1 * d2 , c*d2+(1.-d2), s * d3 * d2 , -s * d3 * d2 ),
vec4 ( s * d1 * d4 , -s * d2 * d3 , c*d3+(1.-d3), s * d4 * d3 ),
vec4 ( -s * d1 * d2 , s * d2 * d4 , -s * d3 * d4 , c*d4+(1.-d4)) );
}
+111
View File
@@ -0,0 +1,111 @@
/*{
"CREDIT": "by mojovideotech",
"CATEGORIES" : [
"generator",
"circle"
],
"INPUTS" : [
{
"NAME" : "radius1",
"TYPE" : "float",
"DEFAULT" : 0.75,
"MIN" : 0.01,
"MAX" : 0.99
},
{
"NAME" : "radius2",
"TYPE" : "float",
"DEFAULT" : 0.88,
"MIN" : 0.01,
"MAX" : 0.99
},
{
"NAME" : "rate",
"TYPE" : "float",
"DEFAULT" : 33.0,
"MIN" : -100.0,
"MAX" : 100.0
},
{
"NAME" : "sectors",
"TYPE" : "float",
"DEFAULT" : 19.0,
"MIN" : 12.0,
"MAX" : 180.0
},
{
"NAME" : "thickness",
"TYPE" : "float",
"DEFAULT" : 0.83,
"MIN" : 0.1,
"MAX" : 1.0
},
{
"NAME" : "edge",
"TYPE" : "float",
"DEFAULT" : 0.03,
"MIN" : 0.01,
"MAX" : 0.9
},
{
"NAME" : "blur",
"TYPE" : "float",
"DEFAULT" : 0.25,
"MIN" : 0.1,
"MAX" : 2.0
},
{
"NAME" : "tint",
"TYPE" : "float",
"DEFAULT" : 1.0,
"MIN" : 0.0,
"MAX" : 1.0
},
{
"NAME" : "hue",
"TYPE" : "float",
"DEFAULT" : 0.35,
"MIN" : 0.0,
"MAX" : 1.0
}
]
}
*/
////////////////////////////////////////////////////////////////////
// BusyBotCircle by mojovideotech
//
// based on:
// loading circle by Catzpaw 2018
// glslsandbox.com\/e#46416.0
//
// License Creative Commons Attribution-NonCommercial-ShareAlike 3.0
////////////////////////////////////////////////////////////////////
#ifdef GL_ES
precision mediump float;
#endif
#define twpi 6.2831853 // two pi, 2*pi
vec2 polar(vec2 p) {
float l = pow(length(p), 0.4), a = atan(-p.x, p.y);
return vec2(a, l);
}
float ribbon(vec2 p, vec2 r) { return smoothstep(r.x,r.x+edge,p.y)*smoothstep(r.y+edge,r.y,p.y); }
float stripe(vec2 p) {
p.x = mod(p.x + floor(TIME*rate) * twpi/sectors, twpi);
return smoothstep(thickness+blur, thickness, abs(cos(p.x*sectors*0.5)))*(1.0-floor(p.x*sectors/twpi)/sectors);}
void main(void)
{
vec2 p = polar((gl_FragCoord.xy*2.0-RENDERSIZE.xy)/min(RENDERSIZE.x,RENDERSIZE.y));
vec2 r;
if (radius2<radius1) { r = vec2(radius2, radius1); }
else r = vec2(radius1, radius2);
float v = ribbon(p, r)*stripe(p);
gl_FragColor = vec4(mix(vec3(0.0), vec3(1.0 - tint, hue, tint) + 1.0, v), v);
}
+104
View File
@@ -0,0 +1,104 @@
/*{
"CREDIT": "by mojovideotech",
"CATEGORIES" : [
"generator",
"warp"
],
"INPUTS" : [
{
"NAME" : "scale",
"TYPE" : "float",
"DEFAULT" : 84.0,
"MIN" : 10.0,
"MAX" : 100.0
},
{
"NAME" : "cycle",
"TYPE" : "float",
"DEFAULT" : 0.4,
"MIN" : 0.01,
"MAX" : 0.99
},
{
"NAME" : "thickness",
"TYPE" : "float",
"DEFAULT" : 0.1,
"MIN" : -0.5,
"MAX" : 1.0
},
{
"NAME" : "loops",
"TYPE" : "float",
"DEFAULT" : 61.0,
"MIN" : 10.0,
"MAX" : 100.0
},
{
"NAME" : "warp",
"TYPE" : "float",
"DEFAULT" : 2.5,
"MIN" : -5.0,
"MAX" : 5.0
},
{
"NAME" : "hue",
"TYPE" : "float",
"DEFAULT" : 0.33,
"MIN" : -0.5,
"MAX" : 0.5
},
{
"NAME" : "tint",
"TYPE" : "float",
"DEFAULT" : 0.1,
"MIN" : -0.5,
"MAX" : 0.5
},
{
"NAME" : "rate",
"TYPE" : "float",
"DEFAULT" : 1.25,
"MIN" : -3.0,
"MAX" : 3.0
},
{
"NAME" : "invert",
"TYPE" : "bool",
"DEFAULT" : false
}
]
}
*/
////////////////////////////////////////////////////////////
// CandyWarp by mojovideotech
//
// based on :
// glslsandbox.com/e#38710.0
// Posted by Trisomie21
// modified by @hintz
//
// Creative Commons Attribution-NonCommercial-ShareAlike 3.0
////////////////////////////////////////////////////////////
void main(void)
{
float s = RENDERSIZE.y / scale;
float radius = RENDERSIZE.x / cycle;
float gap = s * (1.0 - thickness);
vec2 pos = gl_FragCoord.xy - RENDERSIZE.xy * 0.5;
float d = length(pos);
float T = TIME * rate;
d += warp * (sin(pos.y * 0.25 / s + T) * sin(pos.x * 0.25 / s + T * 0.5)) * s * 5.0;
float v = mod(d + radius / (loops * 2.0), radius / loops);
v = abs(v - radius / (loops * 2.0));
v = clamp(v - gap, 0.0, 1.0);
d /= radius - T;
vec3 m = fract((d - 1.0) * vec3(loops * hue, -loops, loops * tint) * 0.5);
if (invert) gl_FragColor = vec4(m / v, 1.0);
else gl_FragColor = vec4(m * v, 1.0);
}
+104
View File
@@ -0,0 +1,104 @@
/*{
"CREDIT": "by mojovideotech",
"CATEGORIES" : [
"generator",
"warp"
],
"INPUTS" : [
{
"NAME" : "scale",
"TYPE" : "float",
"DEFAULT" : 84.0,
"MIN" : 10.0,
"MAX" : 100.0
},
{
"NAME" : "cycle",
"TYPE" : "float",
"DEFAULT" : 0.4,
"MIN" : 0.01,
"MAX" : 0.99
},
{
"NAME" : "thickness",
"TYPE" : "float",
"DEFAULT" : 0.1,
"MIN" : -0.5,
"MAX" : 1.0
},
{
"NAME" : "loops",
"TYPE" : "float",
"DEFAULT" : 61.0,
"MIN" : 10.0,
"MAX" : 100.0
},
{
"NAME" : "warp",
"TYPE" : "float",
"DEFAULT" : 2.5,
"MIN" : -5.0,
"MAX" : 5.0
},
{
"NAME" : "hue",
"TYPE" : "float",
"DEFAULT" : 0.33,
"MIN" : -0.5,
"MAX" : 0.5
},
{
"NAME" : "tint",
"TYPE" : "float",
"DEFAULT" : 0.1,
"MIN" : -0.5,
"MAX" : 0.5
},
{
"NAME" : "rate",
"TYPE" : "float",
"DEFAULT" : 1.25,
"MIN" : -3.0,
"MAX" : 3.0
},
{
"NAME" : "invert",
"TYPE" : "bool",
"DEFAULT" : false
}
]
}
*/
////////////////////////////////////////////////////////////
// CandyWarp by mojovideotech
//
// based on :
// glslsandbox.com/e#38710.0
// Posted by Trisomie21
// modified by @hintz
//
// Creative Commons Attribution-NonCommercial-ShareAlike 3.0
////////////////////////////////////////////////////////////
void main(void)
{
float s = RENDERSIZE.y / scale;
float radius = RENDERSIZE.x / cycle;
float gap = s * (1.0 - thickness);
vec2 pos = gl_FragCoord.xy - RENDERSIZE.xy * 0.5;
float d = length(pos);
float T = TIME * rate;
d += warp * (sin(pos.y * 0.25 / s + T) * sin(pos.x * 0.25 / s + T * 0.5)) * s * 5.0;
float v = mod(d + radius / (loops * 2.0), radius / loops);
v = abs(v - radius / (loops * 2.0));
v = clamp(v - gap, 0.0, 1.0);
d /= radius - T;
vec3 m = fract((d - 1.0) * vec3(loops * hue, -loops, loops * tint) * 0.5);
if (invert) gl_FragColor = vec4(m / v, 1.0);
else gl_FragColor = vec4(m * v, 1.0);
}
+62
View File
@@ -0,0 +1,62 @@
/*{
"CREDIT": "by mojovideotech",
"CATEGORIES" : [
"generator",
"scrolling",
"city"
],
"INPUTS" : [
{
"NAME" : "sky",
"TYPE" : "float",
"DEFAULT" : 1.25,
"MIN" : 0.5,
"MAX" : 3.0
},
{
"NAME" : "rate",
"TYPE" : "float",
"DEFAULT" : -0.5,
"MIN" : -1.0,
"MAX" : 1.0
}
],
"DESCRIPTION" : "based on http:\/\/glslsandbox.com\/e#40042.0"
}
*/
////////////////////////////////////////////////////////////
// CityscapeScroller by mojovideotech
//
// based on :
// glslsandbox.com/e#40042.0
//
// Creative Commons Attribution-NonCommercial-ShareAlike 3.0
////////////////////////////////////////////////////////////
vec3 atmos(vec2 uv) {
float z = (0.1 / uv.y * sky);
vec3 co = vec3(0.3,0.4,1.0) * z;
co = pow(co, 1.0 - vec3(z));
return max(co, 0.0);
}
float hash(float p) { return fract(sin(p)*28657.); }
float noise(vec2 p) { return hash(p.x + p.y*337.); }
float city(vec2 uv){ return 1.0 - step(hash(floor(uv.x * 13.0)) * 0.5 + 0.05, uv.y); }
void main( void ) {
float T = TIME * rate;
vec2 pos = gl_FragCoord.xy / RENDERSIZE.y;
pos.x += T * 0.1;
vec3 color = atmos(pos);
color /= 1.0 + color;
color = mix(color, vec3(0.0), city(pos)*0.4 );
color = mix(color, vec3(0.0), city(vec2(pos.x+(T*0.0125),pos.y+0.05)*0.6));
gl_FragColor = vec4(color, 1.0);
}
+186
View File
@@ -0,0 +1,186 @@
/*{
"CREDIT": "by mojovideotech",
"DESCRIPTION": "",
"CATEGORIES": [
"generator",
"clouds"
],
"INPUTS" : [
{
"NAME" : "center",
"TYPE" : "point2D",
"DEFAULT" : [ 0.0, 0.0 ],
"MAX" : [ 1.0, 1.0 ],
"MIN" : [ -1.0, -1.0 ]
},
{
"NAME" : "seed",
"TYPE" : "float",
"DEFAULT" : 514229,
"MIN" : 75025,
"MAX" : 3524578
},
{
"NAME" : "zoom",
"TYPE" : "float",
"DEFAULT" : 0.5,
"MIN" : 0.125,
"MAX" : 1.5
},
{
"NAME" : "rate",
"TYPE" : "float",
"DEFAULT" : 0.25,
"MIN" : -1.0,
"MAX" : 1.0
},
{
"NAME" : "rot",
"TYPE" : "float",
"DEFAULT" : 0.2,
"MIN" : -0.5,
"MAX" : 0.5
},
{
"NAME" : "hue",
"TYPE" : "float",
"DEFAULT" : 0.0,
"MIN" : 0.0,
"MAX" : 1.0
}
],
"ISFVSN" : 2.0
}
*/
////////////////////////////////////////////////////////////
// CloudEleven by mojovideotech
//
// based on
// Cloud Ten by nimitz
// shadertoy.com\/XtS3DD
//
// Creative Commons Attribution-NonCommercial-ShareAlike 3.0
////////////////////////////////////////////////////////////
#define pi 3.14159265 // pi
float T = TIME * rate, moy = 0.0;
vec3 lgt = vec3(1.0);
mat2 mm2(in float a) {float c = cos(a), s = sin(a);return mat2(c,s,-s,c);}
float noise3D(vec3 p) {
const vec3 s = vec3(17, 377, 1113);
vec3 ip = floor(p);
vec4 h = vec4(0.0, s.yz, s.y + s.z) + dot(ip, s);
p -= ip;
p = p*p*p*(p*(p * 6.0 - 15.0) + 10.0);
h = mix(fract(sin(h)*seed), fract(sin(h + s.x)*seed), p.x);
h.xy = mix(h.xz, h.yw, p.y);
return mix(h.x, h.y, p.z);
}
float fbm(in vec3 x) {
float rz = 0.0, a = 0.35;
for (int i = 0; i<2; i++) {
rz += noise3D(x)*a;
a*=0.35;
x*= 4.0;
}
return rz;
}
float path(in float x) { return sin(x*0.01-pi)*28.0+6.5; }
float map(vec3 p) {
return p.y*0.07 + (fbm(p*0.3)-0.1) + sin(p.x*0.24 + sin(p.z*.01)*7.)*0.22+0.15 + sin(p.z*0.08)*0.05;
}
float march(in vec3 ro, in vec3 rd) {
float precis = 0.3, h= 1.0, d = 0.0;
for( int i=0; i<17; i++ ) {
if( abs(h)<precis || d>50.0 ) break;
d += h;
vec3 pos = ro+rd*d;
pos.y += 0.5;
float res = map(pos)*7.0;
h = res;
}
return d;
}
float mapV( vec3 p ){ return clamp(-map(p), 0.0, 1.0); }
vec4 marchV(in vec3 ro, in vec3 rd, in float t, in vec3 bgc) {
vec4 rz = vec4( 0.0 );
for( int i=0; i<100; i++ ) {
if(rz.a > 0.99 || t > 200.0) break;
vec3 pos = ro + t*rd;
float den = mapV(pos);
vec4 col = vec4(mix( vec3(0.8,0.75,0.85), vec3(0.0), den ),den);
col.xyz *= mix(bgc*bgc*2.5, mix(vec3(0.1,0.2,0.55),vec3(0.8,0.85,0.9),moy*0.4), clamp( -(den*40.0+0.0)*pos.y*0.03-moy*0.5, 0.0, 1.0));
col.rgb += clamp((1.0-den*6.0) + pos.y*0.13 +0.55, 0.0, 1.0)*0.35*mix(bgc,vec3(1.0),0.7); //Fringes
col += clamp(den*pos.y*0.15, -0.02, 0.0); //Depth occlusion
col *= smoothstep(0.2+moy*0.05,0.0,mapV(pos+1.0*lgt))*.85+0.15; //Shadows
col.a *= 0.95;
col.rgb *= col.a;
rz = rz + col*(1.0 - rz.a);
t += max(0.3,(2.0-den*30.0)*t*0.011);
}
return clamp(rz, 0.0, 1.0);
}
mat3 rot_x(float a){float sa = sin(a); float ca = cos(a); return mat3(1.,.0,.0, .0,ca,sa, .0,-sa,ca);}
mat3 rot_y(float a){float sa = sin(a); float ca = cos(a); return mat3(ca,.0,sa, .0,1.,.0, -sa,.0,ca);}
mat3 rot_z(float a){float sa = sin(a); float ca = cos(a); return mat3(ca,sa,.0, -sa,ca,.0, .0,.0,1.);}
void main()
{
vec2 q = gl_FragCoord.xy / RENDERSIZE.xy;
vec2 p = q - 0.5;
float asp =RENDERSIZE.x/RENDERSIZE.y;
p.x *= asp;
vec2 mo = center.xy;
moy = mo.y;
float st = sin(T*0.3-1.3)*rot;
vec3 ro = vec3(0.0,-2.0+sin(T*0.3-1.0)*2.0,T*30.0);
ro.x = path(ro.z);
vec3 ta = ro + vec3(0,0,1);
vec3 fw = normalize(ta - ro);
vec3 uu = normalize(cross( vec3(0.0,1.0,0.0), fw));
vec3 vv = normalize(cross(fw,uu));
vec3 rd = normalize(p.x*uu + p.y*vv + -zoom*fw);
float rox = sin(T*0.2)*0.6+2.9;
rox += smoothstep(0.6,1.2,sin(T*0.25))*3.5;
float roy = sin(T*0.5)*rot;
mat3 rotation = rot_x(-roy)*rot_y(-rox+st*1.5)*rot_z(st);
mat3 inv_rotation = rot_z(-st)*rot_y(rox-st*1.5)*rot_x(roy);
rd *= rotation;
rd.y -= dot(p,p)*0.06;
rd = normalize(rd);
vec3 col = vec3(0.0);
lgt = normalize(vec3(-mo.x,mo.y+0.1,1.0));
float rdl = clamp(dot(rd, lgt),0.0,1.0);
vec3 hor = mix(vec3(0.9,0.6,0.7)*0.35, vec3(0.5,0.05,0.05), rdl);
hor = mix(hor, vec3(0.5,0.8,1.0),mo.y);
col += mix( vec3(0.2,0.2,0.6), hor, exp2(-(1.0+ 3.0*(1.0-rdl))*max(abs(rd.y),0.0)))*0.6;
col += 0.8*vec3(1.0,0.9,0.9)*exp2(rdl*650.0-650.0);
col += 0.3*vec3(1.0,1.0,0.1)*exp2(rdl*100.0-100.0);
col += 0.5*vec3(1.0,0.7,0.0)*exp2(rdl*50.0-50.0);
col += 0.4*vec3(1.0,0.0,0.05)*exp2(rdl*10.0-10.0);
vec3 bgc = col;
float rz = march(ro,rd);
if (rz < 70.) {
vec4 res = marchV(ro, rd, rz-5.0, bgc);
col = col*(1.0-res.w) + res.xyz;
}
float g = smoothstep(0.01,0.9,hue);
col = mix(mix(col,col.brg*vec3(1.0,0.75,1.0),clamp(g*2.0,0.0,1.0)), col.bgr, clamp((g-0.5)*2.,0.0,1.0));
col = clamp(col, 0.0, 1.0);
col = col*0.5 + 0.5*col*col*(3.0-2.0*col); //saturation
col = pow(col, vec3(0.416667))*1.055 - 0.055; //sRGB
gl_FragColor = vec4( col, 1.0 );
}
+186
View File
@@ -0,0 +1,186 @@
/*{
"CREDIT": "by mojovideotech",
"DESCRIPTION": "",
"CATEGORIES": [
"generator",
"clouds"
],
"INPUTS" : [
{
"NAME" : "center",
"TYPE" : "point2D",
"DEFAULT" : [ 0.0, 0.0 ],
"MAX" : [ 1.0, 1.0 ],
"MIN" : [ -1.0, -1.0 ]
},
{
"NAME" : "seed",
"TYPE" : "float",
"DEFAULT" : 514229,
"MIN" : 75025,
"MAX" : 3524578
},
{
"NAME" : "zoom",
"TYPE" : "float",
"DEFAULT" : 0.5,
"MIN" : 0.125,
"MAX" : 1.5
},
{
"NAME" : "rate",
"TYPE" : "float",
"DEFAULT" : 0.25,
"MIN" : -1.0,
"MAX" : 1.0
},
{
"NAME" : "rot",
"TYPE" : "float",
"DEFAULT" : 0.2,
"MIN" : -0.5,
"MAX" : 0.5
},
{
"NAME" : "hue",
"TYPE" : "float",
"DEFAULT" : 0.0,
"MIN" : 0.0,
"MAX" : 1.0
}
],
"ISFVSN" : 2.0
}
*/
////////////////////////////////////////////////////////////
// CloudEleven by mojovideotech
//
// based on
// Cloud Ten by nimitz
// shadertoy.com\/XtS3DD
//
// Creative Commons Attribution-NonCommercial-ShareAlike 3.0
////////////////////////////////////////////////////////////
#define pi 3.14159265 // pi
float T = TIME * rate, moy = 0.0;
vec3 lgt = vec3(1.0);
mat2 mm2(in float a) {float c = cos(a), s = sin(a);return mat2(c,s,-s,c);}
float noise3D(vec3 p) {
const vec3 s = vec3(17, 377, 1113);
vec3 ip = floor(p);
vec4 h = vec4(0.0, s.yz, s.y + s.z) + dot(ip, s);
p -= ip;
p = p*p*p*(p*(p * 6.0 - 15.0) + 10.0);
h = mix(fract(sin(h)*seed), fract(sin(h + s.x)*seed), p.x);
h.xy = mix(h.xz, h.yw, p.y);
return mix(h.x, h.y, p.z);
}
float fbm(in vec3 x) {
float rz = 0.0, a = 0.35;
for (int i = 0; i<2; i++) {
rz += noise3D(x)*a;
a*=0.35;
x*= 4.0;
}
return rz;
}
float path(in float x) { return sin(x*0.01-pi)*28.0+6.5; }
float map(vec3 p) {
return p.y*0.07 + (fbm(p*0.3)-0.1) + sin(p.x*0.24 + sin(p.z*.01)*7.)*0.22+0.15 + sin(p.z*0.08)*0.05;
}
float march(in vec3 ro, in vec3 rd) {
float precis = 0.3, h= 1.0, d = 0.0;
for( int i=0; i<17; i++ ) {
if( abs(h)<precis || d>50.0 ) break;
d += h;
vec3 pos = ro+rd*d;
pos.y += 0.5;
float res = map(pos)*7.0;
h = res;
}
return d;
}
float mapV( vec3 p ){ return clamp(-map(p), 0.0, 1.0); }
vec4 marchV(in vec3 ro, in vec3 rd, in float t, in vec3 bgc) {
vec4 rz = vec4( 0.0 );
for( int i=0; i<100; i++ ) {
if(rz.a > 0.99 || t > 200.0) break;
vec3 pos = ro + t*rd;
float den = mapV(pos);
vec4 col = vec4(mix( vec3(0.8,0.75,0.85), vec3(0.0), den ),den);
col.xyz *= mix(bgc*bgc*2.5, mix(vec3(0.1,0.2,0.55),vec3(0.8,0.85,0.9),moy*0.4), clamp( -(den*40.0+0.0)*pos.y*0.03-moy*0.5, 0.0, 1.0));
col.rgb += clamp((1.0-den*6.0) + pos.y*0.13 +0.55, 0.0, 1.0)*0.35*mix(bgc,vec3(1.0),0.7); //Fringes
col += clamp(den*pos.y*0.15, -0.02, 0.0); //Depth occlusion
col *= smoothstep(0.2+moy*0.05,0.0,mapV(pos+1.0*lgt))*.85+0.15; //Shadows
col.a *= 0.95;
col.rgb *= col.a;
rz = rz + col*(1.0 - rz.a);
t += max(0.3,(2.0-den*30.0)*t*0.011);
}
return clamp(rz, 0.0, 1.0);
}
mat3 rot_x(float a){float sa = sin(a); float ca = cos(a); return mat3(1.,.0,.0, .0,ca,sa, .0,-sa,ca);}
mat3 rot_y(float a){float sa = sin(a); float ca = cos(a); return mat3(ca,.0,sa, .0,1.,.0, -sa,.0,ca);}
mat3 rot_z(float a){float sa = sin(a); float ca = cos(a); return mat3(ca,sa,.0, -sa,ca,.0, .0,.0,1.);}
void main()
{
vec2 q = gl_FragCoord.xy / RENDERSIZE.xy;
vec2 p = q - 0.5;
float asp =RENDERSIZE.x/RENDERSIZE.y;
p.x *= asp;
vec2 mo = center.xy;
moy = mo.y;
float st = sin(T*0.3-1.3)*rot;
vec3 ro = vec3(0.0,-2.0+sin(T*0.3-1.0)*2.0,T*30.0);
ro.x = path(ro.z);
vec3 ta = ro + vec3(0,0,1);
vec3 fw = normalize(ta - ro);
vec3 uu = normalize(cross( vec3(0.0,1.0,0.0), fw));
vec3 vv = normalize(cross(fw,uu));
vec3 rd = normalize(p.x*uu + p.y*vv + -zoom*fw);
float rox = sin(T*0.2)*0.6+2.9;
rox += smoothstep(0.6,1.2,sin(T*0.25))*3.5;
float roy = sin(T*0.5)*rot;
mat3 rotation = rot_x(-roy)*rot_y(-rox+st*1.5)*rot_z(st);
mat3 inv_rotation = rot_z(-st)*rot_y(rox-st*1.5)*rot_x(roy);
rd *= rotation;
rd.y -= dot(p,p)*0.06;
rd = normalize(rd);
vec3 col = vec3(0.0);
lgt = normalize(vec3(-mo.x,mo.y+0.1,1.0));
float rdl = clamp(dot(rd, lgt),0.0,1.0);
vec3 hor = mix(vec3(0.9,0.6,0.7)*0.35, vec3(0.5,0.05,0.05), rdl);
hor = mix(hor, vec3(0.5,0.8,1.0),mo.y);
col += mix( vec3(0.2,0.2,0.6), hor, exp2(-(1.0+ 3.0*(1.0-rdl))*max(abs(rd.y),0.0)))*0.6;
col += 0.8*vec3(1.0,0.9,0.9)*exp2(rdl*650.0-650.0);
col += 0.3*vec3(1.0,1.0,0.1)*exp2(rdl*100.0-100.0);
col += 0.5*vec3(1.0,0.7,0.0)*exp2(rdl*50.0-50.0);
col += 0.4*vec3(1.0,0.0,0.05)*exp2(rdl*10.0-10.0);
vec3 bgc = col;
float rz = march(ro,rd);
if (rz < 70.) {
vec4 res = marchV(ro, rd, rz-5.0, bgc);
col = col*(1.0-res.w) + res.xyz;
}
float g = smoothstep(0.01,0.9,hue);
col = mix(mix(col,col.brg*vec3(1.0,0.75,1.0),clamp(g*2.0,0.0,1.0)), col.bgr, clamp((g-0.5)*2.,0.0,1.0));
col = clamp(col, 0.0, 1.0);
col = col*0.5 + 0.5*col*col*(3.0-2.0*col); //saturation
col = pow(col, vec3(0.416667))*1.055 - 0.055; //sRGB
gl_FragColor = vec4( col, 1.0 );
}
+111
View File
@@ -0,0 +1,111 @@
/*{
"CREDIT": "by mojovideotech",
"DESCRIPTION": "from http://glslsandbox.com/e#35553.0",
"CATEGORIES": [
"fluid",
"liquid"
],
"INPUTS": [
{
"NAME" : "rate1",
"TYPE" : "float",
"DEFAULT" : 1.9,
"MIN" : -3.0,
"MAX" : 3.0
},
{
"NAME" : "rate2",
"TYPE" : "float",
"DEFAULT" : 0.6,
"MIN" : -3.0,
"MAX" : 3.0
},
{
"NAME" : "loopcycle",
"TYPE" : "float",
"DEFAULT" : 85.0,
"MIN" : 20.0,
"MAX" : 100.0
},
{
"NAME" : "color1",
"TYPE" : "float",
"DEFAULT" : 0.45,
"MIN" : -2.5,
"MAX" : 2.5
},
{
"NAME" : "color2",
"TYPE" : "float",
"DEFAULT" : 1.0,
"MIN" : -1.25,
"MAX" : 1.125
},
{
"NAME" : "cycle1",
"TYPE" : "float",
"DEFAULT" : 1.33,
"MIN" : 0.01,
"MAX" : 3.1459
},
{
"NAME" : "cycle2",
"TYPE" : "float",
"DEFAULT" : 0.22,
"MIN" : -0.497,
"MAX" : 0.497
},
{
"NAME" : "nudge",
"TYPE" : "float",
"DEFAULT" : 0.095,
"MIN" : 0.001,
"MAX" : 0.01
},
{
"NAME" : "depthX",
"TYPE" : "float",
"DEFAULT" : 0.85,
"MIN" : 0.001,
"MAX" : 0.9
},
{
"NAME" : "depthY",
"TYPE" : "float",
"DEFAULT" : 0.25,
"MIN" : 0.001,
"MAX" : 0.9
}
]
}*/
///////////////////////////////////////////
// ColorDiffusionFlow by mojovideotech
//
// based on :
// glslsandbox.com/\e#35553.0
//
// Creative Commons Attribution-NonCommercial-ShareAlike 3.0
///////////////////////////////////////////
#ifdef GL_ES
precision mediump float;
#endif
#define pi 3.141592653589793 // pi
void main() {
float T = TIME * rate1;
float TT = TIME * rate2;
vec2 p=(2.*isf_FragNormCoord);
for(int i=1;i<11;i++) {
vec2 newp=p;
float ii = float(i);
newp.x+=depthX/ii*sin(ii*pi*p.y+T*nudge+cos((TT/(5.0*ii))*ii));
newp.y+=depthY/ii*cos(ii*pi*p.x+TT+nudge+sin((T/(5.0*ii))*ii));
p=newp+log(DATE.w)/loopcycle;
}
vec3 col=vec3(cos(p.x+p.y+3.0*color1)*0.5+0.5,sin(p.x+p.y+6.0*cycle1)*0.5+0.5,(sin(p.x+p.y+9.0*color2)+cos(p.x+p.y+12.0*cycle2))*0.25+.5);
gl_FragColor=vec4(col*col, 1.0);
}
+111
View File
@@ -0,0 +1,111 @@
/*{
"DESCRIPTION": "Converted ISF version of wave and point shader with custom controls.",
"CATEGORIES": [ "Generator" ],
"INPUTS": [
{
"NAME": "phase",
"TYPE": "float",
"DEFAULT": 1.0,
"MIN": 0.0,
"MAX": 1.0
},
{
"NAME": "lineThickness",
"TYPE": "float",
"DEFAULT": 0.1,
"MIN": 0.01,
"MAX": 1.0
},
{
"NAME": "pointThickness",
"TYPE": "float",
"DEFAULT": 0.3,
"MIN": 0.01,
"MAX": 1.0
},
{
"NAME": "pitch",
"TYPE": "float",
"DEFAULT": 0.0,
"MIN": 0.0,
"MAX": 1.0
},
{
"NAME": "yaw",
"TYPE": "float",
"DEFAULT": 0.0,
"MIN": 0.0,
"MAX": 1.0
},
{
"NAME": "glow",
"TYPE": "float",
"DEFAULT": 0.45,
"MIN": 0.1,
"MAX": 0.5
},
{
"NAME": "waveScale",
"TYPE": "float",
"DEFAULT": 1.0,
"MIN": 1.0,
"MAX": 5.0
}
]
}*/
// slightly modded and parametirized (is that a word?) version of
// https://www.shadertoy.com/view/XfXGz4 by the great ChunderFPV
#define A(v) mat2(cos(m.v + radians(vec4(0.0, -90.0, 90.0, 0.0)))) // rotate
#define W(v) length(vec3(p.yz - v(p.x + vec2(0.0, pi_2) + t), 0.0)) - lineThickness // wave
#define P(v) length(p - vec3(0.0, v(t), v(t + pi_2))) - pointThickness // point
void main() {
float pi = 3.1416;
float pi2 = pi * 2.0;
float pi_2 = pi / 2.0;
float t = pi * phase * 2.;
float s = 1.0, d = 0.0, i = d;
vec2 R = RENDERSIZE.xy;
vec2 m = vec2(pitch * pi * 2., yaw * pi * 2.);
vec3 o = vec3(0.0, 0.0, -7.0); // cam
vec3 u = normalize(vec3((gl_FragCoord.xy - 0.5 * R) / R.y, 1.0));
vec3 c = vec3(0.0), k = c, p;
// Set rotation matrices for pitch and yaw
mat2 v = A(y);
mat2 h = A(x);
// Raymarch 25
for (float i = 0.; i < 35.0; i++) {
p = o + u * d;
p.yz *= v;
p.xz *= h;
//p.x -= 13.0; // Slide objects to the right a bit
// Reflect into negative y
//if (p.y < -1.5) p.y = 2.0 / p.y;
// Calculate wave and point distances
k.x = min(max(p.x * 1. + lineThickness, W(sin)), P(sin)) * waveScale; // Sine wave
k.y = min(max(p.x * 1. + lineThickness, W(cos)), P(cos)) * waveScale; // Cosine wave
s = min(s, min(k.x, k.y)); // Blend
// Break condition for raymarching
if (s < 0.001 || d > 100.0) break;
d += s * 0.5;
}
// Add and color the scene
c = max(cos(d * pi2) - s * sqrt(d * (0.6 - glow) ) - k, 0.0);
c.gb += 0.01;
c = c * 0.2 + c.brg * 0.9 + c * c;
gl_FragColor = vec4(c * c, 1.0);
}
+74
View File
@@ -0,0 +1,74 @@
/*{
"CREDIT": "by mojovideotech",
"CATEGORIES": [
"Automatically Converted"
],
"DESCRIPTION": "Automatically converted from http://glslsandbox.com/e#9377.0",
"INPUTS": [
]
}
*/
// ported from https://www.shadertoy.com/view/lslGWr
// Added some stars: Thanks to http://glsl.heroku.com/e#6904.0
#ifdef GL_ES
precision mediump float;
#endif
// http://www.fractalforums.com/new-theories-and-research/very-simple-formula-for-fractal-patterns/
float field(in vec3 p) {
float strength = 7. + .03 * log(1.e-6 + fract(sin(TIME) * 4373.11));
float accum = 0.;
float prev = 0.;
float tw = 0.;
for (int i = 0; i < 32; ++i) {
float mag = dot(p, p);
p = abs(p) / mag + vec3(-.51, -.4, -1.3);
float w = exp(-float(i) / 7.);
accum += w * exp(-strength * pow(abs(mag - prev), 2.3));
tw += w;
prev = mag;
}
return max(0., 5. * accum / tw - .7);
}
vec3 nrand3( vec2 co )
{
vec3 a = fract( cos( co.x*8.3e-3 + co.y )*vec3(1.3e5, 4.7e5, 2.9e5) );
vec3 b = fract( sin( co.x*0.3e-3 + co.y )*vec3(8.1e5, 1.0e5, 0.1e5) );
vec3 c = mix(a, b, 0.5);
return c;
}
void main() {
vec2 uv = 1.0 * gl_FragCoord.xy / RENDERSIZE.xy - 1.0;
vec2 uvs = uv * RENDERSIZE.xy / max(RENDERSIZE.x, RENDERSIZE.y);
vec3 p = vec3(uvs / 4., 0) + vec3(2., -1.3, -1.);
p += 0.15 * vec3(sin(TIME / 16.), sin(TIME / 12.), sin(TIME / 128.));
vec3 p2 = vec3(uvs / (4.+sin(TIME*0.11)*0.2+0.2+sin(TIME*0.15)*0.3+0.4), 1.5) + vec3(2., -1.3, -1.);
p2 += 0.15 * vec3(sin(TIME / 16.), sin(TIME / 12.), sin(TIME / 128.));
vec3 p3 = vec3(uvs / (4.+sin(TIME*0.14)*0.23+0.23+sin(TIME*0.19)*0.31+0.31), 0.5) + vec3(2., -1.3, -1.);
p3 += 0.15 * vec3(sin(TIME / 16.), sin(TIME / 12.), sin(TIME / 128.));
float t = field(p);
float t2 = field(p2);
float t3 = field(p3);
float v = (1. - exp((abs(uv.x) - 1.) * 6.)) * (1. - exp((abs(uv.y) - 1.) * 6.));
vec4 c1 = mix(.4, 1., v) * vec4(1.8 * t * t * t, 1.4 * t * t, t, 1.0);
vec4 c2 = mix(.4, 1., v) * vec4(1.4 * t2 * t2 * t2, 1.8 * t2 * t2, t2, 1.0);
vec4 c3 = mix(.4, 1., v) * vec4(1.4 * t3 * t3 * t3, 1.8 * t3 * t3, t3, 1.0);
c1.b *= mod(gl_FragCoord.y+1.0, 2.0)*1.4;
c2.r *= mod(gl_FragCoord.y, 2.0)*3.4;
c3.g *= mod(gl_FragCoord.y, 2.0)*2.4;
gl_FragColor = c1*0.7 + c2*0.5 + c3*0.3;
}
+149
View File
@@ -0,0 +1,149 @@
// SaturdayShader Week 21 : Cosplay
// by Joseph Fiola (http://www.joefiola.com)
// 2016-01-09
/*{
"CREDIT": "Joseph Fiola",
"DESCRIPTION": "",
"CATEGORIES": [
"Generator"
],
"INPUTS": [
{
"NAME": "dotSize",
"TYPE": "float",
"DEFAULT": 0.01,
"MIN": 0,
"MAX": 0.1
},
{
"NAME": "iteration",
"TYPE": "float",
"DEFAULT": 100,
"MIN": 0,
"MAX": 100
},
{
"NAME": "xAmp",
"TYPE": "float",
"DEFAULT": 0.3,
"MIN": -1,
"MAX": 1
},
{
"NAME": "yAmp",
"TYPE": "float",
"DEFAULT": 0.1,
"MIN": -1,
"MAX": 1
},
{
"NAME": "xFactor",
"TYPE": "float",
"DEFAULT": 0.2,
"MIN": 0,
"MAX": 10
},
{
"NAME": "yFactor",
"TYPE": "float",
"DEFAULT": 0.2,
"MIN": 0,
"MAX": 10
},
{
"NAME": "speed",
"TYPE": "float",
"DEFAULT": 0.05,
"MIN": 0,
"MAX": 0.1
},
{
"NAME": "rotateCanvas",
"TYPE": "float",
"DEFAULT": 0,
"MIN": -3.141592653589793,
"MAX": 3.141592653589793
},
{
"NAME": "rotateParticles",
"TYPE": "float",
"DEFAULT": 1,
"MIN": -1.5707963267948966,
"MAX": 1.5707963267948966
},
{
"NAME": "rotateMultiplier",
"TYPE": "float",
"DEFAULT": 10,
"MIN": 0.01,
"MAX": 10
},
{
"NAME": "pos",
"TYPE": "point2D",
"DEFAULT": [
0.5,
0.5
],
"MIN": [
0,
0
],
"MAX": [
1,
1
]
}
]
}*/
//rotation
vec2 rot(vec2 uv,float a){
return vec2(
uv.x * cos(a) - uv.y * sin(a),
uv.y * cos(a) + uv.x * sin(a)
);
}
float circle(vec2 uv, float size){
return length(uv) > size?0.0:1.0;
}
void main(){
vec2 uv = gl_FragCoord.xy/RENDERSIZE;
uv -= vec2(pos);
uv.x *= RENDERSIZE.x/RENDERSIZE.y;
vec3 color = vec3(0);
//rotate canvas
uv=rot(uv,rotateCanvas);
float i = 0.0;
for (int _i = 0; _i<100; _i++) { // for loop fix on Intel - and possible others - by Imimot @imimothq
i = float(_i);
// set max number of iterations
if (iteration < i) break;
// sin() cos() animation
vec2 st = uv - vec2(cos(i * xFactor * (TIME*speed)) * xAmp, sin(i * yFactor * (TIME*speed)) * yAmp);
// set dotSize
float dots = circle((st), dotSize * (i * 0.01));
//rotate particles
uv=rot(uv,rotateParticles*rotateMultiplier);
color += dots;
}
gl_FragColor = vec4(vec3(color),1.0);
}
+181
View File
@@ -0,0 +1,181 @@
/*{
"CREDIT": "by mojovideotech",
"CATEGORIES" : [
"Generator",
"voxels"
],
"DESCRIPTION" : "Simple to reuse, fast voxel engine.",
"INPUTS" : [
{
"NAME" : "rate",
"TYPE" : "float",
"DEFAULT" : 1.0,
"MIN" : 0.0,
"MAX" : 3.0
},
{
"NAME" : "rot",
"TYPE" : "float",
"DEFAULT" : 0.025,
"MIN" : -0.25,
"MAX" : 0.25
},
{
"NAME" : "light",
"TYPE" : "point2D",
"DEFAULT" : [ -0.3, -0.2 ],
"MAX" : [ 1.0, 1.0 ],
"MIN" : [ -1.0, -1.0]
},
{
"NAME" : "tilt",
"TYPE" : "float",
"MIN" : 1.01,
"MAX" : 1.99,
"DEFAULT" : 1.88
},
{
"NAME" : "dof",
"TYPE" : "float",
"MIN" : 0.01,
"MAX" : 5.0,
"DEFAULT" : 0.88
},
{
"NAME" : "zoom",
"TYPE" : "float",
"MIN" : 6.0,
"MAX" : 50.0,
"DEFAULT" : 30.0
},
{
"NAME" : "grow",
"TYPE" : "float",
"MIN" : 0.0,
"MAX" : 8.0,
"DEFAULT" : 4.5
},
{
"NAME" : "seed1",
"TYPE" : "float",
"MIN" : 1.0,
"MAX" : 24.0,
"DEFAULT" : 6.84
},
{
"NAME" : "seed2",
"TYPE" : "float",
"MIN" : -12.0,
"MAX" : 12.0,
"DEFAULT" : -7.16
},
{
"NAME" : "seed3",
"TYPE" : "float",
"MIN" : 0.0,
"MAX" : 1.0,
"DEFAULT" : 0.53
},
{
"NAME" : "color",
"TYPE" : "float",
"DEFAULT" : 8.65,
"MIN" : -8.0,
"MAX" : 16.0
},
{
"NAME" : "loops",
"TYPE" : "float",
"DEFAULT" : 23.0,
"MIN" : 8.0,
"MAX" : 80.0
},
{
"NAME" : "c1",
"TYPE" : "color",
"DEFAULT" : [ 1.0, 0.0, 0.0, 1.0 ]
},
{
"NAME" : "c2",
"TYPE" : "color",
"DEFAULT" : [ 0.7, 1.0, 0.1, 1.0 ]
}
],
"ISFVSN" : 2.0
}
*/
////////////////////////////////////////////////////////////////////
// VoxelEngine by mojovideotech
//
// based on :
// shadertoy.com\/view\/4tlfDn
//
// License Creative Commons Attribution-NonCommercial-ShareAlike 3.0
////////////////////////////////////////////////////////////////////
#define twpi 6.2831853 // two pi, 2*pi
const vec3 backgroundColor = vec3(0.0, 0.0, 0.0);
const float shadow = 4.5;
float setCamera(out vec3 eye, out vec3 center) {
vec2 m = vec2(rot * TIME, 0.5);
m *= twpi * vec2(3.0, tilt);
center = vec3(0.0);
float D = 50.0 - zoom;
eye = center + vec3(D * sin(m.x) * sin(m.y), D * cos(m.x) * sin(m.y), D * cos(m.y));
return dof;
}
bool voxelHit(vec3 pos) {
vec3 hash = fract(pos * vec3(28.657, 51.4229, 1.597));
hash = mix(hash, dot(hash.zxy, hash.yzx)-hash, seed3);
return length(pos) + seed2 * fract((hash.x + hash.y) * hash.z) < seed1 + grow * sin(TIME * rate);
}
vec3 voxelColor(vec3 pos, vec3 norm) { return mix(c1.rgb, c2.rgb, (length(floor(pos*fract(seed2))) - color)/seed1); }
float castRay(vec3 eye, vec3 ray, out float dist, out vec3 norm) {
vec3 pos = floor(eye);
vec3 ri = 1.0 / ray;
vec3 rs = sign(ray);
vec3 ris = ri * rs;
vec3 dis = (pos - eye + 0.5 + rs * 0.5) * ri;
vec3 dim = vec3(0.0);
float II = 0.0;
for (int i = 0; i < 80; ++i) {
if(II>=loops) { break; }
if (voxelHit(pos)) {
dist = dot(dis - ris, dim);
norm = -dim * rs;
return 1.0;
}
dim = step(dis, dis.yzx);
dim *= (1.0 - dim.zxy);
dis += dim * ris;
pos += dim * rs;
II += 1.0;
}
return 0.0;
}
void main() {
float dist;
vec3 eye, center, norm;
float zoom = setCamera(eye, center);
vec3 lightDir = vec3(light.xy, 0.8);
vec3 forward = normalize(center - eye);
vec3 right = normalize(cross(forward, vec3(0.0, 0.0, 1.0)));
vec3 up = cross(right, forward);
vec2 xy = 2.0 * gl_FragCoord.xy - RENDERSIZE.xy;
vec3 ray = normalize(xy.x * right + xy.y * up + zoom * forward * RENDERSIZE.y);
float hit = castRay(eye, ray, dist, norm);
vec3 pos = eye + dist * ray;
vec3 col = voxelColor(pos - 0.001 * norm, norm);
float shade = dot(norm, lightDir);
float illuminated = 1.0 - castRay(pos + 0.001 * norm, lightDir, dist, norm);
float light = (3.0 + shadow * (illuminated * max(shade, 0.0) - 1.0)) * (1.0 - max(-shade, 0.0));
gl_FragColor = vec4(mix(backgroundColor, light * col, hit), 1.0);
}
@@ -0,0 +1,182 @@
/*{
"CREDIT": "by mojovideotech",
"DESCRIPTION": "",
"CATEGORIES": [
"generator"
],
"INPUTS": [
{
"MAX": [
2,
2
],
"MIN": [
-2,
-2
],
"NAME": "center",
"TYPE": "point2D"
},
{
"MAX": 3,
"MIN": -3.14,
"DEFAULT": -3.11,
"NAME": "cubesize",
"TYPE": "float"
},
{
"MAX": 20,
"MIN": 3,
"DEFAULT": 5.3,
"NAME": "vanishingpoint",
"TYPE": "float"
},
{
"MAX": 0.9,
"MIN": 0.01,
"DEFAULT": 0.15,
"NAME": "brightness",
"TYPE": "float"
},
{
"MAX": 2,
"MIN": -2,
"DEFAULT": 0.6,
"NAME": "rate",
"TYPE": "float"
},
{
"MAX": 0.8,
"MIN": 0.05,
"DEFAULT": 0.47,
"NAME": "tint",
"TYPE": "float"
},
{
"MAX": 3,
"MIN": -6,
"DEFAULT": -1.73,
"NAME": "stretchx",
"TYPE": "float"
},
{
"MAX": 3,
"MIN": 0.01,
"DEFAULT": 2.6,
"NAME": "stretchy",
"TYPE": "float"
},
{
"MAX": 3.5,
"MIN": 0.95,
"DEFAULT": 1.83,
"NAME": "stretchz",
"TYPE": "float"
},
{
"MAX": 0.99,
"MIN": 0.01,
"DEFAULT": 0.49,
"NAME": "overdrive",
"TYPE": "float"
},
{
"MAX": 5,
"MIN": 0,
"DEFAULT": 2.77,
"NAME": "pov",
"TYPE": "float"
}
]
}*/
////////////////////////////////////////////////////////////
// CubicMatrixModulatorRedux by mojovideotech
//
// based on :
// shadertoy/\XsB3Rm
//
// Creative Commons Attribution-NonCommercial-ShareAlike 3.0
////////////////////////////////////////////////////////////
#define pi 3.141592653589793 // pi
#define qtpi 0.78539816339745 // quarter pi, pi/4, 45º
const int max_iterations = 150;
const float stop_threshold = 0.001;
const float grad_step = 0.01;
const float clip_far = 300.0;
float dist_field(vec3 p) {
p = mod(p, 8.0) - 4.0;
p = abs(p);
float cube = length(max(p - 0.0667, 0.5));
float xd = max(p.y-dot(-stretchz,stretchx),p.z);
float yd = max(p.x-pow(stretchy,-stretchz),p.z);
float zd = mix(p.x,p.y,stretchz);
float beams = min(zd*cubesize, max(xd, yd)/mix(stretchz,stretchx,stretchy)) - cos(cubesize);
beams *= min(zd/sin(cubesize), max(xd, yd)/mod(stretchx,-stretchy)+log2(cubesize));
beams += min(zd, min(xd, yd)) /-rate;
return min(beams, cube);
}
vec3 shading( vec3 v, vec3 eye ) {
float s = v.x + v.y + v.z;
s -= eye.x + eye.y * v.z;
return vec3(mod(floor (s * 99.0),0.0+overdrive)-brightness);
}
float ray_marching( vec3 origin, vec3 dir, float start, float end ) {
float depth = start;
for ( int i = 0; i < max_iterations; i++ ) {
float dist = dist_field( origin + dir * depth );
if ( dist < stop_threshold ) {
return depth;
}
depth += dist;
if ( depth >= end) {
return end;
}
}
return end;
}
vec3 ray_dir( float fov, vec2 size, vec2 pos ) {
vec2 xy = pos - size * center.xy;
float cot_half_fov = tan( mod((( 270.0 - fov * 0.25 ) * pi - qtpi), (( 60.0 - fov * 0.5 ) * pos.x)));
float z = size.y * 0.67 * pow(pov,cot_half_fov);
return normalize( vec3( xy, -z ) );
}
mat3 rotationXY( vec2 angle ) {
vec2 c = cos( angle*stretchx );
vec2 s = sin( angle*stretchy );
return mat3(
c.y , 0.0, -s.y,
s.y * s.x, c.x, c.y * s.x,
s.y * c.x, -s.x, c.y * c.x
);
}
void main(void)
{
vec3 dir = ray_dir( stretchx, RENDERSIZE.xy, gl_FragCoord.xy);
vec3 eye = vec3( 0.0, 0.0, 0.0 );
float TT = TIME * rate;
mat3 rot = rotationXY( vec2(TT * 0.005, TT * 0.0125));
dir = rot * dir;
eye = rot * eye;
eye.z -= mod(TT * 4.0, 8.0);
eye.y = eye.x = 0.0;
float depth = ray_marching( eye, dir, 1.75, clip_far);
if ( depth >= clip_far ) { gl_FragColor = vec4(1.0); }
else {
vec3 pos = eye + dir * depth;
gl_FragColor = vec4( shading( pos, eye ) , 1.0 );
gl_FragColor += depth/clip_far * vanishingpoint;
}
gl_FragColor = vec4(vec3(0.9-tint, 0.1+tint, 1.0-abs(tint/3.0)) - gl_FragColor.zyx, 1.0);
gl_FragColor += vec4(vec3(0.0+brightness, 0.3, 0.1+tint), 1.0);
}
+233
View File
@@ -0,0 +1,233 @@
// SaturdayShader Week 22 : Difference Strokes
// by Joseph Fiola (http://www.joefiola.com)
// 2016-01-16
// circle function from "Simple Circle" shadertoy - https://www.shadertoy.com/view/XsjGDt by @jonobr1
/*{
"CREDIT": "Joseph Fiola",
"DESCRIPTION": "",
"CATEGORIES": [
"Generator"
],
"INPUTS": [
{
"NAME": "invert",
"TYPE": "bool"
},
{
"NAME": "difference",
"TYPE": "bool",
"DEFAULT": true
},
{
"NAME": "shape",
"TYPE": "long",
"VALUES": [
0,
1,
2,
3
],
"LABELS": [
"circle solid",
"circle outlines",
"rect solid",
"rect outlines"
],
"DEFAULT": 0
},
{
"NAME": "dotSize",
"TYPE": "float",
"DEFAULT": 0.1,
"MIN": 0.0,
"MAX": 0.5
},
{
"NAME": "zoom",
"TYPE": "float",
"DEFAULT": 1.0,
"MIN": 0.25,
"MAX": 4.0
},
{
"NAME": "iteration",
"TYPE": "float",
"DEFAULT": 25.0,
"MIN": 0.0,
"MAX": 50.0
},
{
"NAME": "xAmp",
"TYPE": "float",
"DEFAULT": 0.1,
"MIN": -0.5,
"MAX": 0.5
},
{
"NAME": "yAmp",
"TYPE": "float",
"DEFAULT": -0.2,
"MIN": -0.5,
"MAX": 0.5
},
{
"NAME": "xFactor",
"TYPE": "float",
"DEFAULT": 0.2,
"MIN": 0.0,
"MAX": 10.0
},
{
"NAME": "yFactor",
"TYPE": "float",
"DEFAULT": 0.2,
"MIN": 0.0,
"MAX": 10.0
},
{
"NAME": "speed",
"TYPE": "float",
"DEFAULT": 0.1,
"MIN": 0.0,
"MAX": 0.1
},
{
"NAME": "rotateCanvas",
"TYPE": "float",
"DEFAULT": 0.5,
"MIN": -1.0,
"MAX": 1.0
},
{
"NAME": "rotateParticles",
"TYPE": "float",
"DEFAULT": 1.0,
"MIN": -1.0,
"MAX": 1.0
},
{
"NAME": "rotateMultiplier",
"TYPE": "float",
"DEFAULT": 10.0,
"MIN": 0.01,
"MAX": 10
},
{
"NAME": "pos",
"TYPE": "point2D",
"DEFAULT": [
0.5,
0.5
],
"MIN": [
0.0,
0.0
],
"MAX": [
1.0,
1.0
]
}
]
}*/
#define PI 3.14159265358979323846
#define TWO_PI 6.28318530718
//rotation function
vec2 rot(vec2 uv,float a){
return vec2(uv.x*cos(a)-uv.y*sin(a),uv.y*cos(a)+uv.x*sin(a));
}
// circle function from https://www.shadertoy.com/view/XsjGDt by @jonobr1
vec3 circle(vec2 uv, vec2 pos, float rad) {
float d = length(pos - uv) - rad;
float t = clamp(d, 0.0, 1.0);
return vec3(vec3(1.0-t));
}
vec3 rectangle(vec2 uv, vec2 pos, float width, float height) {
float t = 0.0;
if ((uv.x > pos.x - width / 2.0) && (uv.x < pos.x + width / 2.0)
&& (uv.y > pos.y - height / 2.0) && (uv.y < pos.y + height / 2.0)) {
t = 1.0;
}
return vec3(t);
}
vec3 invertColor(vec3 color) {
return vec3(color *-1.0 + 1.0);
}
void main(){
vec2 uv = gl_FragCoord.xy;
uv -= vec2(pos * RENDERSIZE);
uv *= zoom;
//rotate canvas
uv=rot(uv,rotateCanvas * PI);
vec3 color = vec3(0.0);
// prevents background from flashing when +/- iteration value
if (difference) {
if (mod(iteration, 2.0) < 1.0) color = invertColor(color);
}
float radius = dotSize * RENDERSIZE.x;
for (float i = 0.0; i<=50.0; i++){
// set max number of iterations
if (iteration < i) break;
vec2 offset = pos;
offset += vec2( cos( i * xFactor * (TIME * speed)) * (xAmp * RENDERSIZE.x),
sin( i * yFactor * (TIME * speed)) * (yAmp * RENDERSIZE.y));
radius += i * 0.002;
//DRAW SHAPES
//draw circle solid
if (shape == 0 || shape == 1) color += circle(uv, offset, radius);
//draw circle outline
if (shape == 1){
if (difference) color -= circle(uv, offset, radius + 2.0);
if (!difference) color -= circle(uv, offset, radius - 2.0);
}
//draw rectangle solid
if (shape == 2 || shape == 3) color += rectangle(uv, offset, radius*2.0, radius*2.0);
//draw rect outline
if (shape == 3) {
if (difference) color -= rectangle(uv, offset, radius*2.0 + 4.0, radius*2.0 + 4.0);
if (!difference) color -= rectangle(uv, offset, radius*2.0 - 4.0, radius*2.0 - 4.0);
}
if (difference) color = invertColor(color);
//rotate particles
uv=rot(uv,rotateParticles * PI * rotateMultiplier);
}
//invert colors
if (invert) color = invertColor(color);
gl_FragColor = vec4(color, 1.0);
}
+186
View File
@@ -0,0 +1,186 @@
/*
{
"CATEGORIES" : [
"Generator"
],
"DESCRIPTION" : "Shows the current time of day or time since the composition started",
"ISFVSN" : "2",
"INPUTS" : [
{
"NAME" : "colorInput",
"TYPE" : "color",
"DEFAULT" : [
1,
0.5899132640831176,
0,
1
],
"LABEL" : "Color"
},
{
"VALUES" : [
0,
1,
2
],
"NAME" : "clockMode",
"TYPE" : "long",
"DEFAULT" : 0,
"LABEL" : "Clock Mode",
"LABELS" : [
"Time",
"Countdown",
"Counter"
]
},
{
"NAME" : "yOffset",
"TYPE" : "float",
"MAX" : 1,
"DEFAULT" : 0,
"MIN" : -1,
"LABEL" : "Y Offset"
},
{
"NAME" : "blinkingColons",
"TYPE" : "bool",
"DEFAULT" : 1,
"LABEL" : "Blink"
},
{
"NAME" : "twentyFourHourStyle",
"TYPE" : "bool",
"LABEL" : "24 Hour"
}
],
"PASSES" : [
{
}
],
"CREDIT" : "VIDVOX"
}
*/
float segment(vec2 uv, bool On) {
return (On) ? (1.0 - smoothstep(0.05,0.15,abs(uv.x))) *
(1.-smoothstep(0.35,0.55,abs(uv.y)+abs(uv.x)))
: 0.;
}
float digit(vec2 uv,int num) {
float seg= 0.;
seg += segment(uv.yx+vec2(-1., 0.),num!=-1 && num!=1 && num!=4 );
seg += segment(uv.xy+vec2(-.5,-.5),num!=-1 && num!=1 && num!=2 && num!=3 && num!=7);
seg += segment(uv.xy+vec2( .5,-.5),num!=-1 && num!=5 && num!=6 );
seg += segment(uv.yx+vec2( 0., 0.),num!=-1 && num!=0 && num!=1 && num!=7 );
seg += segment(uv.xy+vec2(-.5, .5),num==0 || num==2 || num==6 || num==8 );
seg += segment(uv.xy+vec2( .5, .5),num!=-1 && num!=2 );
seg += segment(uv.yx+vec2( 1., 0.),num!=-1 && num!=1 && num!=4 && num!=7 );
return seg;
}
float showNum(vec2 uv,int nr, bool zeroTrim) { // nr: 2 digits + sgn . zeroTrim: trim leading "0"
if (abs(uv.x)>2.*1.5 || abs(uv.y)>1.2) return 0.;
if (nr<0) {
nr = -nr;
if (uv.x>1.5) {
uv.x -= 2.;
return segment(uv.yx,true); // minus sign.
}
}
if (uv.x>0.) {
nr /= 10; if (nr==0 && zeroTrim) nr = -1;
uv -= vec2(.75,0.);
} else {
uv += vec2(.75,0.);
nr = int(mod(float(nr),10.));
}
return digit(uv,nr);
}
float colon(vec2 uv, vec2 cCenter, float cRadius) {
float returnMe = distance(uv,cCenter);
if (returnMe > cRadius)
returnMe = 0.0;
else
returnMe = 1.0 - pow(returnMe / cRadius,4.0);
return returnMe;
}
// a simplfied version of the number drawing from http://www.interactiveshaderformat.com/sketches/120
void main() {
vec4 returnMe = vec4(0.0);
vec2 uv = isf_FragNormCoord;
float adjustedOffset = (yOffset*1.2*(RENDERSIZE.y/RENDERSIZE.x));
vec2 loc = uv;
loc.y = loc.y - adjustedOffset;
// The first element of the vector is the year, the second element is the month,
// the third element is the day, and the fourth element is the time (in seconds) within the day.
vec4 currentDate = DATE;
if (clockMode == 1)
currentDate.a = 86400.0 - currentDate.a;
else if (clockMode == 2)
currentDate = vec4(TIME);
float tmpVal = currentDate.a;
float h = 0.0;
float m = 0.0;
float s = 0.0;
s = mod(tmpVal,60.0);
tmpVal = tmpVal / 60.0;
m = mod(tmpVal,60.0);
tmpVal = tmpVal / 60.0;
h = mod(tmpVal,60.0);
if ((!twentyFourHourStyle)&&(clockMode == 0)) {
h = mod(h,12.0);
if (h < 1.0)
h = 12.0;
}
float seg = 0.0;
int displayTime = 0;
if (loc.x < 0.3) {
loc.x = 1.0 - (loc.x + 0.37);
loc = (loc * 3.0 - 1.5) * 4.0;
displayTime = int(h);
}
else if (loc.x < 0.6) {
loc.x = 1.0 - (loc.x+0.05);
loc = (loc * 3.0 - 1.5) * 4.0;
displayTime = int(m);
}
else {
loc.x = 1.0 - (loc.x - 0.3);
loc = (loc * 3.0 - 1.5) * 4.0;
displayTime = int(s);
}
seg = showNum(loc,displayTime,false);
if ((!blinkingColons)||(mod(TIME,1.0)<0.5)) {
seg += colon(uv,vec2(0.293,0.53+adjustedOffset),0.015);
seg += colon(uv,vec2(0.293,0.47+adjustedOffset),0.015);
seg += colon(uv,vec2(0.633,0.53+adjustedOffset),0.015);
seg += colon(uv,vec2(0.633,0.47+adjustedOffset),0.015);
}
if (seg > 0.0)
returnMe = colorInput * seg;
gl_FragColor = returnMe;
}
+183
View File
@@ -0,0 +1,183 @@
// SaturdayShader Week 23 : Discspin
// by Joseph Fiola (http://www.joefiola.com)
// 2016-01-23
// Based on "The Power of Sin" by antonOTI - https://www.shadertoy.com/view/XdlSzB
/*{
"CREDIT": "",
"DESCRIPTION": "",
"CATEGORIES": [
"Generator"
],
"INPUTS": [
{
"NAME": "mirror",
"TYPE": "bool"
},
{
"NAME": "pattern",
"TYPE": "bool",
"DEFAULT": true
},
{
"NAME": "iteration",
"TYPE": "float",
"DEFAULT": 35,
"MIN": 0,
"MAX": 35
},
{
"NAME": "speed",
"TYPE": "float",
"DEFAULT": 1,
"MIN": -10,
"MAX": 10
},
{
"NAME": "radius",
"TYPE": "float",
"DEFAULT": 0.8,
"MIN": 0,
"MAX": 2
},
{
"NAME": "centerRadius",
"TYPE": "float",
"DEFAULT": 1,
"MIN": -1,
"MAX": 0
},
{
"NAME": "lineThickness",
"TYPE": "float",
"DEFAULT": 0.07,
"MIN": 0.01,
"MAX": 1
},
{
"NAME": "smoothEdge",
"TYPE": "float",
"DEFAULT": 0.03,
"MIN": 0.01,
"MAX": 1
},
{
"NAME": "yOffset",
"TYPE": "float",
"DEFAULT": 0,
"MIN": -1,
"MAX": 0
},
{
"NAME": "xOffset",
"TYPE": "float",
"DEFAULT": 0,
"MIN": -1,
"MAX": 0
},
{
"NAME": "startValue",
"TYPE": "float",
"DEFAULT": -1.5,
"MIN": -2,
"MAX": 2
},
{
"NAME": "endValue",
"TYPE": "float",
"DEFAULT": 1.5,
"MIN": -2,
"MAX": 2
},
{
"NAME": "rotate",
"TYPE": "float",
"DEFAULT": 0,
"MIN": -1,
"MAX": 1
},
{
"NAME": "pos",
"TYPE": "point2D",
"DEFAULT": [
0.5,
0.5
],
"MIN": [
0,
0
],
"MAX": [
1,
1
]
}
]
}*/
#define NB 35.
#define MODE1
#define PI 3.14159265358979323846
float circle(vec2 center , float radius,float thickness,float la,float ha)
{
float f = length(center);
float a = atan(center.y,center.x) ;
return(smoothstep(f,f+0.01,radius) * smoothstep(radius - thickness,radius - thickness+0.01,f) * step(la,a) *smoothstep(a-smoothEdge,a+smoothEdge,ha));
}
float cable(vec2 p,float dx,float dy,float r,float thick,float la,float ha)
{
p.x-= dx;
p.y -= dy;
return (circle(p,r,thick,la,ha));
}
//rotation function
vec2 rot(vec2 uv,float a){
return vec2(uv.x*cos(a)-uv.y*sin(a),uv.y*cos(a)+uv.x*sin(a));
}
void main()
{
vec2 uv = gl_FragCoord.xy / RENDERSIZE.xy;
uv -= vec2(pos - 0.5);
vec2 p = -1. + 2. * uv;
p.x*=RENDERSIZE.x/RENDERSIZE.y;
p=rot(p,rotate * PI);
vec2 ap = vec2(0.0);
if (mirror){
ap = p * vec2(1.,-1.);
} else {
ap = p * vec2(-1.,-1.);
}
float f = 0.;
for(float i = 0.; i < NB; ++i)
{
if (i > iteration) break;
if (pattern) f *= -1.; // invert values every iteration to create interesting patterns when line thickness overlaps
float divi = i/iteration * centerRadius;
f += cable(p,xOffset,yOffset,radius - divi,lineThickness,0.,(sin(TIME * speed - divi*5.)*startValue+endValue) * 3.14);
f += cable(ap,xOffset,yOffset,radius - divi,lineThickness,0.,(sin(TIME * speed - divi*5.)*startValue+endValue) * 3.14);
}
vec3 col = mix(vec3(0.,0.,0.),vec3(1.,1.,1.),f);
gl_FragColor = vec4(col,1.0);
}
+355
View File
@@ -0,0 +1,355 @@
/*{
"CATEGORIES": [
"Automatically Converted",
"Shadertoy"
],
"DESCRIPTION": "Automatically converted from https://www.shadertoy.com/view/MdS3Rw by gltracy. Idea arises from Miloyip's artwork.\nArticle reference : http://mars.wne.edu/~thull/fit.html",
"IMPORTED": {
},
"INPUTS": [
{
"DEFAULT": 1,
"MAX": 10,
"MIN": 0,
"NAME": "een",
"TYPE": "float"
},
{
"DEFAULT": 5,
"MAX": 10,
"MIN": 0,
"NAME": "twee",
"TYPE": "float"
},
{
"DEFAULT": 5,
"MAX": 10,
"MIN": 0,
"NAME": "drie",
"TYPE": "float"
},
{
"DEFAULT": 1,
"MAX": 3,
"MIN": 0,
"NAME": "vier",
"TYPE": "float"
},
{
"DEFAULT": 4.4,
"MAX": 8,
"MIN": 0,
"NAME": "vijf",
"TYPE": "float"
},
{
"DEFAULT": 1,
"MAX": 2,
"MIN": 0,
"NAME": "zes",
"TYPE": "float"
},
{
"DEFAULT": 1,
"MAX": 2,
"MIN": 0,
"NAME": "zeven",
"TYPE": "float"
},
{
"DEFAULT": 1,
"MAX": 5,
"MIN": 0,
"NAME": "acht",
"TYPE": "float"
},
{
"DEFAULT": 1,
"MAX": 2,
"MIN": 0,
"NAME": "Zoom",
"TYPE": "float"
}
],
"ISFVSN": "2"
}
*/
// ray marching
const int max_iterations = 128;
const float stop_threshold = 0.001;
const float grad_step = 0.01;
float clip_far = 1000.0;
// ao
const int ao_iterations = 5;
const float ao_step = 0.2;
const float ao_scale = 1.46;
// math
const float PI = 3.14159265359;
float DEG_TO_RAD = PI / 180.0*Zoom;
float GOLDEN = 1.6180339887499*acht;
const float r = 1.0 * 2.0 * 1.414214 / 1.732051;
const vec2 h = vec2( r, 0.01 );
const vec2 h2 = h * vec2( 0.73, 4.0 );
vec3 cc0 = vec3( 0.333333*een, -0.333333, -0.333333 );
const vec3 cx0 = vec3( 0.707107, 0.000000, 0.707107 );
vec3 cy0 = vec3( 0.408248, 0.816496*zes, -0.408248 );
vec3 cz0 = vec3( -0.577350*acht, 0.577350, 0.577350 );
vec3 cc1 = vec3( -0.333333, -0.333333*een, 0.333333 );
vec3 cx1 = vec3( 0.707107*acht, 0.000000, 0.707107 );
vec3 cy1 = vec3( -0.408248, 0.816496*zes, 0.408248 );
const vec3 cz1 = vec3( -0.577350, -0.577350, 0.577350 );
vec3 cc2 = vec3( -0.333333, 0.333333, -0.333333*een );
vec3 cx2 = vec3( 0.707107, 0.707107/acht, 0.000000 );
vec3 cy2 = vec3( -0.408248, 0.408248*acht, 0.816496 );
const vec3 cz2 = vec3( 0.577350, -0.577350, 0.577350 );
vec3 cc3 = vec3( 0.333333*een, 0.333333, 0.333333 );
const vec3 cx3 = vec3( 0.000000, 0.707107, -0.707107 );
const vec3 cy3 = vec3( -0.816496, 0.408248, 0.408248 );
const vec3 cz3 = vec3( 0.577350, 0.577350, 0.577350 );
vec3 c0 = vec3( 0.333333, 0.333333*een, -0.333333 );
const vec3 x0 = vec3( 0.572061, 0.218508, 0.790569 );
vec3 y0 = vec3( -0.582591*zes, 0.786715, 0.204124 );
vec3 z0 = vec3( -0.577350, -0.577350, 0.577350*zes );
const vec3 c1 = vec3( 0.206011, -0.539344, 0.000000 );
vec3 x1 = vec3( 0.572061, 0.218508*acht, 0.790569 );
vec3 y1 = vec3( -0.738528, -0.282093, 0.612372*een );
const vec3 z1 = vec3( 0.356822, -0.934172, 0.000000 );
const vec3 c2 = vec3( -0.539344, 0.000000, -0.206011 );
vec3 x2 = vec3( -0.218508, 0.790569*zes, 0.572061 );
vec3 y2 = vec3( -0.282093, -0.612372*acht, 0.738528 );
const vec3 z2 = vec3( 0.934172, 0.000000, 0.356822 );
const vec3 c3 = vec3( 0.000000, 0.206011, 0.539344 );
vec3 x3 = vec3( -0.790569, 0.572061, -0.218508/acht );
vec3 y3 = vec3( -0.612372*zes, -0.738528, 0.282093 );
vec3 z3 = vec3( -0.000000, 0.356822, 0.934172*zes );
// distance function
// iq's Signed Triangular Prism distance function
float dist_triXY( vec3 p, vec2 h ) {
vec3 q = abs(p);
return max(q.z-h.y,max(q.x*0.866025+p.y*0.5,-p.y)-h.x*0.5*vier*zeven);
}
float dist_tri( vec3 v, vec3 c, vec3 x, vec3 y, vec3 z ) {
v -= c;
v = vec3( dot( v, x ), dot( v, y ), dot( v, z ) );
return max( dist_triXY( v, h ), -dist_triXY( v, h2 ) );
}
float dist_field( vec3 v ) {
float b0, b1, b2, b3, b4;
// cube
{
float d0 = dist_tri( v, cc0, cx0, cy0, cz0 );
float d1 = dist_tri( v, cc1, cx1, cy1, cz1 );
float d2 = dist_tri( v, cc2, cx2, cy2, cz2 );
float d3 = dist_tri( v, cc3, cx3, cy3, cz3 );
b0 = min( min( d0, d1 ), min( d2, d3 ) );
}
// xyz
{
float d0 = dist_tri( v, c0, x0, y0, z0 );
float d1 = dist_tri( v, c1, x1, y1, z1 );
float d2 = dist_tri( v, c2, x2, y2, z2 );
float d3 = dist_tri( v, c3, x3, y3, z3 );
b1 = min( min( d0, d1 ), min( d2, d3 ) );
}
// zx
{
v.zx = -v.zx;
float d0 = dist_tri( v, c0, x0, y0, z0 );
float d1 = dist_tri( v, c1, x1, y1, z1 );
float d2 = dist_tri( v, c2, x2, y2, z2 );
float d3 = dist_tri( v, c3, x3, y3, z3 );
v.zx = -v.zx;
b2 = min( min( d0, d1 ), min( d2, d3 ) );
}
// yz
{
v.yz = -v.yz;
float d0 = dist_tri( v, c0, x0, y0, z0 );
float d1 = dist_tri( v, c1, x1, y1, z1 );
float d2 = dist_tri( v, c2, x2, y2, z2 );
float d3 = dist_tri( v, c3, x3, y3, z3 );
v.yz = -v.yz;
b3 = min( min( d0, d1 ), min( d2, d3 ) );
}
// xy
{
v.xy = -v.xy;
float d0 = dist_tri( v, c0, x0, y0, z0 );
float d1 = dist_tri( v, c1, x1, y1, z1 );
float d2 = dist_tri( v, c2, x2, y2, z2 );
float d3 = dist_tri( v, c3, x3, y3, z3 );
v.xy = -v.xy;
b4 = min( min( d0, d1 ), min( d2, d3 ) );
}
return min( b0, min( min( b1, b2 ), min( b3, b4 ) ) );
}
// ao
float ao( vec3 v, vec3 n ) {
float sum = 0.0;
float att = 1.0;
float len = ao_step;
for ( int i = 0; i < ao_iterations; i++ ) {
sum += ( len - dist_field( v + n * len ) ) * att;
len += ao_step;
att *= 0.5;
}
return max( 1.0 - sum * ao_scale, 0.0 );
}
// get gradient in the world
vec3 gradient( vec3 v ) {
const vec3 dx = vec3( grad_step, 0.0, 0.0 );
const vec3 dy = vec3( 0.0, grad_step, 0.0 );
const vec3 dz = vec3( 0.0, 0.0, grad_step );
return normalize (
vec3(
dist_field( v + dx ) - dist_field( v - dx ),
dist_field( v + dy ) - dist_field( v - dy ),
dist_field( v + dz ) - dist_field( v - dz )
)
);
}
// ray marching
float ray_marching( vec3 origin, vec3 dir, float start, float end ) {
float depth = start;
for ( int i = 0; i < max_iterations; i++ ) {
float dist = dist_field( origin + dir * depth );
if ( dist < stop_threshold ) {
return depth;
}
depth += dist;
if ( depth >= end) {
return end;
}
}
return end;
}
// shadow
float shadow( vec3 v, vec3 light ) {
vec3 lv = v - light;
float end = length( lv );
lv /= end;
float depth = ray_marching( light, lv, 0.0, end );
return step( end - depth, 0.02 );
}
// phong shading
vec3 shading( vec3 v, vec3 n, vec3 eye ) {
// ...add lights here...
vec3 final = vec3( 0.0 );
vec3 ev = normalize( v - eye );
vec3 ref_ev = reflect( ev, n );
// light 0
{
vec3 light_pos = vec3( 5.0 );
vec3 vl = normalize( light_pos - v );
float diffuse = max( 0.0, dot( vl, n ) );
float specular = max( 0.0, dot( vl, ref_ev ) );
specular = pow( specular, 12.0 );
final += vec3( 0.9 ) * ( diffuse * 0.4 + specular * 0.9 ) * shadow( v, light_pos );
}
// light 1
{
vec3 light_pos = vec3( -5.0 );
vec3 vl = normalize( light_pos - v );
float diffuse = max( 0.0, dot( vl, n ) );
float specular = max( 0.0, dot( vl, ref_ev ) );
specular = pow( specular, 64.0 );
final += vec3( 0.1 ) * ( diffuse * 0.4 + specular * 0.9 );
}
final += ao( v, n ) * vec3( 0.15 );
return final;
}
// pitch, yaw
mat3 rot3xy( vec2 angle ) {
vec2 c = cos( angle );
vec2 s = sin( angle );
return mat3(
c.y , 0.0, -s.y,
s.y * s.x, c.x, c.y * s.x,
s.y * c.x, -s.x, c.y * c.x
);
}
// get ray direction
vec3 ray_dir( float fov, vec2 size, vec2 pos ) {
vec2 xy = pos - size * 0.5;
float cot_half_fov = tan( ( 90.0 - fov * 0.5 ) * DEG_TO_RAD );
float z = size.y * 0.5 * cot_half_fov;
return normalize( vec3( xy, -z ) );
}
void main() {
float hit = 0.0;
// default ray dir
vec3 dir = ray_dir( 45.0, RENDERSIZE.xy, gl_FragCoord.xy );
// default ray origin
vec3 eye = vec3( 0.0, 0.0, vijf );
// rotate camera
mat3 rot = rot3xy( vec2( -DEG_TO_RAD * 30.0*drie, twee ) );
dir = rot * dir;
eye = rot * eye;
// ray marching
float depth = ray_marching( eye, dir, 0.0, clip_far );
if ( depth >= clip_far ) {
gl_FragColor = vec4( 0.0, 0.0, 0.0, hit );
} else {
// shading
vec3 pos = eye + dir * depth;
vec3 n = gradient( pos );
hit = 1.0;
gl_FragColor = vec4( shading( pos, n, eye ) * 2.0, hit );
}
}
+204
View File
@@ -0,0 +1,204 @@
/*{
"DESCRIPTION": "Marble with integrated cracks",
"CREDIT": "Original Shadertoy shader by user, converted to ISF",
"ISFVSN": "2",
"CATEGORIES": [
"Tile Effect",
"Generator"
],
"INPUTS": [
{
"NAME": "zebra",
"TYPE": "float",
"DEFAULT": 1.0
},
{
"NAME": "move",
"TYPE": "float",
"DEFAULT": 1.0
},
{
"NAME": "zoom",
"TYPE": "float",
"DEFAULT": 0.5
},
{
"NAME": "blend",
"TYPE": "float",
"DEFAULT": 1.0
},
{
"NAME": "speed",
"TYPE": "float",
"MIN": -1.0,
"MAX": 1.0,
"DEFAULT": -0.2
}
]
}*/
// Forked and modified from FabriceNeycets (as always) awesome work
// https://www.shadertoy.com/view/Xd3fRN
vec3 hash3(vec3 x) {
const float A = 1103515245.0;
const float B = 0.0000001;
const float M = 2.0;
return mod(x * A, M) / M + B;
}
#define hash22(p) fract( 18.5453 * sin( p * mat2(127.1,311.7,269.5,183.3)) )
#define disp(p) ( -ofs + (1.+2.*ofs) * hash22(p) )
#define ofs 0.5
#define hash21(p) fract(sin(dot(p, vec2(127.1,311.7))) * 43758.5453123)
#define rot(a) mat2(cos(a),-sin(a),sin(a),cos(a))
int MOD = 1;
float RATIO = 1.0,
CRACK_depth = 3.0,
CRACK_zebra_scale = 1.0,
CRACK_zebra_amp = 0.67,
CRACK_profile = 1.0,
CRACK_slope = 50.0,
CRACK_width = 0.0;
float modInt(float x, float y) {
return mod(x, y); // Use built-in mod function for float
}
float dnoise2(vec2 p) {
vec2 i = floor(p);
vec2 f = fract(p);
f = f * f * (3.0 - 2.0 * f);
float hash00 = hash21(i + vec2(0.0, 0.0)); // Hash value for bottom-left corner
float hash10 = hash21(i + vec2(1.0, 0.0)); // Hash value for bottom-right corner
float hash01 = hash21(i + vec2(0.0, 1.0)); // Hash value for top-left corner
float hash11 = hash21(i + vec2(1.0, 1.0)); // Hash value for top-right corner
// Interpolate along the x axis
float interpX0 = mix(hash00, hash10, f.x); // Interpolation for the bottom row
float interpX1 = mix(hash01, hash11, f.x); // Interpolation for the top row
// Interpolate along the y axis
float result = mix(interpX0, interpX1, f.y); // Final interpolation
return result;}
vec2 dnoise22(vec2 p) {
vec2 p2 = p + vec2(17.7);
float y = dnoise2(p2);
float x = dnoise2(p);
return vec2(x, y); // Corrected arguments here
}
float fbm2(vec2 p) {
float v = 0.0;
float a = 0.5;
mat2 R = rot(0.37);
for (int i = 0; i < 5; i++) {
p = R * (p * 2.0);
v += a * dnoise2(p);
a *= 0.5;
}
return v;
}
vec2 fbm22(vec2 p) {
vec2 v = vec2(0.0);
float a = 0.5;
mat2 R = rot(0.37);
for (int i = 0; i < 5; i++) {
p = R * (p * 2.0);
v += a * dnoise22(p);
a *= 0.5;
}
return v;
}
int modInt(int x, int y) {
return x - y * (x / y); // Replace mod with faster alternative
}
vec3 voronoi(vec2 u) {
vec2 iu = floor(u);
vec2 v;
float m = 1e9, d;
vec2 p = iu + vec2(3, 2);
vec2 o = disp(p);
vec2 r = p - u + o;
d = dot(r, r);
if (d < m) {
m = d;
v = r;
}
return vec3(sqrt(m), v + u);
}
vec3 voronoiB(vec2 u) {
vec2 iu = floor(u);
vec2 C, P;
float m = 1e9, d;
for (int k = 0; k < 19; k++) {
vec2 p = iu + vec2(modInt(k, 5) - 2, k / 5 - 2);
vec2 o = disp(p);
vec2 r = p - u + o;
d = dot(r, r);
if (d < m) {
m = d;
C = p - iu;
P = r;
}
}
m = 1e9;
for (int k = 0; k < 15; k++) {
vec2 p = iu + C + vec2(modInt(k, 5) - 2, k / 5 - 2);
vec2 o = disp(p);
vec2 r = p - u + o;
float dot_diff = dot(P - r, P - r);
if (dot_diff > 1e-5) {
m = min(m, 0.5 * dot((P + r), normalize(r - P)));
}
}
return vec3(m, P + u);
}
void main() {
vec2 U = gl_FragCoord.xy * 4.0 / RENDERSIZE.y;
vec3 H0 = vec3(0.0);
vec4 O = vec4(0.0);
for (float i = 0.0; i < 3.0; i++) {
float layerFactor = (4.0 - i) * 0.25; // Foreground layers move faster
vec2 layerU = U + vec2(0.0, TIME * speed * layerFactor);
vec2 V = layerU / vec2(RATIO, 1.0);
vec2 D = CRACK_zebra_amp * fbm22(layerU / CRACK_zebra_scale * zebra * 2.) * CRACK_zebra_scale + (move * 0.2);
vec3 H = voronoiB(V + D);
if (i == 0.0) H0 = H;
float d = H.x;
d = min(1.0, CRACK_slope * pow(max(0.0, d - CRACK_width), CRACK_profile));
O += vec4(1.0 - d) / exp2(i / (0.01 + blend));
U = (U - 0.5 * layerFactor) * (1.0 + zoom) + 0.5;
}
gl_FragColor = vec4(O.rgb, 1.0);
}
@@ -0,0 +1,77 @@
/*{
"CREDIT": "by mojovideotech",
"CATEGORIES": [
"equirectangular",
"menger",
"tunnel"
],
"INPUTS": [
{
"NAME" : "rate",
"TYPE" : "float",
"DEFAULT" : -1.0,
"MIN" : -2.0,
"MAX" : 2.0
},
{
"NAME" : "depth",
"TYPE" : "float",
"DEFAULT" : 5.0,
"MIN" : 1.0,
"MAX" : 12.0
},
{
"NAME" : "colorCycle",
"TYPE" : "float",
"DEFAULT" : -0.5,
"MIN" : -3.0,
"MAX" : 3.0
}
]
}*/
////////////////////////////////////////////////////////////
// Equirec_MengerTunnel by mojovideotech
//
// based on : shadertoy/lsjcWV
//
// Creative Commons Attribution-NonCommercial-ShareAlike 3.0
////////////////////////////////////////////////////////////
#define twpi 6.283185307179586 // two pi, 2*pi
#define pi 3.141592653589793 // pi
float mid(vec3 p) { p = min(p, p.yzx); return max( max(p.x, p.y), p.z); }
void main( ) {
float T = TIME * rate;
vec2 v = (gl_FragCoord.xy / RENDERSIZE.xy) + RENDERSIZE.y;
v.y -= 0.5;
float th = v.y * pi, ph = v.x * twpi;
vec3 sp = vec3( sin(ph) * cos(th), sin(th), cos(ph) * cos(th) );
vec3 pos = vec3( pi, pi, T);
vec3 dir = normalize(sp);
vec3 signdir = sign(dir);
float stepsize = 1.0;
float dist = 0.0;
vec3 normal;
for (int i = 0; i < 20; i++) {
vec3 p = mod(pos, twpi * stepsize) - pi * stepsize;
vec3 num = (stepsize - p * signdir) * step( abs(p), vec3(stepsize) ) / dir * signdir;
float len = mid(num);
if (len < 0.01) {
if (stepsize < 0.05) break;
stepsize /= depth;
} else normal = vec3( equal( vec3(len), num) );
pos += dir*len;
dist += len;
}
gl_FragColor = vec4((( sin(pos - T * colorCycle) * 0.5 + 0.5) + 0.25 * normal) * 1.0 / dist, 1.0);
}
@@ -0,0 +1,101 @@
/*{
"CREDIT": "by mojovideotech",
"CATEGORIES" : [
"generator",
"equirectangular"
],
"DESCRIPTION" : "",
"INPUTS" : [
{
"NAME" : "rate",
"TYPE" : "float",
"MAX" : 3,
"DEFAULT" : 1,
"MIN" : -3
},
{
"NAME" : "g1",
"TYPE" : "float",
"MAX" : 40,
"DEFAULT" : 24,
"MIN" : 4
},
{
"NAME" : "g2",
"TYPE" : "float",
"MAX" : 40,
"DEFAULT" : 16,
"MIN" : 4
},
{
"NAME" : "rot1",
"TYPE" : "float",
"MAX" : 16,
"DEFAULT" : 8,
"MIN" : 1
},
{
"NAME" : "rot2",
"TYPE" : "float",
"MAX" : 16,
"DEFAULT" : 4,
"MIN" : 1
},
{
"NAME" : "colors",
"TYPE" : "float",
"MAX" : 10,
"DEFAULT" : 4,
"MIN" : 1
},
{
"NAME" : "flip",
"TYPE" : "bool",
"DEFAULT" : false
},
{
"NAME" : "flop",
"TYPE" : "bool",
"DEFAULT" : false
}
],
"ISFVSN" : "2"
}
*/
////////////////////////////////////////////////////////////
// Equirec_SpiralIntersect by mojovideotech
//
// mod of
// shadertoy.com\/4dyfW1 by iridule
//
// Creative Commons Attribution-NonCommercial-ShareAlike 3.0
////////////////////////////////////////////////////////////
#define twpi 6.283185307179586 // two pi, 2*pi
#define pi 3.141592653589793 // pi
#define rotate(a) mat2(cos(a), sin(a), -sin(a), cos(a))
#define spiral(u, a, r, t, d) abs(sin(t + r * length(u) + a * (d * atan(u.y, u.x))))
#define sinp(a) 0.5 + sin(a) * 0.5
void main()
{
vec3 col;
float T = TIME*rate;
vec2 uv = gl_FragCoord.xy / RENDERSIZE.xy;
float th = uv.y * pi, ph = uv.x * twpi;
vec3 st = vec3(sin(th) * cos(ph), -cos(th), sin(th) * sin(ph));
if (flip) { st.xy = st.yx; }
if (flop) { st.xz = st.zx; }
st.xz *= rotate(-T / rot1);
st.xy *= rotate(T / rot2);
vec2 o = vec2(cos(T / rot1), sin(T / rot2));
for (int i = 0; i < 3; i++) {
T += 0.3 * spiral(vec2(o + st.zy), g1, 16.0 + 128.0 * o.x - o.y, -T / 100.0, 1.0)
* spiral(vec2(o - st.xz), g2, 16.0 + 64.0 * o.x - o.y, T / 100.0, -1.0);
col[i] = sin(colors * T - length(st.xy) * 10.0 * sinp(T));
}
gl_FragColor = vec4(col, 1.0);
}
+81
View File
@@ -0,0 +1,81 @@
/*{
"CREDIT": "by mojovideotech",
"CATEGORIES" : [
"Generator",
"Quad Tree",
"eyeballs"
],
"DESCRIPTION" : "",
"INPUTS" : [
{
"NAME" : "scale",
"TYPE" : "float",
"DEFAULT" : 13.0,
"MIN" : 2.0,
"MAX" : 16.0
},
{
"NAME" : "grid",
"TYPE" : "bool",
"DEFAULT" : false
}
],
"ISFVSN" : 2.0
}
*/
#define twpi 6.283185307179586 // two pi, 2*pi
vec2 hash22(vec2 p) { return fract(vec2(22271.0, 72221.0)*sin(dot(p, vec2(16061.0, 10601.0)))); }
void main()
{
vec2 uv = (gl_FragCoord.xy - RENDERSIZE.xy*0.5)/RENDERSIZE.y;
vec2 oP = uv*(18.0-scale) + vec2(0.5, TIME*0.5);
vec3 bg = vec3(0.05)*vec3(0.8, 0.5, 1.0);
float pat = clamp(sin((oP.x - oP.y)*twpi*RENDERSIZE.y/50.5) + 0.75, 0.0, 1.0);
vec2 hoP = hash22(oP);
bg *= (hoP.x*0.15 + 1.0)*(pat*0.35 + 0.65);
vec3 col = bg;
vec4 d = vec4(1e5);
float dim = 1.0;
vec2 rndTh[3];
rndTh[0] = vec2(0.333, 0.667);
rndTh[1] = vec2(0.667, 0.667);
rndTh[2] = vec2(1.0, 0.667);
for(int k=0; k<3; k++){
vec2 ip = floor(oP*dim);
vec2 rnd = hash22(ip);
if(rnd.x<rndTh[k].x){
vec2 p = oP - (ip + 0.5)/dim;
rnd = fract(rnd*181.0 + float(k*191 + 1));
vec2 off = (rnd - 0.5)*0.33/dim;
d.x = length(p - off) - 0.3/dim;
const float lwg = 0.015;
d.y = abs(max(abs(p.x), abs(p.y)) - 0.5/dim) - lwg/2.0;
float fo = 4.0/RENDERSIZE.y;
vec3 pCol = mix(col, vec3(0.8, 0.5, 1.0), 0.5 - pat*0.5)*max(1.0 - d.y/(lwg/2.0), 0.0);
if (grid) {
col = mix(col, vec3(0), (1.0 - smoothstep(0.0, fo*3.0, d.y - 0.02))*0.03);
col = mix(col, pCol, (1.0 - smoothstep(0.0, fo, d.y))*0.05);
}
fo = 10.0/RENDERSIZE.y/sqrt(dim);
pCol = vec3(1.0, 0.1, 0.3);
pCol = mix(pCol.xzy, pCol, step(0.5, fract(rnd.y*113.97 + 0.51)));
float sh = max(0.8 - d.x*dim*2.0, 0.0);
col = mix(col, vec3(0), (1.0 - smoothstep(0.0, fo*5.0, d.x))*0.35);
col = mix(col, vec3(0), 1.0 - smoothstep(0.0, fo, d.x));
col = mix(col, pCol*sh, 1.0 - smoothstep(0.0, fo, d.x + 0.015));
col = mix(col, vec3(0), 1.0 - smoothstep(0.0, fo, d.x + 0.25/1.4/dim));
col = mix(col, pCol*0.6*(pat*0.5 + 0.5), 1.0 - smoothstep(0.0, fo, d.x + 0.25/1.4/dim + 0.015));
col = mix(col, vec3(0), 1.0 - smoothstep(0.0, fo, d.x + 0.375/1.4/dim));
col = mix(col, bg*0.8, 1.0 - smoothstep(0.0, fo, d.x + 0.375/1.4/dim + 0.015));
break;
}
dim *= 2.0;
}
col = mix(col.xzy, col, sign(uv.y)*uv.y*uv.y*2.0 + 0.5);
col *= max(1.05 - length(uv)*0.25, 0.5);
gl_FragColor = vec4(sqrt(max(col, 0.0)), 1);
}
+106
View File
@@ -0,0 +1,106 @@
/*{
"CREDIT": "by joshpbatty",
"DESCRIPTION": "",
"CATEGORIES": [
"XXX"
],
"INPUTS": [
{
"NAME": "scrollSpeed",
"TYPE": "float",
"DEFAULT": 0.2,
"MIN": -0.3,
"MAX": 0.3
},
{
"NAME": "dimensions",
"TYPE": "float",
"DEFAULT": 2.0,
"MIN": 1.0,
"MAX": 8.0
},
{
"NAME": "fade_amp",
"TYPE": "float",
"DEFAULT": 0.05,
"MIN": 0.05,
"MAX": 0.9
}
]
}*/
//https://www.shadertoy.com/view/4lscz8
#define PI 3.1415926535
float random2d(vec2 n) {
return fract(sin(dot(n, vec2(129.9898, 4.1414))) * 2398.5453);
}
vec2 getCellIJ(vec2 uv, float gridDims){
return floor(uv * gridDims)/ gridDims;
}
vec2 rotate2D(vec2 position, float theta)
{
mat2 m = mat2( cos(theta), -sin(theta), sin(theta), cos(theta) );
return m * position;
}
//from https://github.com/keijiro/ShaderSketches/blob/master/Text.glsl
float letter(vec2 coord, float size)
{
vec2 gp = floor(coord / size * 7.); // global
vec2 rp = floor(fract(coord / size) * 7.); // repeated
vec2 odd = fract(rp * 0.5) * 2.;
float rnd = random2d(gp);
float c = max(odd.x, odd.y) * step(0.5, rnd); // random lines
c += min(odd.x, odd.y); // fill corner and center points
c *= rp.x * (6. - rp.x); // cropping
c *= rp.y * (6. - rp.y);
return clamp(c, 0., 1.);
}
void main() {
vec2 uv = isf_FragNormCoord.xy;
//correct aspect ratio
uv.x *= RENDERSIZE.x/RENDERSIZE.y;
float t = TIME;
//float scrollSpeed = -0.3;
float dims = dimensions;
//int maxSubdivisions = 2;
//uv = rotate2D(uv,PI/12.0);
uv.y -= TIME * scrollSpeed;
float cellRand;
vec2 ij;
for(int i = 0; i <= 2; i++) {
ij = getCellIJ(uv, dims);
cellRand = random2d(ij);
dims *= 2.0;
//decide whether to subdivide cells again
float cellRand2 = random2d(ij + 454.4543);
if (cellRand2 > 0.3){
break;
}
}
//draw letters
float b = letter(uv, 1.0 / (dims));
//fade in
float scrollPos = TIME*scrollSpeed + 0.15;
float showPos = -ij.y + cellRand;
float fade = smoothstep(showPos ,showPos + fade_amp, scrollPos );
b *= fade;
//hide some
//if (cellRand < 0.1) b = 0.0;
gl_FragColor = vec4(vec3(b), 1.0);
}
+122
View File
@@ -0,0 +1,122 @@
/*
{
"IMPORTED" : [
],
"CATEGORIES" : [
"Fractal"
],
"DESCRIPTION" : "Automatically converted from https:\/\/www.shadertoy.com\/view\/wdc3zX by leon. An example on how to render stereoscopic anaglyph image.\nIt will be the theme of https:\/\/2019.cookie.paris\/\nAnd the content of the 3rd issue of https:\/\/fanzine.cookie.paris\/",
"INPUTS" : [
{
"NAME" : "iMouse",
"TYPE" : "point2D"
},
{
"NAME" : "speed",
"TYPE" : "float",
"DEFAULT" : 0.4
},
{
"NAME" : "radius",
"TYPE" : "float",
"DEFAULT" : 0.3
},
{
"NAME" : "falloff",
"TYPE" : "float",
"DEFAULT" : 0.0
},
{
"NAME" : "divergence",
"TYPE" : "float",
"DEFAULT" : 0.1
}
]
}
*/
// Anaglyph Quick Sketch
// An example on how to render stereoscopic anaglyph image
// It will be the theme of https://2019.cookie.paris/
// And the content of the 3rd issue of https://fanzine.cookie.paris/
// Leon Denise 2019.09.20
// Licensed under hippie love conspiracy
// Using code from
// Inigo Quilez
// Morgan McGuire
const int count = 5;
const float range = 1.;
const float blend = 1.5;
const float balance = 1.5;
const float grain = .01;
const float fieldOfView = 1.5;
float random(vec2 p) { return fract(1e4 * sin(17.0 * p.x + p.y * 0.1) * (0.1 + abs(sin(p.y * 13.0 + p.x)))); }
mat2 rot(float a) { float c=cos(a),s=sin(a); return mat2(c,-s,s,c); }
float smoothmin (float a, float b, float r) { float h = clamp(.5+.5*(b-a)/r, 0., 1.); return mix(b, a, h)-r*h*(1.-h); }
vec3 look (vec3 eye, vec3 target, vec2 anchor, float fov) {
vec3 forward = normalize(target-eye);
vec3 right = normalize(cross(forward, vec3(0,1,0)));
vec3 up = normalize(cross(right, forward));
return normalize(forward * fov + right * anchor.x + up * anchor.y);
}
vec3 camera (vec3 eye) {
vec2 mouse = iMouse.xy/RENDERSIZE.xy*2.-1.;
if (iMouse.x > 0.5) {
eye.yz *= rot(mouse.y*3.1415);
eye.xz *= rot(mouse.x*3.1415);
} else {
eye.yz *= rot(-3.1415/4.);
eye.xz *= rot(-3.1415/2.);
}
return eye;
}
float geometry (vec3 pos) {
pos = camera(pos);
float a = 1.0;
float scene = 1.;
float t = speed * (3.141);
float wave = 1.0+0.2*sin(t*8.-length(pos)*2.);
//t = floor(t)+pow(fract(t),.5);
for (int i = count; i > 0; --i) {
pos.xy *= rot(cos(t));
pos.zy *= rot(sin(t));
pos.zx *= rot(sin(t));
pos = abs(pos)-range*a*wave;
scene = smoothmin(scene, length(pos)-radius*a, blend*a);
a /= (1.9 + falloff * 2.);
}
return scene;
}
float raymarch ( vec3 eye, vec3 ray ) {
float dither = random(ray.xy + TIME);
float total = dither;
const int count = 30;
for (int index = count; index > 0; --index) {
float dist = geometry(eye+ray*total);
dist *= 0.9+.1*dither;
total += dist;
if (dist < 0.001 * total)
return float(index)/float(count);
}
return 0.;
}
void main() {
vec2 uv = 2.*(gl_FragCoord.xy-0.5*RENDERSIZE.xy)/RENDERSIZE.y;
vec3 eyeLeft = vec3(-divergence,0,5.);
vec3 eyeRight = vec3(divergence,0,5.);
vec3 rayLeft = look(eyeLeft, vec3(0), uv, fieldOfView);
float red = raymarch(eyeLeft, rayLeft);
gl_FragColor = vec4(red,red,red,1);
}
+262
View File
@@ -0,0 +1,262 @@
/*
{
"CATEGORIES": [
"Generator"
],
"CREDIT": "by Kali",
"INPUTS": [
{
"MAX": [
1,
1
],
"MIN": [
0,
0
],
"NAME": "mouse",
"TYPE": "point2D"
}
]
}
*/
vec3 iResolution = vec3(RENDERSIZE, 1.0);
float iGlobalTime = TIME;
vec4 iMouse = vec4(mouse, 0.0, 1.0);
// uniform vec3 iResolution;
// uniform float iGlobalTime;
// uniform float iChannelTime[4];
// uniform vec3 iChannelResolution[4];
// uniform vec4 iMouse;
// uniform vec4 iDate;
// Converted by David Lublin from http://glslsandbox.com/e#14742.0 !!!!
// "Fractal Cartoon" - former "DE edge detection" by Kali
// Cartoon-like effect using eiffies's edge detection found here:
// https://www.shadertoy.com/view/4ss3WB
// I used my own method previously but was too complicated and not compiling everywhere.
// Thanks to the suggestion by WouterVanNifterick.
// There are no lights and no AO, only color by normals and dark edges.
// update: Nyan Cat cameo, thanks to code from mu6k: https://www.shadertoy.com/view/4dXGWH
//#define SHOWONLYEDGES
#define NYAN
#define WAVES
#define BORDER
#define RAY_STEPS 150
#define BRIGHTNESS 1.2
#define GAMMA 1.4
#define SATURATION .65
#define detail .001
#define t iGlobalTime*.5
const vec3 origin=vec3(-1.,.7,0.);
float det=0.0;
// 2D rotation function
mat2 rot(float a) {
return mat2(cos(a),sin(a),-sin(a),cos(a));
}
// "Amazing Surface" fractal
vec4 formula(vec4 p) {
p.xz = abs(p.xz+1.)-abs(p.xz-1.)-p.xz;
p.y-=.25;
p.xy*=rot(radians(35.));
p=p*2./clamp(dot(p.xyz,p.xyz),.2,1.);
return p;
}
// Distance function
float de(vec3 pos) {
#ifdef WAVES
pos.y+=sin(pos.z-t*6.)*.15; //waves!
#endif
float hid=0.;
vec3 tpos=pos;
tpos.z=abs(3.-mod(tpos.z,6.));
vec4 p=vec4(tpos,1.);
for (int i=0; i<4; i++) {p=formula(p);}
float fr=(length(max(vec2(0.),p.yz-1.5))-1.)/p.w;
float ro=max(abs(pos.x+1.)-.3,pos.y-.35);
ro=max(ro,-max(abs(pos.x+1.)-.1,pos.y-.5));
pos.z=abs(.25-mod(pos.z,.5));
ro=max(ro,-max(abs(pos.z)-.2,pos.y-.3));
ro=max(ro,-max(abs(pos.z)-.01,-pos.y+.32));
float d=min(fr,ro);
return d;
}
// Camera path
vec3 path(float ti) {
ti*=1.5;
vec3 p=vec3(sin(ti),(1.-sin(ti))*.5,-ti*5.)*.5;
return p;
}
// Calc normals, and here is edge detection, set to variable "edge"
float edge=0.;
vec3 normal(vec3 p) {
vec3 e = vec3(0.0,det*5.,0.0);
float d1=de(p-e.yxx),d2=de(p+e.yxx);
float d3=de(p-e.xyx),d4=de(p+e.xyx);
float d5=de(p-e.xxy),d6=de(p+e.xxy);
float d=de(p);
edge=abs(d-0.5*(d2+d1))+abs(d-0.5*(d4+d3))+abs(d-0.5*(d6+d5));//edge finder
edge=min(1.,pow(edge,.5)*15.);
return normalize(vec3(d1-d2,d3-d4,d5-d6));
}
// Used Nyan Cat code by mu6k, with some mods
vec4 rainbow(vec2 p)
{
float q = max(p.x,-0.1);
float s = sin(p.x*7.0+t*70.0)*0.08;
p.y+=s;
p.y*=1.1;
vec4 c;
if (p.x>0.0) c=vec4(0,0,0,0); else
if (0.0/6.0<p.y&&p.y<1.0/6.0) c= vec4(255,43,14,255)/255.0; else
if (1.0/6.0<p.y&&p.y<2.0/6.0) c= vec4(255,168,6,255)/255.0; else
if (2.0/6.0<p.y&&p.y<3.0/6.0) c= vec4(255,244,0,255)/255.0; else
if (3.0/6.0<p.y&&p.y<4.0/6.0) c= vec4(51,234,5,255)/255.0; else
if (4.0/6.0<p.y&&p.y<5.0/6.0) c= vec4(8,163,255,255)/255.0; else
if (5.0/6.0<p.y&&p.y<6.0/6.0) c= vec4(122,85,255,255)/255.0; else
if (abs(p.y)-.05<0.0001) c=vec4(0.,0.,0.,1.); else
if (abs(p.y-1.)-.05<0.0001) c=vec4(0.,0.,0.,1.); else
c=vec4(0,0,0,0);
c.a*=.8-min(.8,abs(p.x*.08));
c.xyz=mix(c.xyz,vec3(length(c.xyz)),.15);
return c;
}
vec4 nyan(vec2 p)
{
vec2 uv = p*vec2(0.4,1.0);
float ns=3.0;
float nt = iGlobalTime*ns; nt-=mod(nt,240.0/256.0/6.0); nt = mod(nt,240.0/256.0);
float ny = mod(iGlobalTime*ns,1.0); ny-=mod(ny,0.75); ny*=-0.05;
vec4 color = vec4(0.5 * (sin(iGlobalTime) + 1.0), 0.0, 0.0, 0.0);
if (uv.x<-0.3) color.a = 0.0;
if (uv.x>0.2) color.a=0.0;
return color;
}
// Raymarching and 2D graphics
vec3 raymarch(in vec3 from, in vec3 dir)
{
edge=0.;
vec3 p, norm;
float d=100.;
float totdist=0.;
for (int i=0; i<RAY_STEPS; i++) {
if (d>det && totdist<25.0) {
p=from+totdist*dir;
d=de(p);
det=detail*exp(.13*totdist);
totdist+=d;
}
}
vec3 col=vec3(0.);
p-=(det-d)*dir;
norm=normal(p);
#ifdef SHOWONLYEDGES
col=1.-vec3(edge); // show wireframe version
#else
col=(1.-abs(norm))*max(0.,1.-edge*.8); // set normal as color with dark edges
#endif
totdist=clamp(totdist,0.,26.);
dir.y-=.02;
//float vvvv = 1.0 ; // IMG_NORM_PIXEL(iChannel0,vec2(.6,.2)).x
float vvvv = 0.5 * (sin(iGlobalTime) + 1.0);
float sunsize=7.; // -max(0.,vvvv-.4)*5.; // responsive sun size
float an=atan(dir.x,dir.y)+iGlobalTime*1.5; // angle for drawing and rotating sun
float s=pow(clamp(1.0-length(dir.xy)*sunsize-abs(.2-mod(an,.4)),0.,1.),.1); // sun
float sb=pow(clamp(1.0-length(dir.xy)*(sunsize-.3)-abs(.2-mod(an,.4)),0.,1.),.1); // sun border
float sg=pow(clamp(1.0-length(dir.xy)*(sunsize-4.5)-.5*abs(.2-mod(an,.4)),0.,1.),3.); // sun rays
float y=mix(.45,1.2,pow(smoothstep(0.,1.,.75-dir.y),2.))*(1.-sb*.5); // gradient sky
// set up background with sky and sun
vec3 backg=vec3(0.5,0.,1.)*((1.-s)*(1.-sg)*y+(1.-sb)*sg*vec3(1.,.8,0.15)*3.);
backg+=vec3(1.,.9,.1)*s;
backg=max(backg,sg*vec3(1.,.9,.5));
col=mix(vec3(1.,.9,.3),col,exp(-.004*totdist*totdist));// distant fading to sun color
if (totdist>25.) col=backg; // hit background
col=pow(col,vec3(GAMMA))*BRIGHTNESS;
col=mix(vec3(length(col)),col,SATURATION);
#ifdef SHOWONLYEDGES
col=1.-vec3(length(col));
#else
col*=vec3(1.,.9,.85);
#ifdef NYAN
dir.yx*=rot(dir.x);
vec2 ncatpos=(dir.xy+vec2(-3.+mod(-t,6.),-.27));
vec4 ncat=nyan(ncatpos*5.);
vec4 rain=rainbow(ncatpos*10.+vec2(.8,.5));
if (totdist>8.) col=mix(col,max(vec3(.2),rain.xyz),rain.a*.9);
if (totdist>8.) col=mix(col,max(vec3(.2),ncat.xyz),ncat.a*.9);
#endif
#endif
return col;
}
// get camera position
vec3 move(inout vec3 dir) {
vec3 go=path(t);
vec3 adv=path(t+.7);
float hd=de(adv);
vec3 advec=normalize(adv-go);
float an=adv.x-go.x; an*=min(1.,abs(adv.z-go.z))*sign(adv.z-go.z)*.7;
dir.xy*=mat2(cos(an),sin(an),-sin(an),cos(an));
an=advec.y*1.7;
dir.yz*=mat2(cos(an),sin(an),-sin(an),cos(an));
an=atan(advec.x,advec.z);
dir.xz*=mat2(cos(an),sin(an),-sin(an),cos(an));
return go;
}
void main(void)
{
vec2 uv = gl_FragCoord.xy / iResolution.xy*2.-1.;
vec2 oriuv=uv;
uv.y*=iResolution.y/iResolution.x;
vec2 mouse=(iMouse.xy/iResolution.xy-.5)*3.;
if (iMouse.z<1.) mouse=vec2(0.,-0.05);
float fov=.9-max(0.,.7-iGlobalTime*.3);
vec3 dir=normalize(vec3(uv*fov,1.));
dir.yz*=rot(mouse.y);
dir.xz*=rot(mouse.x);
vec3 from=origin+move(dir);
vec3 color=raymarch(from,dir);
#ifdef BORDER
color=mix(vec3(0.5),color,pow(max(0.,.95-length(oriuv*oriuv*oriuv*vec2(1.05,1.1))),.3));
#endif
gl_FragColor = vec4(color,1.);
}
+185
View File
@@ -0,0 +1,185 @@
/*
{
"CATEGORIES": [
"Fractal"
],
"INPUTS" : [
{
"NAME" : "Ball",
"TYPE" : "float",
"MAX" : 1,
"DEFAULT" : 1,
"MIN" : 0
},
{
"NAME" : "RotationIntensityX",
"TYPE" : "float",
"MAX" : 1,
"DEFAULT" : 0,
"MIN" : 0
},
{
"NAME" : "RotationIntensityY",
"TYPE" : "float",
"MAX" : 1,
"DEFAULT" : 0,
"MIN" : 0
},
{
"MAX" : 1,
"NAME" : "RotationSpeed1",
"TYPE" : "float",
"DEFAULT" : 1,
"MIN" : 0
},
{
"MAX" : 1,
"NAME" : "RotationSpeed2",
"TYPE" : "float",
"DEFAULT" : 1
},
{
"NAME" : "SizeReductionRate",
"TYPE" : "float",
"DEFAULT" : 0
},
{
"MAX" : 10,
"NAME" : "RotationOffset1",
"TYPE" : "float",
"MIN" : 0,
"DEFAULT" : 0
},
{
"MAX" : 10,
"NAME" : "RotationOffset2",
"TYPE" : "float",
"DEFAULT" : 0.3,
"MIN" : 0
},
{
"NAME" : "PlaneFoldFactor1",
"TYPE" : "float",
"DEFAULT" : 0.3
},
{
"NAME" : "PlaneFoldFactor2",
"TYPE" : "float",
"DEFAULT" : 0.1
},
{
"NAME" : "CameraZOffset",
"TYPE" : "float",
"MAX" : 15,
"DEFAULT" : 10,
"MIN" : 0
},
{
"NAME" : "CameraXOffset",
"TYPE" : "float",
"MAX" : 20,
"DEFAULT" : 10,
"MIN" : 0
},
{
"NAME" : "CameraYOffset",
"TYPE" : "float",
"MAX" : 10,
"DEFAULT" : 5,
"MIN" : 0
}
],
"ISFVSN" : "2"
}
*/
// Code by Flopine
// Thanks to wsmind, leon, XT95, lsdlive, lamogui, Coyhot, Alkama and YX for teaching me
// Thanks LJ for giving me the love of shadercoding :3
// Thanks to the Cookie Collective, which build a cozy and safe environment for me
// and other to sprout :) https://twitter.com/CookieDemoparty
// Mods by @rhythmic.visions
float hash21(vec2 x) {
return fract(sin(dot(x, vec2(54.4, 62.1))) * 457.5);
}
mat2 rot(float a) {
return mat2(cos(a), sin(a * RotationIntensityX), -sin(a * RotationIntensityY), cos(a));
}
void mo(inout vec2 p, vec2 d) {
p = abs(p) - d;
if (p.y > p.x) p = p.yx;
}
float plane(vec3 p, vec3 n) {
return dot(p, normalize(n));
}
float cut_ps(vec3 p, float s) {
p *= s;
mo(p.xy, vec2(1.));
mo(p.yz, vec2(0.6 * PlaneFoldFactor1 + PlaneFoldFactor2));
mo(p.xz, vec2(0.1 * PlaneFoldFactor1 + PlaneFoldFactor2));
return plane(p, vec3(1., 1., 4.)) / s;
}
float prim1(vec3 p, float s) {
float pos = cos(TIME * RotationSpeed1 + RotationOffset1) * 0.4;
p.xz *= rot(pos);
return cut_ps(p, s);
}
float fractal(vec3 p) {
float size = 1.;
float d = prim1(p, size - SizeReductionRate);
for (int i = 1; i < 5; i++) {
float ratio = float(i) / 2.5;
float pos = cos(TIME * ratio * RotationSpeed2) * 0.4;
p.yz *= rot(pos + RotationOffset2);
size -= 0.2;
d = min(d, prim1(p, size + SizeReductionRate));
}
return d;
}
float g1 = 0.;
float SDF(vec3 p) {
float noise = hash21(p.xy * 0.1 + TIME) * 0.01;
float sphe = length(p) - (.8 + noise) * Ball * 2.;
g1 += 0.1 / (0.1 + sphe * sphe);
return max(-length(p + vec3(0., 0., 4.5)) + .8, min(sphe, fractal(p)));
}
void main() {
vec2 uv = (2. * gl_FragCoord.xy - RENDERSIZE.xy) / RENDERSIZE.y;
float dither = hash21(uv);
vec3 ro = vec3(0.001 + 10. - CameraXOffset, 0.001 + 5. - CameraYOffset, -4.5 - CameraZOffset),
rd = normalize(vec3(uv, 0.8)),
p = ro,
col = vec3(0.1);
float shad = 0.;
bool hit = false;
for (float i = 0.; i < 64.; i++) {
float d = SDF(p);
if (d < 0.001) {
hit = true;
shad = i / 64.;
break;
}
d *= 0.8 + dither * 0.1;
p += d * rd;
}
if (hit) {
col = vec3(1. - shad);
col += g1 * vec3(0.15, 0., 0.1);
}
gl_FragColor = vec4(col, 1.0);
}
@@ -0,0 +1,174 @@
/*{
"CREDIT": "by mojovideotech",
"DESCRIPTION": "",
"CATEGORIES": [
"generator",
"iterative",
"fractal"
],
"INPUTS" : [
{
"NAME" : "scale",
"TYPE" : "float",
"DEFAULT" : 1.5,
"MIN" : 0.5,
"MAX" : 3.0
},
{
"NAME" : "rate",
"TYPE" : "float",
"DEFAULT" : 3.0,
"MIN" : -5.0,
"MAX" : 5.0
},
{
"NAME" : "loops",
"TYPE" : "float",
"DEFAULT" : 20.0,
"MIN" : 6.0,
"MAX" : 40.0
},
{
"NAME" : "density",
"TYPE" : "float",
"DEFAULT" : 1.5,
"MIN" : 1.0,
"MAX": 2.5
},
{
"NAME" : "depth",
"TYPE" : "float",
"DEFAULT" : 12.0,
"MIN" : 6.0,
"MAX" : 20.0
},
{
"NAME" : "detail",
"TYPE" : "float",
"DEFAULT" : 0.001,
"MIN" : 0.0001,
"MAX" : 0.1
},
{
"NAME" : "Xr",
"TYPE" : "float",
"DEFAULT" : -0.001,
"MIN" : -0.001,
"MAX" : 0.001
},
{
"NAME" : "Yr",
"TYPE" : "float",
"DEFAULT" : 0.003,
"MIN" : -0.001,
"MAX" : 0.001
},
{
"NAME" : "Zr",
"TYPE" : "float",
"DEFAULT" : 0.002,
"MIN" : -0.001,
"MAX" : 0.001
},
{
"NAME" : "R",
"TYPE" : "float",
"DEFAULT" : 0.05,
"MIN" : 0.0,
"MAX" : 0.75
},
{
"NAME" : "G",
"TYPE" : "float",
"DEFAULT" : 0.15,
"MIN" : 0.0,
"MAX" : 0.75
},
{
"NAME" : "B",
"TYPE" : "float",
"DEFAULT" : 0.667,
"MIN" : 0.0,
"MAX" : 0.75
},
{
"NAME" : "lightpos",
"TYPE" : "point2D",
"DEFAULT" : [ 1.0, -20.0 ],
"MAX" : [ 10.0, -5.0 ],
"MIN" : [ 5.0, -25.0 ]
}
],
"ISFVSN" : "2.0"
}
*/
////////////////////////////////////////////////////////////
// FractilianSpongeOfDoom by mojovideotech
//
// based on
// shadertoy.com\/MdKyRw by wyatt
//
// Creative Commons Attribution-NonCommercial-ShareAlike 3.0
////////////////////////////////////////////////////////////
vec4 light;
float T;
mat2 m,n,nn;
float map (vec3 p) {
float t = 2.5, d = length(p-light.xyz)-light.w;
d = min(d,max(10.0-p.z, 0.0));
for (int i = 0; i < 20; i++) {
if (float (i) >depth) break;
t = t*0.66;
p.xy = m*p.xy;
p.yz = n*p.yz;
p.zx = nn*p.zx;
p.xz = abs(p.xz) - t;
}
d = min(d,length(p)-density*t);
return d;
}
vec3 norm (vec3 p) {
vec2 e = vec2 (detail, 0.0);
return normalize(vec3(
map(p+e.xyy) - map(p-e.xyy),
map(p+e.yxy) - map(p-e.yxy),
map(p+e.yyx) - map(p-e.yyx)));
}
vec3 ray (vec3 r, vec3 d) {
for (int i = 0; i < 40; i++) {
if (float (i) >loops) break;
r += d*map(r);
}
return r;
}
mat2 rot (float s) { return mat2(sin(s),cos(s),-cos(s),sin(s)); }
void main()
{
vec2 v = (gl_FragCoord.xy/RENDERSIZE.xy*2.0-1.0)*scale;
v.x *= RENDERSIZE.x/RENDERSIZE.y;
T = rate*TIME*10.0;
m = rot(Xr*T);
n = rot(Yr*T);
nn = rot(Zr*T);
vec3 r = vec3(0.0,0.0,-15.0+2.0*sin(0.01*T));
light = vec4(10.0*sin(0.01*T),lightpos.xy,1.0);
vec3 d = normalize(vec3(v,5.0));
vec3 p = ray(r,d);
d = normalize(light.xyz-p);
vec3 no = norm(p);
vec3 col = vec3(R,G,B)+0.25;
vec3 bounce = ray(p+0.01*d,d);
col = mix(col,vec3(0.0),dot(no, normalize(light.xyz-p)));
if (length(bounce-light.xyz) > light.w+0.1) col *= 0.2;
gl_FragColor = vec4(col,1.0);
}
+119
View File
@@ -0,0 +1,119 @@
/*{
"DESCRIPTION": "Optimized ISF shader with parameters for speed, color modulation, and tunnel deformation.",
"CREDIT": "Shadertoy",
"ISFVSN": "2",
"INPUTS": [
{
"NAME": "speed",
"TYPE": "float",
"DEFAULT": 1.0,
"MIN": 0.1,
"MAX": 5.5,
"LABEL": "Speed"
},
{
"NAME": "colorMod",
"TYPE": "color",
"LABEL": "Color Modulation"
}
]
}*/
// Forked and based from
// https://www.shadertoy.com/view/NlsXDH
float det = .001, t, boxhit;
vec3 adv, boxp;
float hash(vec2 p) {
vec3 p3 = fract(vec3(p.xyx) * 0.1031);
p3 += dot(p3, p3.yzx + 33.33);
return fract((p3.x + p3.y) * p3.z);
}
mat2 rot(float a) {
float s = sin(a), c = cos(a);
return mat2(c, s, -s, c);
}
vec3 path(float t) {
vec2 pathOffset = vec2(sin(t * 0.1), cos(t * 0.05)) * 10.0;
float xOffset = smoothstep(0.0, 0.5, abs(0.5 - fract(t * 0.02))) * 10.0;
return vec3(pathOffset.x + xOffset, pathOffset.y, t);
}
float fractal(vec2 p) {
p = abs(5.0 - mod(p * 0.2, 10.0)) - 5.0;
float ot = 1000.0;
for (int i = 0; i < 7; i++) {
p = abs(p) / clamp(p.x * p.y, 0.25, 2.0) - 1.0;
if (i > 0) {
float fractValue = fract(abs(p.y) * 0.05 + t * 0.05 + float(i) * 0.3);
ot = min(ot, abs(p.x) + 0.7 * fractValue);
}
}
return exp(-10.0 * ot);
}
float box(vec3 p, vec3 l) {
vec3 c = abs(p) - l;
return length(max(vec3(0.0), c)) + min(0.0, max(c.x, max(c.y, c.z)));
}
float de(vec3 p) {
boxhit = 0.0;
vec3 p2 = p - adv;
p2.xz *= rot(sin(t * 0.5)); // Adding tunnel deformation
p.xy -= path(p.z).xy;
p.y = -abs(p.y) - 3.0 ;
p.z = mod(p.z, 20.0) - 10.0;
for (int i = 0; i < 5; i++) {
p = abs(p) - 1.0;
p.xz *= rot(radians(-45.0));
p.yz *= rot(radians(90.0));
}
float f = -box(p, vec3(5.0, 5.0, 10.0));
return f * 0.8;
}
vec3 march(vec3 from, vec3 dir) {
vec3 g = vec3(0.0);
float td = 0.0;
for (int i = 0; i < 20; i++) {
vec3 p = from + td * dir;
float d = de(p); // * (1.0 - hash(gl_FragCoord.xy + t) * 0.3);
if (d < det && boxhit < 0.5) break;
td += max(det, abs(d));
// Aggregate fractal calculations
float fractalSum = fractal(p.xy) + fractal(p.xz) + fractal(p.yz);
float boxFractalSum = fractal(boxp.xy) + fractal(boxp.xz) + fractal(boxp.yz);
vec3 colf = vec3(fractalSum) * colorMod.rgb;
g += colf / (3.0 + d * d * 2.0) * exp(-0.0002 * td * td) * step(5.0, td) * 0.5 * (1.0 - boxhit);
}
return g;
}
mat3 lookat(vec3 dir, vec3 up) {
dir = normalize(dir);
vec3 rt = normalize(cross(dir, normalize(up)));
return mat3(rt, cross(rt, dir), dir);
}
void main() {
vec2 uv = (gl_FragCoord.xy - RENDERSIZE.xy * 0.5) / RENDERSIZE.y;
t = TIME * 7.0 * speed; // Adjusted time with speed parameter
vec3 from = path(t);
adv = path(t + 6.0 + sin(t * 0.1) * 3.0);
vec3 dir = normalize(vec3(uv, 0.7));
dir = lookat(adv - from, vec3(0.0, 1.0, 0.0)) * dir;
vec3 col = march(from, dir);
gl_FragColor = vec4(col, 1.0);
}
+195
View File
@@ -0,0 +1,195 @@
/*{
"CREDIT": "by mojovideotech",
"CATEGORIES": [
"generator",
"Retro"
],
"DESCRIPTION": "based on glslsandbox.com/e#12573.0",
"INPUTS": [
{
"NAME": "seed1",
"TYPE": "float",
"DEFAULT": 0.77,
"MIN": 0,
"MAX": 1
},
{
"NAME": "seed2",
"TYPE": "float",
"DEFAULT": 0.53,
"MIN": 0,
"MAX": 1
},
{
"NAME": "seed3",
"TYPE": "float",
"DEFAULT": 1,
"MIN": 0.0001,
"MAX": 9.999
},
{
"NAME": "rotation",
"TYPE": "float",
"DEFAULT": 2,
"MIN": 0,
"MAX": 2
},
{
"NAME": "rotozoom",
"TYPE": "float",
"DEFAULT": 34.95,
"MIN": -50,
"MAX": 50
},
{
"NAME": "zoom",
"TYPE": "float",
"DEFAULT": 48.46,
"MIN": -60,
"MAX": 60
},
{
"NAME": "density",
"TYPE": "float",
"DEFAULT": 7.43,
"MIN": -50,
"MAX": 50
},
{
"NAME": "pulseRate",
"TYPE": "float",
"DEFAULT": 2.1,
"MIN": 1,
"MAX": 10
},
{
"NAME": "glow",
"TYPE": "float",
"DEFAULT": 1.66,
"MIN": 0,
"MAX": 5
},
{
"NAME": "baseColor",
"TYPE": "color",
"DEFAULT": [
0.1,
0.1,
0.9,
0.5
]
},
{
"NAME": "glowColor",
"TYPE": "color",
"DEFAULT": [
0.9,
0.2,
0.3,
0.5
]
}
]
}*/
////////////////////////////////////////////////////////////
// HAL10000 by mojovideotech
//
// based on :
// glslsandbox.com/e#12573.0
//
// Creative Commons Attribution-NonCommercial-ShareAlike 3.0
////////////////////////////////////////////////////////////
#ifdef GL_ES
precision mediump float;
#endif
#define pi 3.141592653589793 // pi
vec2 rana(in vec2 p) {
return fract(vec2(sin(p.x * 3889. + p.y * 3989.), cos(p.x * 983. + p.y * (17.*seed1))));
}
float ranb(vec2 p) {
return fract(sin(dot(p.xy, vec2(139.*seed2, 1213.))) * 514229.);
}
vec2 ranc(float p) {
return fract(vec2(sin(p * 5557.), cos(p * 4999.)*seed3));
}
vec3 voronoi(in vec2 x) {
vec2 n = floor(x);
vec2 f = fract(x);
vec2 mg, mr;
float md = 8.0, md2 = 8.0;
for(int j = -1; j <= 1; j ++)
{
for(int i = -1; i <= 1; i ++)
{
vec2 g = vec2(float(i), float(j));
vec2 o = rana(n + g);
vec2 r = g + o - f;
float d = max(abs(r.x), abs(r.y));
if(d < md)
{md2 = md; md = d; mr = r; mg = g;}
else if(d < md2)
{md2 = d;}
}
}
return vec3(n + mg, md2 - md);
}
mat2 rotate2d(float _angle) {
return mat2(cos(_angle),-sin(_angle),
sin(_angle),cos(_angle));
}
vec3 intersect(in vec3 o, in vec3 d, vec3 c, vec3 u, vec3 v) {
vec3 q = o - c;
return vec3(
dot(cross(u, v), q),
dot(cross(q, u), d),
dot(cross(v, q), d)) / dot(cross(v, u), d);
}
void main( void ) {
vec2 uv = gl_FragCoord.xy / RENDERSIZE.xy;
uv = uv * 4.0 - 2.0 ;
uv.x *= RENDERSIZE.x / RENDERSIZE.y;
uv = vec2(rotate2d(rotation*pi)*uv.xy);
vec3 ro = vec3(10.0, 0.0, 0.0);
vec3 ta = vec3(0.0, 1000.0, 0.0);
vec3 ww = normalize(ro - ta);
vec3 uu = normalize(cross(ww, normalize(vec3(0.0,1.0,0.0))));
vec3 vv = normalize(cross(uu, ww));
vec3 rd = normalize(uv.x * uu + uv.y * vv + 0.5 * ww);
vec3 its;
float v, g;
float inten = 0.0;
for(int i = 0; i < 9; i ++) {
float layer = float(i);
its = intersect(ro, rd, vec3(rotozoom, -10.0 - layer * (density*0.1), 0.0), vec3(1.0, 0.0, 0.0), vec3(0.0, 0.0, 1.0));
if(its.x > 0.0) {
vec3 vo = voronoi((its.xz) * (zoom*0.001) + 10.0 * ranc(float(i)));
v = exp(-100.0 * (vo.z - 0.0367));
float fx = 0.0;
if(i == 5) {
float T = TIME * pulseRate;
float crd = fract(TIME * T) * 50.0 - 25.0;
float fxi = cos(vo.x * 0.2 + -T * 1.5); //abs(crd - vo.x);
fx = clamp(smoothstep(0.7, 1.0, fxi), 0.0, 0.9) * 1.0 * ranb(vo.xy);
fx *= exp(-2.0 * vo.z) * 3.0;
}
inten += v * 0.1 + fx;
}
}
vec3 col = pow(mix(vec3(inten, (inten * 0.5), inten),baseColor.rgb,0.6), (5.5-glow) * glowColor.gbr);
gl_FragColor = vec4(col, 1.0);
}
+28
View File
@@ -0,0 +1,28 @@
/*{
"CREDIT": "by mojovideotech",
"CATEGORIES" : [
"Automatically Converted",
"GLSLSandbox"
],
"INPUTS" : [
],
"DESCRIPTION" : "Automatically converted from http:\/\/glslsandbox.com\/e#36754.0"
}
*/
// Heartz by mojovideotech
// glslsandbox.com\/e#36754.0 by Catzpaw 2016
float heart(float x,float y){return (1e-10>pow(x*x+y*y-1.,3.)-x*x*y*y*y)?1.:0.;}
vec2 rot(vec2 p,float a){return p*mat2(cos(a),-sin(a),sin(a),cos(a));}
void main(void){
vec2 uv=(gl_FragCoord.xy*2.-RENDERSIZE.xy)/min(RENDERSIZE.x,RENDERSIZE.y)*10.;
uv=rot(uv,-TIME*.2);
uv=mod(uv,3.)-1.5;
uv=rot(uv,TIME*.2);
float s=clamp(sin(TIME*6.)*1.2,1.,2.),c=heart(uv.x*s,uv.y*s);
gl_FragColor = vec4(vec3(1,.1,.5)*c,1);
}
+188
View File
@@ -0,0 +1,188 @@
// SaturdayShader Week 25 : HoopLoop
// by Joseph Fiola (http://www.joefiola.com)
// 2016-02-06
/*{
"CREDIT": "Joseph Fiola",
"DESCRIPTION": "",
"CATEGORIES": [
"Generator"
],
"INPUTS": [
{
"NAME": "invert",
"TYPE": "bool",
"DEFAULT": 0.0
},
{
"NAME": "zoom",
"TYPE": "float",
"DEFAULT": 2.0,
"MIN": 0.0,
"MAX": 20.0
},
{
"NAME": "animate",
"TYPE": "float",
"DEFAULT": 0.3,
"MIN": -3.14159265358979323846,
"MAX": 3.14159265358979323846
},
{
"NAME": "size",
"TYPE": "float",
"DEFAULT": 0.35,
"MIN": 0.0,
"MAX": 1.0
},
{
"NAME": "thickness",
"TYPE": "float",
"DEFAULT": 0.001,
"MIN": 0.001,
"MAX": 0.5
},
{
"NAME": "lineEffect",
"TYPE": "float",
"DEFAULT": 0.001,
"MIN": 0.0,
"MAX": 0.2
},
{
"NAME": "patternOffset",
"TYPE": "float",
"DEFAULT": 0.0,
"MIN": -1.0,
"MAX": 1.0
},
{
"NAME": "rSin",
"TYPE": "float",
"DEFAULT": 0.0,
"MIN": -5.0,
"MAX": 5.0
},
{
"NAME": "xCos",
"TYPE": "float",
"DEFAULT": 1.0,
"MIN": -5.0,
"MAX": 5.0
},
{
"NAME": "ySin",
"TYPE": "float",
"DEFAULT": 1.0,
"MIN": -5.0,
"MAX": 5.0
},
{
"NAME": "blur",
"TYPE": "float",
"DEFAULT": 0.005,
"MIN": 0.001,
"MAX": 0.5
},
{
"NAME": "function",
"TYPE": "long",
"VALUES": [
0,
1
],
"LABELS": [
"abs",
"fract"
],
"DEFAULT": 0
},
{
"NAME": "rotate",
"TYPE": "float",
"DEFAULT": 0.0,
"MIN": -1.0,
"MAX": 1.0
},
{
"NAME": "pos",
"TYPE": "point2D",
"DEFAULT": [
0.5,
0.5
],
"MIN": [
0.0,
0.0
],
"MAX": [
1.0,
1.0
]
}
]
}*/
const int NUM_CIRCLES = 50;
#define PI 3.14159265358979323846
#define TWO_PI 6.28318530718
vec3 drawCircle(vec2 p, vec2 center, float radius, float edgeWidth, vec3 color)
{
float dist = length(p - center);
vec3 ret;
float look;
if (function == 0) look = abs(dist -size);
else if (function == 1) look = fract(dist -size);
ret = color * (1.0 - lineEffect - smoothstep(radius, (radius+edgeWidth), look ));
return ret;
}
vec3 invertColor(vec3 color) {
return vec3(color *-1.0 + 1.0);
}
//rotation function
vec2 rot(vec2 uv,float a){
return vec2(uv.x*cos(a)-uv.y*sin(a),uv.y*cos(a)+uv.x*sin(a));
}
void main()
{
vec2 uv = gl_FragCoord.xy / RENDERSIZE.xy;
uv -= vec2(pos);
uv.x*=RENDERSIZE.x/RENDERSIZE.y;
uv *= zoom;
uv=rot(uv,rotate * PI);
vec3 color = vec3(0.0);
float angleIncrement = TWO_PI / float(NUM_CIRCLES);
for (int i = 0; i < NUM_CIRCLES; ++i) {
float t = angleIncrement*(float(i));
float r = sin(rSin * t + TIME * animate); // In VDMX I use the following line and control the "animate" slider
//float r = sin(rSin * t + animate);
vec2 p = vec2(r*cos(t*xCos), r*sin(t*ySin));
uv=rot(uv,patternOffset * PI);
if (lineEffect >= 0.2) color = invertColor(color);
color += drawCircle(uv, p, thickness, blur, vec3(1.0));
}
if (invert) color = invertColor(color);
gl_FragColor = vec4(color,1.0);
}
+141
View File
@@ -0,0 +1,141 @@
// SaturdayShader Week 36 : Hypnocone
// by Joseph Fiola (http://www.joefiola.com)
// 2016-04-23
// Based on "Flailing" Shadertoy by okro
// https://www.shadertoy.com/view/MsjSWw
/*{
"CREDIT": "",
"DESCRIPTION": "",
"CATEGORIES": [
"Generator"
],
"INPUTS": [
{
"NAME": "invert",
"TYPE": "bool",
"DEFAULT": false
},
{
"NAME": "zoom",
"TYPE": "float",
"DEFAULT": 2.0,
"MIN": 0.25,
"MAX": 10.0
},
{
"NAME": "rings",
"TYPE": "float",
"DEFAULT": 0.01,
"MIN": 0.01,
"MAX": 1.0
},
{
"NAME": "radius",
"TYPE": "float",
"DEFAULT": 1.0,
"MIN": 0.001,
"MAX": 2.0
},
{
"NAME": "xAmp",
"TYPE": "float",
"DEFAULT": 0.002,
"MIN": -0.1,
"MAX": 0.1
},
{
"NAME": "xOffset",
"TYPE": "float",
"DEFAULT": 0.01,
"MIN": -1.0,
"MAX": 1.0
},
{
"NAME": "xOffsetSpeed",
"TYPE": "float",
"DEFAULT": 0.02,
"MIN": 0.0,
"MAX": 0.1
},
{
"NAME": "yAmp",
"TYPE": "float",
"DEFAULT": 0.002,
"MIN": -0.1,
"MAX": 0.1
},
{
"NAME": "yOffset",
"TYPE": "float",
"DEFAULT": 0.01,
"MIN": -1.0,
"MAX": 1.0
},
{
"NAME": "yOffsetSpeed",
"TYPE": "float",
"DEFAULT": -0.02,
"MIN": 0.0,
"MAX": 0.1
},
{
"NAME": "rotate",
"TYPE": "float",
"DEFAULT": 0.0,
"MIN": 0.0,
"MAX": 1.0
},
{
"NAME": "pos",
"TYPE": "point2D",
"DEFAULT": [0.5,0.5],
"MIN":[0.0,0.0],
"MAX":[1.0,1.0]
}
]
}*/
#define TWO_PI 6.28318530718
mat2 rotate2d(float _angle){
return mat2(cos(_angle),-sin(_angle),
sin(_angle),cos(_angle));
}
void main()
{
vec2 uv = gl_FragCoord.xy / RENDERSIZE.xy;
uv -= vec2(pos);
uv.x *= RENDERSIZE.x/RENDERSIZE.y;
uv = rotate2d(rotate*-TWO_PI) * uv;
uv *= zoom;
vec3 col = vec3(0.);
vec2 loc = uv * 0.0;
float radius = radius+rings;
for (int i = 0; i < 100; ++i) {
float r = smoothstep(radius, radius+.004, distance(uv,loc));
col = 1.0 - col * r;
//move circles
float dx = cos(TIME) * xAmp;
dx += cos(TIME * xOffsetSpeed * float(i)) * xOffset;
float dy = sin(TIME) * yAmp;
dy += sin(TIME * yOffsetSpeed * float(i)) * yOffset;
loc += vec2(dx, dy);
//make smaller
radius -= rings;
}
if (invert) col = col *-1.0 + 1.0;
gl_FragColor = vec4(col, 1.0);
}
@@ -0,0 +1,167 @@
/*{
"CREDIT": "by mojovideotech",
"CATEGORIES" : [ "generator"
],
"DESCRIPTION" : "",
"INPUTS" : [
{
"NAME" : "seed1",
"TYPE" : "float",
"DEFAULT" : 155,
"MIN" : 34,
"MAX" : 233
},
{
"NAME" : "seed2",
"TYPE" : "float",
"DEFAULT" : 649,
"MIN" : 89,
"MAX" : 987
},
{
"NAME" : "scale",
"TYPE" : "float",
"DEFAULT" : 1.0,
"MIN" : 0.25,
"MAX" : 2.0
},
{
"NAME" : "rate",
"TYPE" : "float",
"DEFAULT" : 1.0,
"MIN" : 0.1,
"MAX" : 3.0
},
{
"NAME" : "zoom",
"TYPE" : "float",
"DEFAULT" : 0.175,
"MIN" : -1.0,
"MAX" : 1.0
},
{
"NAME" : "line",
"TYPE" : "float",
"DEFAULT" : 0.367,
"MIN" : 0.0,
"MAX" : 0.5
},
{
"NAME" : "flash",
"TYPE" : "float",
"DEFAULT" : 7.5,
"MIN" : 0.5,
"MAX" : 10.0
},
{
"NAME" : "mirror",
"TYPE" : "bool",
"DEFAULT" : false
},
{
"NAME" : "color",
"TYPE" : "bool",
"DEFAULT" : true
},
{
"NAME" : "cycle",
"TYPE" : "float",
"DEFAULT" : 1.0,
"MIN" : 0.05,
"MAX" : 20.0
}
]
}
*/
////////////////////////////////////////////////////////////////////
// InnerDimensionalMatrix by mojovideotech
//
// based on :
// The Universe Within - by Martijn Steinrucken aka BigWings 2018
// shadertoy.com/\lscczl
// glslsandbox.com\/e#47584.1
//
// License Creative Commons Attribution-NonCommercial-ShareAlike 3.0
////////////////////////////////////////////////////////////////////
#ifdef GL_ES
precision highp float;
#endif
#define S(a, b, t) smoothstep(a, b, t)
float N1(float n) {
return fract(sin(n) * 43758.5453123);
}
float N11(float p) {
float fl = floor(p);
float fc = fract(p);
return mix(N1(fl), N1(fl + 1.0), fc);
}
float N21(vec2 p) { return fract(sin(p.x * floor(seed1) + p.y * floor(seed2)) * floor(seed2+seed1)); }
vec2 N22(vec2 p) { return vec2(N21(p), N21(p + floor(seed2))); }
float L(vec2 p, vec2 a, vec2 b) {
vec2 pa = p-a, ba = b-a;
float t = clamp(dot(pa, ba)/dot(ba, ba), 0.0, 1.0);
float d = length(pa - ba * t);
float m = S(0.02, 0.0, d);
d = length(a-b);
float f = S(1.0, 0.8, d);
m *= f;
m += m*S(0.05, 0.06, abs(d - 0.5)) * 2.0;
return m;
}
vec2 GetPos(vec2 p, vec2 o) {
p += o;
vec2 n = N22(p)*TIME*rate;
p = sin(n) * line;
return o+p;
}
float G(vec2 uv) {
vec2 id = floor(uv);
uv = fract(uv) - 0.5;
vec2 g = GetPos(id, vec2(0));
float m = 0.0;
for(float y=-1.0; y<=1.0; y++) {
for(float x=-1.0; x<=1.0; x++) {
vec2 offs = vec2(x, y);
vec2 p = GetPos(id, offs);
m+=L(uv, g, p);
vec2 a = p-uv;
float f = 0.003/dot(a, a);
f *= pow( sin(N21(id+offs) * 6.2831 + (flash*TIME)) * 0.4 + 0.6, flash);
m += f;
}
}
m += L(uv, GetPos(id, vec2(-1, 0)), GetPos(id, vec2(0, -1)));
m += L(uv, GetPos(id, vec2(0, -1)), GetPos(id, vec2(1, 0)));
m += L(uv, GetPos(id, vec2(1, 0)), GetPos(id, vec2(0, 1)));
m += L(uv, GetPos(id, vec2(0, 1)), GetPos(id, vec2(-1, 0)));
return m;
}
void main()
{
vec2 uv = (2.25 - scale) * ( gl_FragCoord.xy - 0.5 * RENDERSIZE.xy) / RENDERSIZE.y;
if (mirror) { if(uv.x<0.0) uv.x = abs(uv.x); }
float m = 0.0;
vec3 col;
for(float i=0.0; i<1.0; i+=0.2) {
float z = fract(i+TIME*zoom);
float s = mix(10.0, 0.5, z);
float f = S(0.0, 0.4, z) * S(1.0, 0.8, z);
m += G(uv * s + (N11(i)*100.0) * i) * f;
}
if (color) { col = 0.5 + sin(vec3(1.0, 0.5, 0.75)*TIME*cycle) * 0.5; }
else col = vec3(1.0);
col *= m;
gl_FragColor = vec4( col, 1.0 );
}
+157
View File
@@ -0,0 +1,157 @@
// SaturdayShader Week 34 : Kaleidolines
// Joseph Fiola (http://www.joefiola.com)
// 2016-04-09
// Based on Shadertoy created by Vinicius Graciano Santos - vgs/2014
// https://www.shadertoy.com/view/lsBSDz
/*{
"CREDIT": "",
"DESCRIPTION": "",
"CATEGORIES": [
"Generator"
],
"INPUTS": [
{
"NAME": "invert",
"TYPE": "bool",
"DEFAULT": "1"
},
{
"NAME": "zoom",
"TYPE": "float",
"DEFAULT": 2,
"MIN": 0.25,
"MAX": 20
},
{
"NAME": "rotateCanvas",
"TYPE": "float",
"DEFAULT": 0,
"MIN": 0,
"MAX": 1
},
{
"NAME": "rotateLines",
"TYPE": "float",
"DEFAULT": 0,
"MIN": 0,
"MAX": 1
},
{
"NAME": "lineThickness",
"TYPE": "float",
"DEFAULT": 0.5,
"MIN": 0.1,
"MAX": 20
},
{
"NAME": "lineLength",
"TYPE": "float",
"DEFAULT": 1,
"MIN": 0.05,
"MAX": 10
},
{
"NAME": "lines1",
"TYPE": "float",
"DEFAULT": 10,
"MIN": 1,
"MAX": 10
},
{
"NAME": "lines2",
"TYPE": "float",
"DEFAULT": 10,
"MIN": 1,
"MAX": 10
},
{
"NAME": "offset",
"TYPE": "float",
"DEFAULT": 0,
"MIN": -2,
"MAX": 2
},
{
"NAME": "motion",
"TYPE": "float",
"DEFAULT": 0.25,
"MIN": 0,
"MAX": 1
},
{
"NAME": "pos",
"TYPE": "point2D",
"DEFAULT": [
0.5,
0.5
],
"MIN": [
0,
0
],
"MAX": [
1,
1
]
}
]
}*/
#define TAU 6.28318530718
mat2 rotate2d(float _angle){
return mat2(cos(_angle),-sin(_angle),
sin(_angle),cos(_angle));
}
vec2 tile(vec2 _st, float _zoom){
_st *= _zoom;
return fract(_st);
}
float segment(vec2 p, vec2 a, vec2 b) {
vec2 ab = b - a;
vec2 ap = p - a;
float k = clamp(dot(ap, ab)/dot(ab, ab), 0.0, lineLength);
return smoothstep(0.0, 0.003 + lineThickness/RENDERSIZE.y, length(ap - k*ab) - (0.001 * lineThickness * 5. ));
}
float shape(vec2 p, float angle) {
float d = 100.0;
vec2 a = vec2(1.0, 0.0), b;
vec2 rot = vec2(cos(angle), sin(angle));
for (int i = 0; i < 10; ++i) {
a = a + offset;
if (i >= int(lines1)) break;
b = a;
for (int j = 0; j < 10; ++j) {
if (j >= int(lines2)) break;
b = vec2(b.x*rot.x - b.y*rot.y, b.x*rot.y + b.y*rot.x);
p = rotate2d(rotateLines* -TAU) * p;
d = min(d, segment(p, a, b));
}
a = vec2(a.x*rot.x - a.y*rot.y, a.x*rot.y + a.y*rot.x);
}
return d;
}
void main() {
vec2 uv = gl_FragCoord.xy / RENDERSIZE.xy;
uv -= vec2(pos);
uv.x *= RENDERSIZE.x/RENDERSIZE.y;
uv = rotate2d(rotateCanvas *-TAU) * uv;
uv *= zoom;
float col = shape(abs(uv), cos((motion * TAU * (TIME*0.05))));
if (invert) col = col *-1.0 + 1.0;
gl_FragColor = vec4(vec3(col), 1.0);
}
@@ -0,0 +1,84 @@
#version 120
#pragma target glsl
/*{
"DESCRIPTION": "Abstract Kaleidoscopic Patterns Shader",
"CATEGORIES": [
"Generator"
],
"INPUTS": [
{
"NAME": "ROTATION_SPEED",
"TYPE": "float",
"DEFAULT": 1.0,
"MIN": -5.0,
"MAX": 5.0
},
{
"NAME": "PATTERN_SCALE",
"TYPE": "float",
"DEFAULT": 5.0,
"MIN": 1.0,
"MAX": 20.0
},
{
"NAME": "SYMMETRY",
"TYPE": "float",
"DEFAULT": 6.0,
"MIN": 2.0,
"MAX": 12.0
},
{
"NAME": "COLOR_SCHEME",
"TYPE": "color",
"DEFAULT": [
0.8,
0.2,
0.5,
1.0
]
},
{
"NAME": "BACKGROUND_COLOR",
"TYPE": "color",
"DEFAULT": [
0.1,
0.1,
0.1,
1.0
]
}
]
}*/
void main() {
// Normalize pixel coordinates (from 0 to 1)
vec2 uv = gl_FragCoord.xy / RENDERSIZE.xy;
// Center the coordinates around (0,0)
uv = uv * 2.0 - 1.0;
uv.x *= RENDERSIZE.x / RENDERSIZE.y; // Adjust for aspect ratio
// Calculate the angle and radius from the center
float angle = atan(uv.y, uv.x);
float radius = length(uv);
// Apply rotation over time
angle += TIME * ROTATION_SPEED;
// Create kaleidoscopic symmetry by repeating the angle
float symmetry = SYMMETRY;
angle = mod(angle, 2.0 * 3.14159265 / symmetry);
angle = abs(angle - 3.14159265 / symmetry);
// Generate pattern
float pattern = sin(radius * PATTERN_SCALE - angle * symmetry);
// Adjust pattern to range from 0.0 to 1.0
pattern = sin(pattern * 3.14159265) * 0.5 + 0.5;
// Apply color gradient
vec3 color = mix(BACKGROUND_COLOR.rgb, COLOR_SCHEME.rgb, pattern);
gl_FragColor = vec4(color, 1.0);
}
@@ -0,0 +1,160 @@
/*{
"CREDIT": "by mojovideotech",
"CATEGORIES": [
"generator",
"kali set"
],
"DESCRIPTION": "",
"INPUTS": [
{
"NAME": "center",
"TYPE": "point2D",
"DEFAULT": [
0,
0
],
"MAX": [
2,
2
],
"MIN": [
-2,
-2
]
},
{
"NAME": "rate",
"TYPE": "float",
"DEFAULT": 1,
"MIN": 0.01,
"MAX": 3
},
{
"NAME": "loops",
"TYPE": "float",
"DEFAULT": 15,
"MIN": 8,
"MAX": 24
},
{
"NAME": "intensity",
"TYPE": "float",
"DEFAULT": 0.03,
"MIN": 0.01,
"MAX": 0.05
},
{
"NAME": "focus",
"TYPE": "float",
"DEFAULT": 2.14,
"MIN": 0.5,
"MAX": 5
},
{
"NAME": "pulse",
"TYPE": "float",
"DEFAULT": 30,
"MIN": 6,
"MAX": 60
},
{
"NAME": "glow",
"TYPE": "float",
"DEFAULT": 10,
"MIN": -100,
"MAX": 100
},
{
"NAME": "zoom",
"TYPE": "float",
"DEFAULT": 0.67,
"MIN": 0.1,
"MAX": 1
}
],
"ISFVSN": 2
}*/
////////////////////////////////////////////////////////////////////
// KaliCircuitsExplorer by mojovideotech
//
// based on :
// shadertoy.com/XlX3Rj by Kali
//
// License Creative Commons Attribution-NonCommercial-ShareAlike 3.0
////////////////////////////////////////////////////////////////////
#ifdef GL_ES
precision highp float;
#endif
#define pi 3.141592653 // pi
float S = (101.0 + glow) * intensity;
vec3 color = vec3(0.0);
void formula(vec2 z, float t)
{
float M = 0.0;
float o, ot2, ot=ot2=1000.0;
float K = floor(loops/4.0)+floor(5.0 * zoom);
for (int i=0; i<11; i++) {
z = abs(z) / clamp(dot(z, z), 0.1, 0.5) - t;
float l = length(z);
o = min(max(abs(min(z.x, z.y)), -l + 0.25), abs(l - 0.25));
ot = min(ot, o);
ot2 = min(l * 0.1, ot2);
M = max(M, float(i) * (1.0 - abs(sign(ot - o))));
if (K <= 0.0) break;
K -= 1.0;
}
M += 1.0;
float w = (intensity * zoom) * M;
float circ = pow(max(0.0, w - ot2) / w, 6.0);
S += max(pow(max(0.0, w - ot) / w, 0.25), circ);
vec3 col = normalize(0.1 + vec4(0.45, 0.75, M * 0.1, 1.0).rgb);
color += col * (0.4 + mod(M / 9.0 - t * pulse + ot2 * 2.0, 1.0));
color += vec3(1.0, 0.7, 0.3) * circ * (10.0 - M) * 3.0;
}
void main()
{
float R = 0.0;
float N = TIME * 0.01 * rate;
float T = 2.0 * rate;
if (N > 6.0 * rate) {
R += 1.0;
N -= (R * 8.0 * rate);
}
if (N < 4.0 * rate) T += N;
else T = 8.0 * rate - N;
float Z = (1.05-zoom);
vec2 pos = gl_FragCoord.xy / RENDERSIZE.xy - 0.5;
pos.x *= RENDERSIZE.x/RENDERSIZE.y;
vec2 uv = pos + center;
float sph = length(uv)*0.1;
sph = sqrt(1.0 - sph * sph) * 2.0 ;
float a = T * pi;
float b = a + T;
float c = cos(a) + sin(b);
uv *= mat2(cos(b), sin(b), -sin(b), cos(b));
uv *= mat2(cos(a),-sin(a), sin(a),cos(a));
uv -= vec2(sin(c), cos(c)) / pi;
uv *= Z;
float pix = 0.5 / RENDERSIZE.x * Z / sph;
float dof = (zoom * focus) + (T * 0.25);
float L = floor(loops);
for (int aa=0; aa<24; aa++) {
vec2 aauv = floor(vec2(float(aa) / 6.0, mod(float(aa), 6.0)));
formula(uv + aauv * pix * dof, T);
if (L <= 0.0) break;
L -= 1.0;
}
S /= floor(loops);
color /= floor(loops);
vec3 colo = mix(vec3(0.15), color, S) * (1.0 - length(pos));
colo *=vec3(1.2, 1.1, 1.0);
gl_FragColor = sqrt(max(vec4(colo, 1.0), 0.0) -0.2);
}
+53
View File
@@ -0,0 +1,53 @@
/*
{
"CATEGORIES": [
"Generator"
],
"DESCRIPTION": "Shader with Speed and NUM_ITER controls",
"ISFVSN": "2",
"INPUTS": [
{
"NAME": "NUM_ITER",
"TYPE": "float",
"DEFAULT": 9.0,
"MIN": 1.0,
"MAX": 20.0
},
{
"NAME": "Speed",
"TYPE": "float",
"DEFAULT": 1.0,
"MIN": 0.0,
"MAX": 5.0
}
],
"CREDIT": "Transformed by assistant"
}
*/
#ifdef GL_ES
precision mediump float;
#endif
void main() {
vec2 fragCoord = gl_FragCoord.xy;
vec2 resolution = RENDERSIZE.xy; // Replace iResolution with RENDERSIZE
float time = TIME * Speed; // Apply Speed control to TIME
vec2 uv = (2.0 * fragCoord - resolution) / min(resolution.x, resolution.y);
// Clamp NUM_ITER to valid range
float numIter = clamp(NUM_ITER, 1.0, 20.0);
const int MAX_ITER = 20; // Maximum number of iterations
for (int j = 1; j <= MAX_ITER; j++) {
float i = float(j);
float weight = step(i - 0.5, numIter); // 1.0 if i <= numIter, 0.0 otherwise
uv.x += weight * (0.6 / i) * cos(i * 2.5 * uv.y + time);
uv.y += weight * (0.6 / i) * cos(i * 1.5 * uv.x + time);
}
vec3 color = vec3(0.1) / abs(sin(time - uv.y - uv.x));
gl_FragColor = vec4(color, 1.0);
}
+155
View File
@@ -0,0 +1,155 @@
/*
{
"CATEGORIES" : [
"Generator"
],
"DESCRIPTION" : "",
"ISFVSN" : "2",
"INPUTS" : [
{
"NAME" : "Offset_X",
"TYPE" : "float",
"MAX" : 20,
"DEFAULT" : 1,
"MIN" : -20,
"LABEL" : "Offset_X"
},
{
"NAME" : "Speed",
"TYPE" : "float",
"MAX" : 5,
"DEFAULT" : 0,
"LABEL" : "Speed",
"MIN" : 0
}
],
"CREDIT" : "converted by Imimot. Original: https:\/\/www.shadertoy.com\/view\/4dfSDj"
}
*/
/////////////////////////////////////////////////////////////////////////////
// XBE
// Retro style terrain rendering
//
const float PI = 3.141592654;
// Noise from IQ
vec2 hash( vec2 p )
{
p = vec2( dot(p,vec2(127.1,311.7)),
dot(p,vec2(269.5,183.3)) );
return -1.0 + 2.0*fract(sin(p)*43758.5453123);
}
float noise( in vec2 p )
{
const float K1 = 0.366025404;
const float K2 = 0.211324865;
vec2 i = floor( p + (p.x+p.y)*K1 );
vec2 a = p - i + (i.x+i.y)*K2;
vec2 o = (a.x>a.y) ? vec2(1.0,0.0) : vec2(0.0,1.0);
vec2 b = a - o + K2;
vec2 c = a - 1.0 + 2.0*K2;
vec3 h = max( 0.5-vec3(dot(a,a), dot(b,b), dot(c,c) ), 0.0 );
vec3 n = h*h*h*h*vec3( dot(a,hash(i+0.0)), dot(b,hash(i+o)), dot(c,hash(i+1.0)));
return dot( n, vec3(70.0) );
}
const mat2 m = mat2( 0.80, 0.60, -0.60, 0.80 );
float fbm4( in vec2 p )
{
float f = 0.0;
f += 0.5000*noise( p ); p = m*p*2.02;
f += 0.2500*noise( p ); p = m*p*2.03;
f += 0.1250*noise( p ); p = m*p*2.01;
f += 0.0625*noise( p );
return f;
}
float fbm6( in vec2 p )
{
float f = 0.0;
f += 0.5000*noise( p ); p = m*p*2.02;
f += 0.2500*noise( p ); p = m*p*2.03;
f += 0.1250*noise( p ); p = m*p*2.01;
f += 0.0625*noise( p ); p = m*p*2.04;
f += 0.031250*noise( p ); p = m*p*2.01;
f += 0.015625*noise( p );
return f;
}
mat4 CreatePerspectiveMatrix(in float fov, in float aspect, in float near, in float far)
{
mat4 m = mat4(0.0);
float angle = (fov / 180.0) * PI;
float f = 1. / tan( angle * 0.5 );
m[0][0] = f / aspect;
m[1][1] = f;
m[2][2] = (far + near) / (near - far);
m[2][3] = -1.;
m[3][2] = (2. * far*near) / (near - far);
return m;
}
mat4 CamControl( vec3 eye, float pitch)
{
float cosPitch = cos(pitch);
float sinPitch = sin(pitch);
vec3 xaxis = vec3( 1, 0, 0. );
vec3 yaxis = vec3( 0., cosPitch, sinPitch );
vec3 zaxis = vec3( 0., -sinPitch, cosPitch );
// Create a 4x4 view matrix from the right, up, forward and eye position vectors
mat4 viewMatrix = mat4(
vec4( xaxis.x, yaxis.x, zaxis.x, 0 ),
vec4( xaxis.y, yaxis.y, zaxis.y, 0 ),
vec4( xaxis.z, yaxis.z, zaxis.z, 0 ),
vec4( -dot( xaxis, eye ), -dot( yaxis, eye ), -dot( zaxis, eye ), 1 )
);
return viewMatrix;
}
void main()
{
vec2 uv = gl_FragCoord.xy/RENDERSIZE.xy;
vec2 p = 2.*uv-1.;
p.x *= RENDERSIZE.x/RENDERSIZE.y;
vec3 eye = vec3(0.+Offset_X, 0.25+0.25*cos(0.5*TIME)*1.0, 0.);
mat4 projmat = CreatePerspectiveMatrix(50., RENDERSIZE.x/RENDERSIZE.y, 0.1, 10.0);
mat4 viewmat = CamControl(eye, -5.*PI/180.);
mat4 vpmat = viewmat*projmat;
vec3 col = vec3(0.);
vec3 acc = vec3(0.);
float d;
vec4 pos = vec4(0.);
float lh = -RENDERSIZE.y;
float off = 0.1*TIME*Speed;
float h = 0.;
float z = 0.1;
float zi = 0.05;
for (int i=0; i<20; ++i)
{
pos = vec4(p.x, 0.5*fbm4(0.5*vec2(eye.x+p.x, z+off)), eye.z+z+0., 1.);
h = (vpmat*pos).y - p.y;
if (h>lh)
{
d = abs(h);
col = vec3( d<0.005?smoothstep(1.,0.,d*192.):0. );
col *= exp(-0.1*float(i));
acc += col;
lh = h;
}
z += zi;
}
col = sqrt(clamp(acc, 0., 1.));
gl_FragColor = vec4(col,1.0);
}
+214
View File
@@ -0,0 +1,214 @@
/*{
"CREDIT": "by mojovideotech",
"CATEGORIES": [
"Generator"
],
"DESCRIPTION": "spherical lens which is magnifying a moving backdrop of Perlin noise.",
"INPUTS": [
{
"NAME": "size",
"TYPE": "float",
"DEFAULT": 3.0,
"MIN": -1.0,
"MAX": 5.0
},
{
"NAME": "layers",
"TYPE": "float",
"DEFAULT": 3.1,
"MIN": 2.0,
"MAX": 12.0
},
{
"NAME": "seed",
"TYPE": "float",
"DEFAULT": 33.0,
"MIN": 3.0,
"MAX": 333.0
},
{
"NAME": "refractionIn",
"TYPE": "float",
"DEFAULT": 0.5,
"MIN": 0.1,
"MAX": 1.0
},
{
"NAME": "refractionOut",
"TYPE": "float",
"DEFAULT": 0.5,
"MIN": 0.1,
"MAX": 1.0
},
{
"NAME": "colorWarp1",
"TYPE": "float",
"DEFAULT": 2.0,
"MIN": -3.0,
"MAX": 6.0
},
{
"NAME": "colorWarp2",
"TYPE": "float",
"DEFAULT": 3.0,
"MIN": -5.0,
"MAX": 10.0
},
{
"NAME": "rate",
"TYPE": "float",
"DEFAULT": 0.1,
"MIN": -1.5,
"MAX": 1.5
}
]
}
*/
////////////////////////////////////////////////////////////
// MagnifyingMarble2 by mojovideotech
//
// based on :
// shadertoy.com/ldfSDN
//
// Creative Commons Attribution-NonCommercial-ShareAlike 3.0
////////////////////////////////////////////////////////////
#define M_PI 3.1415926535
float TT = TIME * rate;
vec3 light = vec3(50.0, 5.0, 20.0);
vec4 sph1 = vec4( 0.0, 0.0, 0.0, 1.0);
vec2 iSphere(in vec3 ro, in vec3 rd, in vec4 sph) {
vec3 oc = ro - sph.xyz;
float b = dot(oc, rd);
float c = dot(oc, oc) - sph.w * sph.w;
float h = b*b - c;
vec2 t;
if(h < 0.0)
t = vec2(-1.0);
else {
float sqrtH = sqrt(h);
t.x = (-b - sqrtH);
t.y = (-b + sqrtH);
}
return t;
}
vec3 nSphere(in vec3 pos, in vec4 sph ) { return (pos - sph.xyz)/sph.w; }
float intersect(in vec3 ro, in vec3 rd, out vec2 resT) {
resT = vec2(1000.0);
float id = -1.0;
vec2 tsph = iSphere(ro, rd, sph1);
if(tsph.x > 0.0 || tsph.y > 0.0) {
id = 1.0;
resT = tsph;
}
return id;
}
vec4 mod289(vec4 x) { return x - floor(x * (1.0 / 289.0)) * 289.0; }
vec4 permute(vec4 x) { return mod289(((x*34.0)+1.0)*x); }
vec4 taylorInvSqrt(vec4 r) { return 1.79284291400159 - 0.85373472095314 * r; }
vec2 fade(vec2 t) { return t*t*t*(t*(t*6.0-15.0)+10.0); }
float cnoise(vec2 P) {
vec4 Pi = floor(P.xyxy) + vec4(0.0, 0.0, 1.0, 1.0);
vec4 Pf = fract(P.xyxy) - vec4(0.0, 0.0, 1.0, 1.0);
Pi = mod289(Pi);
vec4 ix = Pi.xzxz;
vec4 iy = Pi.yyww;
vec4 fx = Pf.xzxz;
vec4 fy = Pf.yyww;
vec4 i = permute(permute(ix) + iy);
vec4 gx = fract(i * (1.0 / seed)) * 2.0 - 1.0 ;
vec4 gy = abs(gx) - 0.5 ;
vec4 tx = floor(gx + 0.5);
gx = gx - tx;
vec2 g00 = vec2(gx.x,gy.x);
vec2 g10 = vec2(gx.y,gy.y);
vec2 g01 = vec2(gx.z,gy.z);
vec2 g11 = vec2(gx.w,gy.w);
vec4 norm = taylorInvSqrt(vec4(dot(g00, g00), dot(g01, g01), dot(g10, g10), dot(g11, g11)));
g00 *= norm.x;
g01 *= norm.y;
g10 *= norm.z;
g11 *= norm.w;
float n00 = dot(g00, vec2(fx.x, fy.x));
float n10 = dot(g10, vec2(fx.y, fy.y));
float n01 = dot(g01, vec2(fx.z, fy.z));
float n11 = dot(g11, vec2(fx.w, fy.w));
vec2 fade_xy = fade(Pf.xy);
vec2 n_x = mix(vec2(n00, n01), vec2(n10, n11), fade_xy.x);
float n_xy = mix(n_x.x, n_x.y, fade_xy.y);
return layers * n_xy;
}
vec4 getFragColor(float noiseValue) {
vec4 fragColor;
fragColor.r = fract(noiseValue);
fragColor.g = fract(colorWarp1 * fragColor.r);
fragColor.b = fract(colorWarp2 * fragColor.g);
fragColor.a = 1.0;
return fragColor;
}
void main()
{
float aspectRatio = RENDERSIZE.x/RENDERSIZE.y;
vec2 uv = gl_FragCoord.xy / RENDERSIZE.xy;
vec4 ro = vec4(0.0, 0.0, 5.0-size, 1.0);
vec3 rd = normalize(vec3( (-1.0+2.0*uv) * vec2(aspectRatio, 1.0), -1.0));
vec2 t;
float id = intersect(ro.xyz, rd, t);
vec3 col;
if(id > 0.5 && id < 1.5) {
vec3 E = normalize(ro.xyz + t.x*rd);
vec3 N = normalize(nSphere(E, sph1));
vec3 L = normalize(light);
vec3 reflectColor = vec3(0.0);
float lambertTerm = dot(N, L);
if (lambertTerm > 0.0) {
float w = pow(1.0 - max(0.0, dot(normalize(L+E), E)), 5.0);
reflectColor += (1.0-w)*pow(max(0.0, dot(reflect(-L, E), E)), 100.);
}
vec3 refractionVec = refract(rd, N, refractionIn);
float id2 = intersect(E, refractionVec, t);
if (id2 > 0.5 && id2 < 1.5) {
E += refractionVec * t.y;
E = normalize(E);
N = normalize(nSphere(E, sph1));
refractionVec = refract(refractionVec, N, refractionOut);
}
vec3 noiseColor = getFragColor(cnoise(vec2(TT + refractionVec.x + uv.x, refractionVec.y + uv.y))).rgb;
col = mix(noiseColor, reflectColor, reflectColor);
}
else
col = getFragColor(cnoise(vec2(TT + uv.x, uv.y))).rgb;
gl_FragColor = vec4(col,1.0);
}
//
// GLSL textureless classic 2D noise "cnoise",
// with an RSL-style periodic variant "pnoise".
// Author: Stefan Gustavson (stefan.gustavson@liu.se)
// Version: 2011-08-22
//
// Many thanks to Ian McEwan of Ashima Arts for the
// ideas for permutation and gradient selection.
//
// Copyright (c) 2011 Stefan Gustavson. All rights reserved.
// Distributed under the MIT license. See LICENSE file.
// https://github.com/ashima/webgl-noise
//
+159
View File
@@ -0,0 +1,159 @@
// SaturdayShader Week 40 : Matrix
// by Joseph Fiola (http://www.joefiola.com)
// 2016-07-09
// Based on "Matrix" Patricio Gonzalez Vivo from the Book of Shaders' Generative Designs Examples
// https://thebookofshaders.com/examples/?chapter=10
/*{
"CREDIT": "",
"DESCRIPTION": "",
"CATEGORIES": [
"Generator"
],
"INPUTS": [
{
"NAME": "invert",
"TYPE": "bool"
},
{
"NAME": "zoom",
"TYPE": "float",
"DEFAULT": 1,
"MIN": 0.0001,
"MAX": 40
},
{
"NAME": "grid",
"TYPE": "float",
"DEFAULT": 5,
"MIN": 0.1,
"MAX": 20
},
{
"NAME": "dotSize",
"TYPE": "float",
"DEFAULT": 0.1,
"MIN": 0,
"MAX": 0.5
},
{
"NAME": "xScale",
"TYPE": "float",
"DEFAULT": 0,
"MIN": 0,
"MAX": 0.49
},
{
"NAME": "yScale",
"TYPE": "float",
"DEFAULT": 0,
"MIN": 0,
"MAX": 0.49
},
{
"NAME": "xRandom",
"TYPE": "float",
"DEFAULT": 12.9898,
"MIN": 0.0001,
"MAX": 12.9898
},
{
"NAME": "yRandom",
"TYPE": "float",
"DEFAULT": 78.233,
"MIN": 0.0001,
"MAX": 78.233
},
{
"NAME": "randomMultiplier",
"TYPE": "float",
"DEFAULT": 43758.5453,
"MIN": 0.0001,
"MAX": 43758.5453
},
{
"NAME": "speed",
"TYPE": "float",
"DEFAULT": 20,
"MIN": 0,
"MAX": 40
},
{
"NAME": "rotate",
"TYPE": "float",
"DEFAULT": 0,
"MIN": 0,
"MAX": 1
},
{
"NAME": "pos",
"TYPE": "point2D",
"DEFAULT": [
0,
0.5
],
"MIN": [
0,
0
],
"MAX": [
1,
1
]
}
]
}*/
#ifdef GL_ES
precision mediump float;
#endif
#define TWO_PI 6.28318530718
float random(in float x){ return fract(sin(x)*randomMultiplier); } // original value was 43758.5453
float random(in vec2 st){ return fract(sin(dot(st.xy,vec2(xRandom,yRandom))) * randomMultiplier); } // 12.9898, 78.233, & 43758.5453
float randomChar(vec2 outer,vec2 inner){
float grid = grid;
vec2 margin = vec2(xScale,yScale);
vec2 borders = step(margin,inner)*step(margin,1.-inner);
vec2 ipos = floor(inner*grid);
vec2 fpos = fract(inner*grid);
return step(.5,random(outer*64.+ipos)) * borders.x * borders.y * step(dotSize,fpos.x) * step(dotSize,fpos.y);
}
// Rotate
mat2 rotate2d(float _angle){
return mat2(cos(_angle),-sin(_angle),
sin(_angle),cos(_angle));
}
void main(){
vec2 st = gl_FragCoord.st/RENDERSIZE.xy;
st -= vec2(pos); //center uv to pos location
st.y *= RENDERSIZE.y/RENDERSIZE.x;
st *= zoom;
st = rotate2d(rotate*-TWO_PI) * st;
vec3 color = vec3(0.0);
vec2 ipos = floor(st+11.*color.r);
vec2 fpos = fract(st);
ipos += vec2(0.,floor(TIME*speed*random(ipos.x+2.)));
float pct = 1.2;
pct *= randomChar(ipos*sin(fpos-color.g),cos(fpos+color.r));
pct *= random(ipos);
color = vec3(pct);
if (invert) color = color *-1.0 + 1.0; //invert colors
gl_FragColor = vec4( color , 1.0);
}
+159
View File
@@ -0,0 +1,159 @@
// SaturdayShader Week 40 : Matrix
// by Joseph Fiola (http://www.joefiola.com)
// 2016-07-09
// Based on "Matrix" Patricio Gonzalez Vivo from the Book of Shaders' Generative Designs Examples
// https://thebookofshaders.com/examples/?chapter=10
/*{
"CREDIT": "",
"DESCRIPTION": "",
"CATEGORIES": [
"Generator"
],
"INPUTS": [
{
"NAME": "invert",
"TYPE": "bool"
},
{
"NAME": "zoom",
"TYPE": "float",
"DEFAULT": 1,
"MIN": 0.0001,
"MAX": 40
},
{
"NAME": "grid",
"TYPE": "float",
"DEFAULT": 5,
"MIN": 0.1,
"MAX": 20
},
{
"NAME": "dotSize",
"TYPE": "float",
"DEFAULT": 0.1,
"MIN": 0,
"MAX": 0.5
},
{
"NAME": "xScale",
"TYPE": "float",
"DEFAULT": 0,
"MIN": 0,
"MAX": 0.49
},
{
"NAME": "yScale",
"TYPE": "float",
"DEFAULT": 0,
"MIN": 0,
"MAX": 0.49
},
{
"NAME": "xRandom",
"TYPE": "float",
"DEFAULT": 12.9898,
"MIN": 0.0001,
"MAX": 12.9898
},
{
"NAME": "yRandom",
"TYPE": "float",
"DEFAULT": 78.233,
"MIN": 0.0001,
"MAX": 78.233
},
{
"NAME": "randomMultiplier",
"TYPE": "float",
"DEFAULT": 43758.5453,
"MIN": 0.0001,
"MAX": 43758.5453
},
{
"NAME": "speed",
"TYPE": "float",
"DEFAULT": 20,
"MIN": 0,
"MAX": 40
},
{
"NAME": "rotate",
"TYPE": "float",
"DEFAULT": 0,
"MIN": 0,
"MAX": 1
},
{
"NAME": "pos",
"TYPE": "point2D",
"DEFAULT": [
0,
0.5
],
"MIN": [
0,
0
],
"MAX": [
1,
1
]
}
]
}*/
#ifdef GL_ES
precision mediump float;
#endif
#define TWO_PI 6.28318530718
float random(in float x){ return fract(sin(x)*randomMultiplier); } // original value was 43758.5453
float random(in vec2 st){ return fract(sin(dot(st.xy,vec2(xRandom,yRandom))) * randomMultiplier); } // 12.9898, 78.233, & 43758.5453
float randomChar(vec2 outer,vec2 inner){
float grid = grid;
vec2 margin = vec2(xScale,yScale);
vec2 borders = step(margin,inner)*step(margin,1.-inner);
vec2 ipos = floor(inner*grid);
vec2 fpos = fract(inner*grid);
return step(.5,random(outer*64.+ipos)) * borders.x * borders.y * step(dotSize,fpos.x) * step(dotSize,fpos.y);
}
// Rotate
mat2 rotate2d(float _angle){
return mat2(cos(_angle),-sin(_angle),
sin(_angle),cos(_angle));
}
void main(){
vec2 st = gl_FragCoord.st/RENDERSIZE.xy;
st -= vec2(pos); //center uv to pos location
st.y *= RENDERSIZE.y/RENDERSIZE.x;
st *= zoom;
st = rotate2d(rotate*-TWO_PI) * st;
vec3 color = vec3(0.0);
vec2 ipos = floor(st);
vec2 fpos = fract(st);
ipos += vec2(0.,floor(TIME*speed*random(ipos.x+1.)));
float pct = 1.0;
pct *= randomChar(ipos,fpos);
//pct *= random(ipos);
color = vec3(pct);
if (invert) color = color *-1.0 + 1.0; //invert colors
gl_FragColor = vec4( color , 1.0);
}
+116
View File
@@ -0,0 +1,116 @@
/*{
"CREDIT": "",
"DESCRIPTION": "",
"CATEGORIES": [ "generator" ],
"INPUTS": [
{
"NAME": "noiseIntensity",
"TYPE": "float",
"MIN": 0.0,
"MAX": 10.0,
"DEFAULT": 6.0
},
{
"NAME": "noiseScaleX",
"TYPE": "float",
"MIN": 1.0,
"MAX": 10.0,
"DEFAULT": 5.5
},
{
"NAME": "noiseScaleY",
"TYPE": "float",
"MIN": 1.0,
"MAX": 10.0,
"DEFAULT": 3.5
},
{
"NAME": "redPhaseShift",
"TYPE": "float",
"MIN": 0.0,
"MAX": 1.0,
"DEFAULT": 0.1
},
{
"NAME": "greenPhaseShift",
"TYPE": "float",
"MIN": 0.0,
"MAX": 1.0,
"DEFAULT": 0.3
},
{
"NAME": "bluePhaseShift",
"TYPE": "float",
"MIN": 0.0,
"MAX": 1.0,
"DEFAULT": 0.6
}
]
}*/
#define PI 3.1415926535
#define TWO_PI (PI * 2.0)
#define NUM_NOISE_OCTAVES 3
float map(float x, float in_min, float in_max, float out_min, float out_max) {
return (x - in_min) * (out_max - out_min) / (in_max - in_min) + out_min;
}
float ease(float p, float g) {
return p < 0.5 ? 0.5 * pow(2.0 * p, g) : 1.0 - 0.5 * pow(2.0 * (1.0 - p), g);
}
// Optimized hash function by Inigo Quilez
float hash(vec2 p) {
vec3 p3 = fract(vec3(p.xyx) * 0.13);
p3 += dot(p3, p3.yzx + 3.333);
return fract((p3.x + p3.y) * p3.z);
}
// 2D gradient noise by Inigo Quilez
float noise(vec2 x) {
vec2 i = floor(x), f = fract(x), u = f * f * (3.0 - 2.0 * f);
return mix(hash(i), hash(i + vec2(1.0, 0.0)), u.x) +
(hash(i + vec2(0.0, 1.0)) - hash(i)) * u.y * (1.0 - u.x) +
(hash(i + vec2(1.0, 1.0)) - hash(i + vec2(1.0, 0.0))) * u.x * u.y;
}
float fbm(vec2 x) {
float v = 0.0, a = 0.5;
vec2 shift = vec2(100.0);
mat2 rot = mat2(cos(0.5), sin(0.5), -sin(0.5), cos(0.5));
for (int i = 0; i < NUM_NOISE_OCTAVES; ++i) {
v += a * noise(x);
x = rot * x * 2.0 + shift;
a *= 0.5;
}
return v;
}
float distFromCenter(vec2 uv) {
vec2 p = uv - 0.5;
p.x *= RENDERSIZE.x / RENDERSIZE.y;
return length(p);
}
float upwelling(vec2 uv, float t, float noiseIntensity, vec2 noiseScale, float phase) {
float uvNoise = fbm(uv * noiseScale * fbm(uv * noiseScale + t * 0.3)) * noiseIntensity;
float noiseOffset = uvNoise * smoothstep(0.32, 0.22, distFromCenter(uv));
float waveOffset = smoothstep(0.8, 0.001, distFromCenter(uv)) * 18.0;
return map(sin(TWO_PI * (t + noiseOffset + waveOffset + phase)), -1.0, 1.0, 0.0, 1.0);
}
vec4 fullscreenMelt(vec2 uv, float t) {
float phaseShift = smoothstep(0.5, 1.0, 1.0 - distFromCenter(uv));
float upwellRed = upwelling(uv, t, noiseIntensity, vec2(noiseScaleX, noiseScaleY), redPhaseShift * phaseShift);
float upwellGreen = upwelling(uv, t, noiseIntensity, vec2(noiseScaleX, noiseScaleY), greenPhaseShift * phaseShift);
float upwellBlue = upwelling(uv, t, noiseIntensity, vec2(noiseScaleX, noiseScaleY), bluePhaseShift * phaseShift);
return vec4(upwellRed, upwellGreen, upwellBlue, 1.0);
}
void main() {
vec2 uv = gl_FragCoord.xy / RENDERSIZE.xy;
float fadeFromCenter = 1.0 - min(ease(distFromCenter(uv) + 0.2, 20.0), 1.0);
vec4 vignette = vec4(vec3(fadeFromCenter), 1.0);
gl_FragColor = fullscreenMelt(uv, TIME) * vignette;
}
+164
View File
@@ -0,0 +1,164 @@
/*
{
"CREDIT": "by mojovideotech",
"CATEGORIES" : [
"generator",
"vortex"
],
"DESCRIPTION" : "",
"INPUTS" : [
{
"NAME" : "center",
"TYPE" : "point2D",
"DEFAULT" : [ 0.0, 0.0 ],
"MAX" : [ 1.0, 1.0 ],
"MIN" : [ -1.0, -1.0 ]
},
{
"NAME" : "scale",
"TYPE" : "float",
"DEFAULT" : 10.0,
"MIN" : 0.0,
"MAX" : 30.0
},
{
"NAME" : "rate",
"TYPE" : "float",
"DEFAULT" : 0.5,
"MIN" : -3.0,
"MAX" : 3.0
},
{
"NAME" : "fov",
"TYPE" : "float",
"DEFAULT" : 1.0,
"MIN" : 0.25,
"MAX" : 2.0
},
{
"NAME" : "light",
"TYPE" : "float",
"DEFAULT" : 0.4,
"MIN" : -2.0,
"MAX" : 2.0
},
{
"NAME" : "hue",
"TYPE" : "float",
"DEFAULT" : 0.0,
"MIN" : -0.5,
"MAX" : 0.5
},
{
"NAME" : "tint",
"TYPE" : "float",
"DEFAULT" : 0.0,
"MIN" : -0.5,
"MAX" : 0.5
},
{
"NAME": "pulse",
"TYPE": "bool",
"DEFAULT": false
}
],
"ISFVSN" : 2.0
}
*/
////////////////////////////////////////////////////////////////////
// MetaSevenVortex by mojovideotech
//
// based on :
// shadertoy.com\/view\/lt2fDz
//
// License Creative Commons Attribution-NonCommercial-ShareAlike 3.0
////////////////////////////////////////////////////////////////////
vec2 march(vec3 pos, vec3 dir);
vec3 camera(vec2 uv);
void rotate(inout vec2 v, float angle);
vec3 ret_col; // torus color
vec3 h; // light amount
#define I_MAX 400.
#define E 0.00001
#define FAR 50.
vec3 blackbody(float Temp) {
vec3 col = vec3(255.);
col.x = 56100000. * pow(Temp,(-3.0 / 2.0)) + 148.0;
col.y = 100.04 * log(Temp) - 623.6;
if (Temp > 6500.0) col.y = 35200000.0 * pow(Temp,(-3.0 / 2.0)) + 184.0;
col.z = 194.18 * log(Temp) - 1448.6;
col = clamp(col, 0.0, 255.0)/255.0;
if (Temp < 1000.0) col *= Temp/1000.0;
return col;
}
float scene(vec3 p) {
float var, mind = 1e5, T = TIME*rate;
p.z += 10.0;
rotate(p.xz, 1.57-0.5*T );
rotate(p.yz, 1.57-0.5*T );
var = atan(p.x,p.y);
vec2 q = vec2( ( length(p.xy) )-6.0,p.z);
rotate(q, var*0.25+T*2.0*0.0);
vec2 oq = q ;
q = abs(q)-2.5;
if (oq.x < q.x && oq.y > q.y)
rotate(q, ( (var*1.0)+T*0.0)*3.14+T*0.0);
else
rotate(q, ( 0.28-(var*1.0)+T*0.0)*3.14+T*0.0);
float oldvar = var;
ret_col = 1.0-vec3(0.5 + tint, 1.0 - abs(hue + tint), 0.5 - hue);
mind = length(q)+0.5+1.05*(length(fract(q*0.5*(3.0+3.0*sin(oldvar*1.0 - T*2.0)) )-.5)-1.215);
h -= vec3(-3.20,0.20,1.0)*vec3(1.0)*0.0025/(0.051+(mind-sin(oldvar*1.0 - T*2.0 + 3.14)*0.125 )*(mind-sin(oldvar*1.0 - T*2.0 + 3.14)*0.125 ) );
h -= vec3(1.20,-0.50,-0.50)*vec3(1.0)*0.025/(0.501+(mind-sin(oldvar*1.0 - T*2.0)*0.5 )*(mind-sin(oldvar*1.0 - T*2.0)*0.5 ) );
h += vec3(0.25, 0.4, 0.05)*0.0025/(0.021+mind*mind);
return (mind);
}
vec2 march(vec3 pos, vec3 dir) {
vec2 dist = vec2(0.0, 0.0), s = vec2(0.0, 0.0);
vec3 p = vec3(0.0, 0.0, 0.0);
for (float i = -1.0; i < I_MAX; ++i) {
p = pos + dir * dist.y;
dist.x = scene(p);
dist.y += dist.x*0.2;
if (log(dist.y*dist.y/dist.x/1e5) > 0.0 || dist.x < E || dist.y > FAR)
{ break; }
s.x++;
}
s.y = dist.y;
return (s);
}
void rotate(inout vec2 v, float angle) { v = vec2(cos(angle)*v.x+sin(angle)*v.y,-sin(angle)*v.x+cos(angle)*v.y); }
vec3 camera(vec2 uv) {
vec3 forw = vec3(0.0, 0.0, -1.0);
vec3 right = vec3(1.0, 0.0, 0.0);
vec3 up = vec3(0.0, 1.0, 0.0);
return (normalize((uv.x) * right + (uv.y) * up + fov * forw));
}
void main()
{
vec3 col= vec3(0.0);
vec2 R = RENDERSIZE.xy,
uv = (vec2(gl_FragCoord.xy-R/2.0) / R.y) - center;
vec3 dir = camera(uv);
vec3 pos = vec3(0.0, 0.0, 20.0-scale);
if (pulse) { pos.z = 4.5+1.5*sin(TIME*abs(rate)*5.0); }
h*= 0.0;
vec2 inter = (march(pos, dir));
col.xyz = ret_col*(1.0-inter.x*0.0125);
col += h * light;
gl_FragColor = vec4(sqrt(max(col, 0.0)), 1.0);
}
+85
View File
@@ -0,0 +1,85 @@
/*{
"CREDIT": "by mojovideotech, rhythmic-visions, sonicwalker",
"CATEGORIES": [
"Shapes"
],
"DESCRIPTION": "Radar with controls. Adapted from https://editor.isf.video/shaders/669e3b36be01f9001aa474ee",
"INPUTS": [
{
"NAME": "speed",
"TYPE": "float",
"DEFAULT": 1,
"MIN": 0.1,
"MAX": 10
},
{
"NAME": "intensity",
"TYPE": "float",
"DEFAULT": 2,
"MIN": 0.1,
"MAX": 2
},
{
"NAME": "glow",
"TYPE": "float",
"DEFAULT": 1,
"MIN": 0.5,
"MAX": 2
},
{
"NAME": "radius",
"TYPE": "float",
"DEFAULT": 0.5,
"MIN": 0.1,
"MAX": 2
},
{
"NAME": "color",
"TYPE": "color",
"DEFAULT": [
2.0,
1,
2.0,
1.0
]
}]
}*/
#ifdef GL_ES
precision mediump float;
#endif
#define PI 3.1415926535897932384626433832795
float d2y(float d){return glow/(0.2+d);}
float fct(vec2 p, float r){
float t = TIME * speed;
float a = 2.*mod(-atan(p.y, p.x)+t, 2.*PI);
float scan = 0.*1.;
return (d2y(a)+scan)*(intensity-step(radius,r));
}
float circle(vec2 p, float r){
float d=distance(r, radius);
return d2y(100.*d);
}
void main( void ) {
vec2 position = (( gl_FragCoord.xy )-0.5*RENDERSIZE)/ RENDERSIZE.y ;
position/=cos(1.5*length(position));
float y = 0.;
float dc = length(position);
y+=fct(position, dc);
y+=circle(position, dc);
y=pow(y,1.67);
vec3 radarColor = 0.3*vec3(color);
gl_FragColor = vec4( sqrt(y)*radarColor,1.0 );
}
@@ -0,0 +1,54 @@
/*{
"CREDIT": "by mojovideotech",
"DESCRIPTION": "",
"CATEGORIES": [
"particles"
],
"INPUTS": [
]
}*/
////////////////////////////////////////////////////////////
// ParticularBehavior1 by mojovideotech
//
// based on :
// glslsandbox/\e#44948.0
//
// Creative Commons Attribution-NonCommercial-ShareAlike 3.0
////////////////////////////////////////////////////////////
#define pi 3.141592653589793 // pi
#define T (TIME + 10000.0) * 0.1
float hash(vec2 co) { float m = dot(co, vec2(237.561, 39.1)); return fract(sin(cos(m)* 1113.27)); }
float random(float n) { return fract(cos(sin(n * 55.753) * 367.34)); }
mat2 rotate2d(float angle){ return mat2(cos(angle), -sin(angle), sin(angle), cos(angle)); }
void main() {
vec2 uv = (gl_FragCoord.xy * 2.0 - RENDERSIZE.xy) / RENDERSIZE.x;
vec2 p = uv * rotate2d(T * 0.213);
float direction = 120.0/(T/p.x,-T/p.y,sqrt(T));
float speed = T * direction * 0.231 ;
float distanceFromCenter = random(1.5) + length(p);
p.yx *= rotate2d(-T * 0.239);
float meteorAngle = atan(p.y, p.x) * (359.0 + cos(atan(speed,pi))+pi);
float flooredAngle = floor(meteorAngle);
float randomAngle = pow(random(flooredAngle),mix(cos(direction*pi),-sin(speed*pi),distanceFromCenter));
float t = speed + randomAngle;
float lightsCountOffset = 0.9;
float adist = randomAngle / distanceFromCenter * lightsCountOffset;
float dist = t + adist;
float meteorDirection = (direction < 0.5) ? -1.0 : 0.0;
dist = abs(fract(dist) + meteorDirection);
float lightLength = 40.0/hash(uv.xy);
float meteor = (random(3.0) / dist) * cos(sin(speed)) / lightLength;
meteor -= dot(vec2(distanceFromCenter,meteorDirection),vec2(randomAngle,meteorAngle));
vec3 color = vec3(0.0);
color += meteor;
gl_FragColor = vec4(color, 1.0);
}
+214
View File
@@ -0,0 +1,214 @@
/*{
"CREDIT": "by mojovideotech",
"CATEGORIES": [
"generator"
],
"INPUTS": [
{
"NAME" : "center",
"TYPE" : "point2D",
"DEFAULT" : [ 0.0, 0.0 ],
"MAX" : [ 1.0, 1.0 ],
"MIN" : [ -1.0, -1.0 ]
},
{
"NAME" : "grow",
"TYPE" : "float",
"DEFAULT" : 1.0,
"MIN" : 0.1,
"MAX" : 2.0
},
{
"NAME" : "rate",
"TYPE" : "float",
"DEFAULT" : 2.5,
"MIN" : 0.0,
"MAX" : 5.0
},
{
"NAME" : "contour",
"TYPE" : "float",
"DEFAULT" : 16.0,
"MIN" : 1.0,
"MAX" : 20.0
},
{
"NAME" : "radius1",
"TYPE" : "float",
"DEFAULT" : 0.1,
"MIN" : 0.01,
"MAX" : 3.0
},
{
"NAME" : "radius2",
"TYPE" : "float",
"DEFAULT" : 0.5,
"MIN" : 0.01,
"MAX" : 2.0
},
{
"NAME" : "rays",
"TYPE" : "float",
"DEFAULT" : 100,
"MIN" : 20.0,
"MAX" : 500.0
},
{
"NAME" : "detail",
"TYPE" : "float",
"DEFAULT" : 0.05,
"MIN" : 0.01,
"MAX" : 0.5
},
{
"NAME" : "nudge",
"TYPE" : "float",
"DEFAULT" : 0.0,
"MIN" : -1.5,
"MAX" : 1.5
},
{
"NAME" : "edge",
"TYPE" : "float",
"DEFAULT" : 0.5,
"MIN" : 0.1,
"MAX" : 1.0
},
{
"NAME" : "freq",
"TYPE" : "float",
"DEFAULT" : 8.0,
"MIN" : 1.0,
"MAX" : 16.0
},
{
"NAME" : "hue",
"TYPE" : "float",
"DEFAULT" : 1.0,
"MIN" : 0.0,
"MAX" : 2.0
},
{
"NAME" : "tint",
"TYPE" : "float",
"DEFAULT" : 1.0,
"MIN" : 0.0,
"MAX" : 2.0
},
{
"NAME": "fractnoise",
"TYPE": "bool",
"DEFAULT": "FALSE"
}
]
}
*/
////////////////////////////////////////////////////////////
// PlasmaEmitter by mojovideotech
//
// based on :
// Light Orb by Hadyn Lander shadertoy/ldjcWy
// 3D noise by Nikita Miropolskiy shadertoy/XsX3zB
//
// Creative Commons Attribution-NonCommercial-ShareAlike 3.0
////////////////////////////////////////////////////////////
vec3 random3(vec3 c) {
float j = 4096.0*sin(dot(c,vec3(17.0, 59.4, 15.0)));
vec3 r;
r.z = fract(512.0*j);
j *= .125;
r.x = fract(512.0*j);
j *= .125;
r.y = fract(512.0*j);
return r-0.5;
}
const float F3 = 0.3333333;
const float G3 = 0.1666667;
float simplex3d(vec3 p) {
vec3 s = floor(p + dot(p, vec3(F3)));
vec3 x = p - s + dot(s, vec3(G3));
vec3 e = step(vec3(0.0), x - x.yzx);
vec3 i1 = e*(1.0 - e.zxy);
vec3 i2 = 1.0 - e.zxy*(1.0 - e);
vec3 x1 = x - i1 + G3;
vec3 x2 = x - i2 + 2.0*G3;
vec3 x3 = x - 1.0 + 3.0*G3;
vec4 w, d;
w.x = dot(x, x);
w.y = dot(x1, x1);
w.z = dot(x2, x2);
w.w = dot(x3, x3);
w = max(0.6 - w, 0.0);
d.x = dot(random3(s), x);
d.y = dot(random3(s + i1), x1);
d.z = dot(random3(s + i2), x2);
d.w = dot(random3(s + 1.0), x3);
w *= w;
w *= w;
d *= w;
return dot(d, vec4(rays));
}
const mat3 rot1 = mat3(-0.37, 0.36, 0.85,-0.14,-0.93, 0.34,0.92, 0.01,0.4);
const mat3 rot2 = mat3(-0.55,-0.39, 0.74, 0.33,-0.91,-0.24,0.77, 0.12,0.63);
const mat3 rot3 = mat3(-0.71, 0.52,-0.47,-0.08,-0.72,-0.68,-0.7,-0.45,0.56);
float simplex3d_fractal(vec3 m) {
return 0.5333333*simplex3d(m*rot1)
+0.2666667*simplex3d(2.0*m*rot2)
+0.1333333*simplex3d(4.0*m*rot3)
+0.0666667*simplex3d(8.0*m);
}
float getNoiseValue(vec2 p, float t) {
vec3 p3 = vec3(p.x, p.y, 0.0) + vec3(0.0, 0.0, t*0.025);
float n;
if (fractnoise) { n = simplex3d_fractal(p3*freq+freq); }
else n = simplex3d(p3*freq*freq);
return 0.5 + 0.5*n;
}
void main(void) {
float T = rate*TIME;
float b = 1.0/detail;
vec2 p = (gl_FragCoord.xy / RENDERSIZE.y) - center;
float aspect = RENDERSIZE.x/RENDERSIZE.y;
vec2 pos = p-vec2(0.5*aspect, 0.5);
p = vec2(0.5*aspect, 0.5)+normalize(pos)*min(length(pos)+nudge*radius1*radius2, radius1*radius2);
float noise = getNoiseValue(b*0.25*p, T);
float dist = clamp(1.0-length(pos)/radius2, 0.0, 1.0);
float sd = dist * noise;
float h, f;
h = 1.0-clamp(abs(dist-(1.0-radius1))/radius1, 0.0, 1.0);
h = pow(h, 21.0 - contour);
h = clamp(0.9*h, 0.0, 1.0);
float innerBall = clamp(abs(dist-(1.0-radius1))/radius1, 0.0, 1.0);
innerBall = smoothstep(0.5, 0.85, innerBall);
innerBall += noise;
f = mix( (noise*grow+h)*h + innerBall, noise*grow+h, step(dist, 1.0-radius1));
f = smoothstep(edge,edge+0.1, f);
vec3 colorNoise;
colorNoise.x = getNoiseValue(b*0.25*p, 10.0+T);
colorNoise.y = getNoiseValue(b*0.25*p, 00.0+T);
colorNoise.z = getNoiseValue(b*0.25*p, 30.0+T);
colorNoise.x = smoothstep(edge,edge+0.1, colorNoise.x);
colorNoise.y = smoothstep(edge,edge+0.1, colorNoise.y);
colorNoise.z = smoothstep(edge,edge+0.1, colorNoise.z);
vec3 col = mix(vec3(hue+tint, colorNoise.x, 2.0-hue), vec3(colorNoise.x, 2.0-tint, abs(hue-tint)), colorNoise.y);
col += vec3(1.0) * (pow(clamp(dist+radius1, 0.0, 0.0), 8.0));
col *= f;
vec3 bgColor = mix(vec3(0.0,0.0,0.5), vec3(0.0,0.5,0.5), dist*detail);
bgColor *= vec3(1.0,1.0,1.0) * atan(dist, T);
col += bgColor;
gl_FragColor = vec4(col,1.0);
}
+142
View File
@@ -0,0 +1,142 @@
/*{
"CREDIT": "by mojovideotech",
"CATEGORIES" : [
"Generator",
"waves"
],
"DESCRIPTION" : "",
"INPUTS" : [
{
"NAME" : "center",
"TYPE" : "point2D",
"DEFAULT": [
-2,
-1
],
"MAX" : [
10,
10
],
"MIN" : [
-10,
-10
]
},
{
"NAME": "rate",
"TYPE": "float",
"DEFAULT": -1,
"MIN": -3,
"MAX": 3
},
{
"NAME": "zoom",
"TYPE": "float",
"DEFAULT": 5,
"MIN": -10,
"MAX": 10
},
{
"NAME": "depth",
"TYPE": "float",
"DEFAULT": 0.6,
"MIN": 0.0,
"MAX": 1.0
},
{
"NAME": "rxy",
"TYPE": "float",
"DEFAULT": 11,
"MIN": 1,
"MAX": 17
},
{
"NAME": "rxz",
"TYPE": "float",
"DEFAULT": 13,
"MIN": 1,
"MAX": 17
}
]
}
*/
// PrimeWaves by mojovideotech
// based on:
// glslsandbox.com/e#21344.0
#ifdef GL_ES
precision highp float;
#endif
vec2 distort(vec2 p)
{
float theta = atan(p.y, p.x);
float radius = length(p);
radius = pow(radius, 1.0+depth);
p.x = radius * cos(theta);
p.y = radius * sin(theta);
return 0.5 * (p + 1.0);
}
vec4 pattern(vec2 p)
{
vec2 m=mod(p.xy+p.x+p.y,2.)-1.;
return vec4(length(m+p*0.1));
}
float hash(const float n)
{
return fract(sin(n)*29712.15073);
}
float noise(const vec3 x, float y, float z)
{
vec3 p=floor(x); vec3 f=fract(x);
f=f*f*(3.0-2.0*f);
float n=p.x+p.y*y+p.z*z;
float r1=mix(mix(hash(n+0.0),hash(n+1.0),f.x),mix(hash(n+y),hash(n+y+1.0),f.x),f.y);
float r2=mix(mix(hash(n+z),hash(n+z+1.0),f.x),mix(hash(n+y+z),hash(n+y+z+1.0),f.x),f.y);
return mix(r1,r2,f.z);
}
void main( void ) {
float RY = 0.0; float RZ = 0.0;
if (rxy <= 1.) { RY += 11.; }
else if (rxy <= 2.) { RY += 13.; }
else if (rxy <= 3.) { RY += 17.; }
else if (rxy <= 4.) { RY += 19.; }
else if (rxy <= 5.) { RY += 23.; }
else if (rxy <= 6.) { RY += 29.; }
else if (rxy <= 8.) { RY += 31.; }
else if (rxy <= 9.) { RY += 37.; }
else if (rxy <= 10.) { RY += 41.; }
else if (rxy <= 11.) { RY += 43.; }
else if (rxy <= 12.) { RY += 47.; }
else if (rxy <= 13.) { RY += 53.; }
else if (rxy <= 14.) { RY += 59.; }
else if (rxy <= 15.) { RY += 61.; }
else if (rxy <= 16.) { RY += 67.; }
if (rxz <= 1.) { RZ += 11.; }
else if (rxz <= 2.) { RZ += 13.; }
else if (rxz <= 3.) { RZ += 17.; }
else if (rxz <= 4.) { RZ += 19.; }
else if (rxz <= 5.) { RZ += 23.; }
else if (rxz <= 6.) { RZ += 29.; }
else if (rxz <= 8.) { RZ += 31.; }
else if (rxz <= 9.) { RZ += 37.; }
else if (rxz <= 10.) { RZ += 41.; }
else if (rxz <= 11.) { RZ += 43.; }
else if (rxz <= 12.) { RZ += 47.; }
else if (rxz <= 13.) { RZ += 53.; }
else if (rxz <= 14.) { RZ += 59.; }
else if (rxz <= 15.) { RZ += 61.; }
else if (rxz <= 16.) { RZ += 67.; }
vec2 pos = ( gl_FragCoord.xy / RENDERSIZE.xy * zoom )+center;
float col = noise(pos.xyx + (TIME*rate),RY,RZ);
vec4 c = pattern(distort(pos+col));
c.xy = distort(c.xy);
gl_FragColor = vec4(c.x - col, sin(c.y) - col, cos(c.z), 1.0);
}
@@ -0,0 +1,71 @@
/*
{
"CATEGORIES": [
"Automatically Converted"
],
"INPUTS": [
]
}
*/
// By @paulofalcao
//
// Blobs
#ifdef GL_ES
precision highp float;
#endif
float makePoint(float x,float y,float fx,float fy,float sx,float sy,float t){
float xx=x*cos(t*fx);
float yy=y*sin(t*fy);
return 1./ (sqrt(length(xx+yy) + length(xx*yy)));
}
void main( void ) {
vec2 p=(gl_FragCoord.xy/RENDERSIZE.x)*2.0-vec2(1.0,RENDERSIZE.y/RENDERSIZE.x);
float x=p.x;
float y=p.y;
float a=
makePoint(x,y,3.3,2.9,0.3,0.3,TIME);
a=a+makePoint(x,y,1.9,2.0,0.4,0.4,TIME);
a=a+makePoint(x,y,0.8,0.7,0.4,0.5,TIME);
a=a+makePoint(x,y,2.3,0.1,0.6,0.3,TIME);
a=a+makePoint(x,y,0.8,1.7,0.5,0.4,TIME);
a=a+makePoint(x,y,0.3,1.0,0.4,0.4,TIME);
a=a+makePoint(x,y,1.4,1.7,0.4,0.5,TIME);
a=a+makePoint(x,y,1.3,2.1,0.6,0.3,TIME);
a=a+makePoint(x,y,1.8,1.7,0.5,0.4,TIME);
float b=
makePoint(x,y,1.2,1.9,0.3,0.3,TIME);
b=b+makePoint(x,y,0.7,2.7,0.4,0.4,TIME);
b=b+makePoint(x,y,1.4,0.6,0.4,0.5,TIME);
b=b+makePoint(x,y,2.6,0.9,0.6,0.3,TIME);
b=b+makePoint(x,y,0.7,1.4,0.5,0.4,TIME);
b=b+makePoint(x,y,0.7,1.7,0.4,0.4,TIME);
b=b+makePoint(x,y,0.8,0.5,0.4,0.5,TIME);
b=b+makePoint(x,y,1.4,0.7,0.6,0.3,TIME);
b=b+makePoint(x,y,0.7,1.3,0.5,0.4,TIME);
float c=
makePoint(x,y,3.7,0.3,0.3,0.3,TIME);
c=c+makePoint(x,y,1.9,1.3,0.4,0.4,TIME);
c=c+makePoint(x,y,0.8,0.9,0.4,0.5,TIME);
c=c+makePoint(x,y,1.2,1.7,0.6,0.3,TIME);
c=c+makePoint(x,y,0.3,0.6,0.5,0.4,TIME);
c=c+makePoint(x,y,0.3,0.3,0.4,0.4,TIME);
c=c+makePoint(x,y,1.4,0.8,0.4,0.5,TIME);
c=c+makePoint(x,y,0.2,0.6,0.6,0.3,TIME);
c=c+makePoint(x,y,1.3,0.5,0.5,0.4,TIME);
vec3 d=vec3(a,b,c)*0.01;
gl_FragColor = vec4(d.x,d.y,d.z,1.0);
}
@@ -0,0 +1,76 @@
/*{
"CREDIT": "by mojovideotech",
"CATEGORIES": [
"Shapes"
],
"DESCRIPTION": "",
"ISFVSN" : "2",
"INPUTS": [
{
"NAME" : "scale",
"TYPE" : "float",
"DEFAULT" : 1.0,
"MIN" : 0.1,
"MAX" : 2.0
},
{
"NAME" : "thickness",
"TYPE" : "float",
"DEFAULT" : 1.75,
"MIN" : 0.5,
"MAX" : 2.0
},
{
"NAME" : "twists",
"TYPE" : "float",
"DEFAULT" : 1.0,
"MIN" : 1.0,
"MAX" : 5.0
},
{
"NAME" : "rate",
"TYPE" : "float",
"DEFAULT" : 1.5,
"MIN" : -2.0,
"MAX" : 2.0
},
{
"NAME" : "gamma",
"TYPE" : "float",
"DEFAULT" : 0.454545,
"MIN" : 0.25,
"MAX" : 1.0
}
]
}
*/
////////////////////////////////////////////////////////////
// RainbowRingCubicTwist by mojovideotech
//
// based on :
// glslsandbox/e#58416.0
//
// Creative Commons Attribution-NonCommercial-ShareAlike 3.0
////////////////////////////////////////////////////////////
#ifdef GL_ES
precision highp float;
#endif
void main()
{
float T = TIME * rate;
vec2 R = RENDERSIZE;
vec2 P = (gl_FragCoord.xy - 0.5*R)*(2.1 - scale);
vec4 S, E, F;
P = vec2(length(P) / R.y - 0.333, atan(P.y,P.x));
P *= vec2(2.6 - thickness,floor(twists)); ;
S = 0.08*cos(1.5*vec4(0.0, 1.0, 2.0, 3.0) + T + P.y + sin(P.y)*cos(T));
E = S.yzwx;
F = max(P.x - S, E - P.x);
gl_FragColor = pow(dot(clamp(F*R.y, 0.0, 1.0), 72.0*(S - E))*(S - 0.1), vec4(gamma));
}
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:fa3180ca4cd53d1dadcbce76b675f6943e9e836db4f0325949472647ce0f54f9
size 1568906
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:df6b5f6158709a590be33d32ee6aa26bba79347e945f86f7faf40c65ec3963e7
size 9198017
+130
View File
@@ -0,0 +1,130 @@
/*{
"DESCRIPTION": "Your shader description",
"CREDIT": "by you",
"CATEGORIES": [
"Your category"
],
"INPUTS": [
{
"LABEL": "PosX",
"NAME": "PosX",
"TYPE": "float",
"DEFAULT": 0.0,
"MIN": 0.0,
"MAX": 1.0
},
{
"LABEL": "PosY",
"NAME": "PosY",
"TYPE": "float",
"DEFAULT": 0.0,
"MIN": 0.0,
"MAX": 1.0
},
{
"LABEL": "PosZ",
"NAME": "PosZ",
"TYPE": "float",
"DEFAULT": 0.0,
"MIN": 0.0,
"MAX": 1.0
},
{
"LABEL": "RotX",
"NAME": "RotX",
"TYPE": "float",
"DEFAULT": 0.0,
"MIN": 0.0,
"MAX": 1.0
},
{
"LABEL": "RotY",
"NAME": "RotY",
"TYPE": "float",
"DEFAULT": 0.0,
"MIN": 0.0,
"MAX": 1.0
},
{
"LABEL": "RotZ",
"NAME": "RotZ",
"TYPE": "float",
"DEFAULT": 0.0,
"MIN": 0.0,
"MAX": 1.0
}
]
}*/
vec3 iResolution = vec3(RENDERSIZE, 1.);
float iGlobalTime = TIME;
const float PI=3.14159265358979323846;
float speed=iGlobalTime*0.2975;
float ground_x=PosX*2.-1.;
float ground_y=PosY*2.-1.;
float ground_z=PosZ;
vec2 rotate(vec2 k,float t)
{
return vec2(cos(t)*k.x-sin(t)*k.y,sin(t)*k.x+cos(t)*k.y);
}
float draw_scene(vec3 p)
{
float tunnel_m=0.125*cos(PI*p.z*1.0+speed*4.0-PI);
float tunnel1_p=2.0;
float tunnel1_w=tunnel1_p*0.225;
float tunnel1=length(mod(p.xy,tunnel1_p)-tunnel1_p*0.5)-tunnel1_w; // tunnel1
float tunnel2_p=2.0;
float tunnel2_w=tunnel2_p*0.2125+tunnel2_p*0.0125*cos(PI*p.y*8.0)+tunnel2_p*0.0125*cos(PI*p.z*8.0);
float tunnel2=length(mod(p.xy,tunnel2_p)-tunnel2_p*0.5)-tunnel2_w; // tunnel2
float hole1_p=1.0;
float hole1_w=hole1_p*0.5;
float hole1=length(mod(p.xz,hole1_p).xy-hole1_p*0.5)-hole1_w; // hole1
float hole2_p=0.25;
float hole2_w=hole2_p*0.375;
float hole2=length(mod(p.yz,hole2_p).xy-hole2_p*0.5)-hole2_w; // hole2
float hole3_p=0.5;
float hole3_w=hole3_p*0.25+0.125*sin(PI*p.z*2.0);
float hole3=length(mod(p.xy,hole3_p).xy-hole3_p*0.5)-hole3_w; // hole3
float tube_m=0.075*sin(PI*p.z*1.0);
float tube_p=0.5+tube_m;
float tube_w=tube_p*0.025+0.00125*cos(PI*p.z*128.0);
float tube=length(mod(p.xy,tube_p)-tube_p*0.5)-tube_w; // tube
float bubble_p=0.05;
float bubble_w=bubble_p*0.5+0.025*cos(PI*p.z*2.0);
float bubble=length(mod(p.yz,bubble_p)-bubble_p*0.5)-bubble_w; // bubble
return max(min(min(-tunnel1,mix(tunnel2,-bubble,0.375)),max(min(-hole1,hole2),-hole3)),-tube);
}
void mainImage( out vec4 fragColor, in vec2 fragCoord )
{
vec2 position=(fragCoord.xy/iResolution.xy);
vec2 p=-1.0+2.0*position;
vec3 dir=normalize(vec3(p*vec2(1.77,1.0),1.0)); // screen ratio (x,y) fov (z)
dir.yz=rotate(dir.yz,RotX*2.*PI); // rotation x
dir.zx=rotate(dir.zx,RotY*2.*PI); // rotation y
dir.xy=rotate(dir.xy,RotZ*2.*PI); // rotation z
vec3 ray = vec3(ground_x,ground_y,(ground_z-speed*2.5));
float t=0.0;
const int ray_n=96;
for(int i=0;i<ray_n;i++)
{
float k=draw_scene(ray+dir*t);
t+=k*0.75;
}
vec3 hit=ray+dir*t;
vec2 h=vec2(-0.0025,0.002); // light
vec3 n=normalize(vec3(draw_scene(hit+h.xyx),draw_scene(hit+h.yxy),draw_scene(hit+h.yyx)));
float c=(n.x+n.y+n.z)*0.35;
vec3 color=vec3(c,c,c)+t*0.0625;
fragColor=vec4(vec3(c-t*0.0375+p.y*0.05,c-t*0.025-p.y*0.0625,c+t*0.025-p.y*0.025)+color*color,1.0);
}
void main(void) {
mainImage(gl_FragColor, gl_FragCoord.xy);
}
@@ -0,0 +1,54 @@
/*{
"CREDIT": "by mojovideotech",
"CATEGORIES": [
"Shapes"
],
"DESCRIPTION": "based on glslsandbox.com/e#27866.0",
"INPUTS": []
}*/
// ShapeSpinWorkshop1 by mojovideotech
// http://glslsandbox.com/e#27866.0
// forked from :
// Supershapes! by xpansive
////////////////////////////////////////////////////////////
//
// ShapeSpinWorkshop1 by mojovideotech
//
// based on : glslsandbox.com/\e#27866.0
//
// fork of : Supershapes! by xpansive
//
////////////////////////////////////////////////////////////
float supershape(vec2 p, float m, float n1, float n2, float n3, float a, float b, float s, float r) {
float ang = atan(p.y * RENDERSIZE.y, p.x * RENDERSIZE.x) + r;
float v = pow(pow(abs(cos(m * ang / 4.0) / a), n2) + pow(abs(sin(m * ang / 4.0) / b), n3), -1.0 / n1);
return 1. - step(v * s * RENDERSIZE.y, length(p * RENDERSIZE));
}
void main( void ) {
vec2 p = (gl_FragCoord.xy / RENDERSIZE) * 2.0 - 1.0;
p *= 2.75;
float color ;
float color1 ;
float color2 ;
color += supershape(p - vec2(-2, 1), 6.0, 1.0, 7.0, 8.0, 1.0, 1.0, 0.2, (TIME*0.5));
color1 += supershape(p - vec2(-2, -1), 3.0, 4.5, 10.0, 10.0, 1.0, 1.0, 0.95, (-TIME*0.5));
color2 += supershape(p - vec2(-1, 1), 7.0, 10.0, 6.0, 6.0, 1.0, 1.0, 0.95, (-TIME*0.5));
color += supershape(p - vec2(-1, -1), 16.0, 0.5, 0.15, 16.0, 1.1, 1.0, 1.025, (TIME*0.5));
color1 += supershape(p - vec2(0, 1), 4.0, 12.0, 15.0, 15.0, 1.0, 1.0, 0.85, (TIME*0.5));
color2 += supershape(p - vec2(0, -1), 19.0, 9.0, 14.0, 11.0, 1.0, 1.0, 0.9, (-TIME*0.5));
color += supershape(p - vec2(1, 1), 6.0, 60.0, 55.0, 1000.0, 1.0, 1.0, 0.67, (-TIME*0.5));
color1 += supershape(p - vec2(1, -1), 6.0, 0.53, 1.69, 0.45, 1.0, 1.0, 1.15, (TIME*0.5));
color1 += supershape(p - vec2(2, 1), 8.0, 0.5, 0.5, 0.3, 1.0, 1.0, 1.5, (TIME*0.5));
color2 += supershape(p - vec2(2, -1), 6.0, -0.62, 30.0, 0.6, 1.0, 1.0, 1.25, (-TIME*0.5));
gl_FragColor = vec4(color2+0.3,color-0.25,0.5+color1,1.0);
}
+145
View File
@@ -0,0 +1,145 @@
/*{
"CREDIT": "by mojovideotech",
"CATEGORIES" : [
"generator",
"2d",
"fractal",
"space"
],
"DESCRIPTION" : "SimplyNebulous",
"INPUTS": [
{
"NAME": "rate",
"TYPE": "float",
"DEFAULT": 2.67,
"MIN": -5.0,
"MAX": 5.0
},
{
"NAME": "rot",
"TYPE": "float",
"DEFAULT": 2.82,
"MIN": 0.0,
"MAX": 6.28318
},
{
"NAME": "flash",
"TYPE": "float",
"DEFAULT": 0.04,
"MIN": 0.001,
"MAX": 1.0
},
{
"NAME": "zoom",
"TYPE": "float",
"DEFAULT": 5.5,
"MIN": 1.0,
"MAX": 10.0
},
{
"NAME": "morph",
"TYPE": "float",
"DEFAULT": 0.64,
"MIN": -5.0,
"MAX": 5.0
},
{
"NAME": "detail",
"TYPE": "float",
"DEFAULT": 19.0,
"MIN": 1.0,
"MAX": 24.0
},
{
"NAME": "depth",
"TYPE": "float",
"DEFAULT": 12.0,
"MIN": 7.0,
"MAX": 23.0
},
{
"NAME": "brightness",
"TYPE": "float",
"DEFAULT": 1.9,
"MIN": 1.0,
"MAX": 3.0
},
{
"NAME": "multiplier",
"TYPE": "float",
"DEFAULT": 1.0,
"MIN": 1.0,
"MAX": 5.0
},
{
"NAME": "red",
"TYPE": "float",
"DEFAULT": 1.5,
"MIN": 0.1,
"MAX":1.5
},
{
"NAME": "green",
"TYPE": "float",
"DEFAULT": 0.17,
"MIN": 0.1,
"MAX": 1.5
},
{
"NAME": "blue",
"TYPE": "float",
"DEFAULT": 1.5,
"MIN": 0.1,
"MAX":1.5
}
]
}*/
///////////////////////////////////////////
// SimplyNebulous by mojovideotech
//
// mod of:
// shadertoy.com\/lslGWr by Josh P
//
// based on :
// www.fractalforums.com/\new-theories-and-research/\very-simple-formula-for-fractal-patterns
//
// Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.
///////////////////////////////////////////
mat2 rmat(float t) {
float c = cos(t), s = sin(t);
return mat2(c,s,-s,s-c);
}
float field(in vec3 p) {
float strength = 9.0 + flash * log(1.e-6 + fract(sin(TIME) * 4373.11));
float accum = 0.0, prev = 0.0, tw = 0.0, b = -5.0;
for (int i = 0; i < 26; ++i) {
float mag = dot(p, p);
p = abs(p) / mag + vec3(-0.5, -0.4, - 1.5);
float w = exp(-float(i) / depth);
accum += w * exp(-strength * pow(abs(mag - prev), brightness));
tw += w;
prev = mag;
b += 1.0;
if (b - detail >= 1.0) break;
}
return max(0.0, 5.0 * accum / tw - 0.7);
}
void main() {
float TT = TIME * rate;
vec2 uv = 2.0 * gl_FragCoord.xy / RENDERSIZE.xy - 1.0;
vec2 uvs = uv * RENDERSIZE.xy / max(RENDERSIZE.x, RENDERSIZE.y) ;
vec3 p = vec3(uvs / zoom ,morph) + vec3(1.0, -1.3, -0.5);
p.xz *= rmat(rot);
float mu = floor(multiplier);
p += 0.2 * vec3(sin(TT / 13.0 * mu), sin(TT / 89.0 * mu), sin(TT / 233.0 * mu));
float t = field(p);
float v = (1.0 - exp(abs(uv.x) - 1.0) * 5.0 ) * (1.0 - exp(abs(uv.y) - 1.0));
vec3 col = mix(2.0,0.1, v) * vec3(1.1 * t * t * t, 1.3 * t * t, 0.1 * t);
col *= vec3(red,green,blue);
gl_FragColor = vec4(col,1.0);
}
+115
View File
@@ -0,0 +1,115 @@
// SaturdayShader Week 26 : Soft Patterns
// by Joseph Fiola (http://www.joefiola.com)
// 2016-02-13
// Based on Interferance, Color Waves by @gabrieldunne
// https://twitter.com/gabrieldunne/status/671398225593561090
// http://glslsandbox.com/e#29006.1
/*{
"CREDIT": "",
"DESCRIPTION": "",
"CATEGORIES": [
"Generator"
],
"INPUTS": [
{
"NAME": "zoom",
"TYPE": "float",
"DEFAULT": 4,
"MIN": 0,
"MAX": 50
},
{
"NAME": "iterations",
"TYPE": "float",
"DEFAULT": 10,
"MIN": 0,
"MAX": 10
},
{
"NAME": "contrast",
"TYPE": "float",
"DEFAULT": 0,
"MIN": -20,
"MAX": 20
},
{
"NAME": "offset",
"TYPE": "float",
"DEFAULT": 0,
"MIN": 0,
"MAX": 1
},
{
"NAME": "pattern",
"TYPE": "float",
"DEFAULT": 1,
"MIN": 0,
"MAX": 1
},
{
"NAME": "rotate",
"TYPE": "float",
"DEFAULT": 0,
"MIN": -1,
"MAX": 1
},
{
"NAME": "color1",
"TYPE": "color",
"DEFAULT": [
1,
0.4,
0.64,
1
]
},
{
"NAME": "color2",
"TYPE": "color",
"DEFAULT": [
0.3,
0.1,
0.14,
1
]
}
]
}*/
#define PI 3.14159
#define TWO_PI (PI*2.0)
vec2 rot(vec2 uv,float a){
return vec2(uv.x*cos(a) -uv.y*sin(a),uv.y*cos(a)+uv.x*sin(a));
}
void main()
{
vec2 center = (gl_FragCoord.xy);
vec2 uv = gl_FragCoord.xy / RENDERSIZE.xy;
uv -= vec2(0.5);
uv.x *= RENDERSIZE.x/RENDERSIZE.y;
uv *= zoom;
uv=rot(uv,rotate * PI);
float col = contrast;
for(float i = 0.; i < 10.0; i++)
{
float a = i * 4. * (TWO_PI * pattern / 10.);
col += cos(TWO_PI*(uv.y * cos(a) + uv.x * sin(a) + offset)) +cos(TWO_PI*(uv.y * cos(a) + uv.x * sin(-a) + offset));
if (i >= iterations) break;
}
gl_FragColor = col > 0.5 ? color1 : color2;
}
@@ -0,0 +1,93 @@
/*{
"CREDIT": "by mojovideotech",
"CATEGORIES" : [
"generator"
],
"DESCRIPTION" : "",
"INPUTS" : [
],
"ISFVSN" : 2.0
}
*/
////////////////////////////////////////////////////////////////////
// SpaceFleetFormation by mojovideotech
//
// based on :
// shadertoy.com\/view\/llBSRm
//
// License Creative Commons Attribution-NonCommercial-ShareAlike 3.0
////////////////////////////////////////////////////////////////////
#ifdef GL_ES
precision highp float;
#endif
#define twpi 6.283185307179586 // two pi, 2*pi
#define trpi 1.047197551196598 // one third of pi, pi/3
#define EPSN 0.001
#define ITERS 60
#define MAXD 12.0
#define T TIME * 0.125
mat2 rot(in float a) { float c = cos(a), s = sin(a); return mat2(c,-s,s,c); }
float hexagon(vec3 p, vec2 h) {
vec3 q = abs(p);
return max(q.y - h.y, max(dot(vec2(cos(trpi), sin(trpi)), q.zx), q.z) - h.x);
}
float sphere(vec3 pos, float radius) { return length(pos) - radius; }
float opRep( vec3 p, vec3 c ) { return sphere(mod(p,c)-0.5*c, 0.05); }
float opRep2( vec3 p, vec3 c ) { return hexagon(mod(p,c)-0.5*c, vec2(0.095,0.0125)); }
float distFunct(vec3 pos) { return min(opRep2(pos,vec3(0.5)), opRep(pos,vec3(0.5))); }
vec3 getNormal(vec3 pos) {
vec2 eps = vec2(0.0, EPSN);
vec3 normal = normalize(vec3(
distFunct(pos + eps.yxx) - distFunct(pos - eps.yxx),
distFunct(pos + eps.xyx) - distFunct(pos - eps.xyx),
distFunct(pos + eps.xxy) - distFunct(pos - eps.xxy)));
return normal;
}
vec3 render(vec2 st) {
vec3 cp = vec3(1.0, 1.0, 1.0);
cp *= vec3((smoothstep(-3.0, 3.0, sin(T*0.2+cos(T)))-0.5)*2.0, 1.0, T * 3.0);
vec3 ct = vec3((smoothstep(5.0, -5.0, cos(T*0.2+sin(T)))-0.5), T*0.2, 1.0);
vec3 cu = normalize(vec3(0.0, 1.0, 0.0));
vec3 cd = normalize(ct + cp);
cu.zy *= rot(sin(T)-cos(T)-T);
cu.xz *= rot(sin(T)-cos(T)+T);
vec3 cr = normalize(cross(cu,cd));
cu = normalize(cross(cd,cr));
vec3 rd = normalize(cd+st.x*cr+st.y*cu);
float dist = distFunct(cp);
float total = dist;
for(int i = 0; i<ITERS; i++) {
dist = distFunct(cp+rd*total);
total += dist;
if(dist<EPSN || dist>MAXD) continue;
}
vec3 fd = cp+rd*total;
float fog = 1.0 / (1.0 + total * total * 0.4);
vec3 col = vec3(fog);
if(dist<EPSN) { col.gbr += getNormal(fd); }
else { col = vec3(0.0); }
return vec3(col*fog);
}
void main( )
{
vec2 uv = (2.0 * (gl_FragCoord.xy / RENDERSIZE.xy) - 1.0 );
uv.y *= RENDERSIZE.y/RENDERSIZE.x;
vec3 c = render(uv);
gl_FragColor = vec4(c,1.0);
}
+147
View File
@@ -0,0 +1,147 @@
/*{
"CREDIT": "by mojovideotech",
"CATEGORIES": [
"space"
],
"INPUTS": [
{
"NAME": "mouse",
"TYPE": "point2D",
"MAX": [
0,
1
],
"MIN": [
-1,
0
]
},
{
"NAME": "mult",
"TYPE": "float",
"DEFAULT": 5,
"MIN": 2,
"MAX": 12
},
{
"NAME": "width",
"TYPE": "float",
"DEFAULT": 22,
"MIN": 20,
"MAX": 60
},
{
"NAME": "phase1",
"TYPE": "float",
"DEFAULT": 0.8,
"MIN": 0.01,
"MAX": 0.99
},
{
"NAME": "phase2",
"TYPE": "float",
"DEFAULT": 0.05,
"MIN": -0.5,
"MAX": 0.5
},
{
"NAME": "density",
"TYPE": "float",
"DEFAULT": 0.15,
"MIN": 0.05,
"MAX": 0.5
},
{
"NAME": "morph",
"TYPE": "float",
"DEFAULT": 5,
"MIN": 2,
"MAX": 10
},
{
"NAME": "hue",
"TYPE": "float",
"DEFAULT": 4,
"MIN": 0.5,
"MAX": 10
},
{
"NAME": "tint",
"TYPE": "float",
"DEFAULT": 9,
"MIN": 0.5,
"MAX": 10
},
{
"NAME": "rate",
"TYPE": "float",
"DEFAULT": -0.9,
"MIN": -1,
"MAX": 1
}
],
"DESCRIPTION": "from http://glslsandbox.com/e#31191.1"
}*/
///////////////////////////////////////////
// SpaceGhost by mojovideotech
//
// mod of glslsandbox.com/e#31191.1
//
// based on :
// SpaceGlowing.glsl 2016-03-02
// original code from shadertoy.com/\view/MtX3Ws
// simplified edit: Robert 25.11.2015
// see also shadertoy.com/\view/\Mlj3zW
//
// Creative Commons Attribution-NonCommercial-ShareAlike 3.0
///////////////////////////////////////////
#ifdef GL_ES
precision mediump float;
#endif
vec3 roty(vec3 p,float a)
{ return mat3(cos(phase1*a),0,-sin(phase2*a), 0,1,1, sin(phase2*a),0,cos(phase1*a)) * p; }
float map(in vec3 p)
{
vec3 c=p; float res=0.;
for (int i=0; i < 4; i++)
{
p= abs(p)/dot(p,p) -.7;
p.yz= vec2(p.y*p.y-p.z*p.z,2.*p.y*p.z);
res += exp(-(80.-width) * abs(dot(p,c)));
}
return res*0.5;
}
vec3 raymarch(vec3 ro, vec3 rd)
{
float t=morph;
vec3 col=vec3(0); float c=0.;
float n = floor(mult);
for( int i=0; i < 12; i++ )
{
t+= exp(c*-2.0) *density;
c= map(t *rd +ro);
col= vec3(8.*c*c, hue*hue*c*c, c*c*c) *0.16 + col *0.96; //green
col= vec3(8.*c*c, c*c, tint*tint*c*c) *0.16 + col *0.96; //blue
col= vec3(8.*c*c/hue, c*c, c*c*c/tint) *0.16 + col *0.96; //red
n -= 1.0;
if (n<1.0) { break;
}
}
return col;
}
void main()
{
vec2 p= (gl_FragCoord.xy - RENDERSIZE*0.5) / RENDERSIZE.y;
vec3 ro= roty(vec3(3.), TIME*rate + mouse.x);
vec3 uu= normalize(cross(ro, vec3(1.0, .0, 0.0)));
vec3 vv= normalize(cross(uu, ro));
vec3 rd= normalize(p.x*uu + p.y*vv - ro*0.5 );
gl_FragColor.rgb= log(raymarch(ro,rd) +1.0) *0.5;
gl_FragColor.a= 1.0;
}
+191
View File
@@ -0,0 +1,191 @@
/*{
"CREDIT": "by mojovideotech",
"DESCRIPTION": "",
"CATEGORIES": [
"generator",
"space"
],
"INPUTS": [
{
"NAME": "nebula",
"TYPE": "bool",
"DEFAULT": 0
},
{
"NAME": "brightness",
"TYPE": "float",
"DEFAULT": 0.25,
"MIN": 0,
"MAX": 0.5
},
{
"NAME": "zoom",
"TYPE": "float",
"DEFAULT": 2.5,
"MIN": 0.25,
"MAX": 20
},
{
"NAME": "saturation",
"TYPE": "float",
"DEFAULT": 0.5,
"MIN": 0,
"MAX": 1
},
{
"NAME": "distfading",
"TYPE": "float",
"DEFAULT": 0.25,
"MIN": 0,
"MAX": 0.5
},
{
"NAME": "depth",
"TYPE": "float",
"DEFAULT": 0.25,
"MIN": 0.1,
"MAX": 1
},
{
"NAME": "density",
"TYPE": "float",
"DEFAULT": 0.75,
"MIN": 0.5,
"MAX": 2
},
{
"NAME": "morph",
"TYPE": "float",
"DEFAULT": 0.89,
"MIN": 0.5,
"MAX": 1
},
{
"NAME": "rate",
"TYPE": "float",
"DEFAULT": 0.005,
"MIN": -0.1,
"MAX": 0.1
},
{
"NAME": "move",
"TYPE": "point2D",
"DEFAULT": [
0,
0
]
}
]
}*/
///////////////////////////////////////////
// SpaceIsThePlace by mojovideotech
//
// Creative Commons Attribution-NonCommercial-ShareAlike 3.0
//
// based on :
// shadertoy.com/\XlfGRj by Kali
///////////////////////////////////////////
#define iterations 7
#define volsteps 7
#define pi 3.141592653589793 // pi
float field(in vec3 p) {
float strength = 7. + .03 * log(1.e-6 + fract(sin(TIME) * 4373.11));
float accum = 0.;
float prev = 0.;
float tw = 0.;
for (int i = 0; i < 7; ++i) {
float mag = dot(p, p);
p = abs(p) / mag + vec3(-.5, -.4, -1.5);
float w = exp(-float(i) / 7.);
accum += w * exp(-strength * pow(abs(mag - prev), 2.3));
tw += w;
prev = mag;
}
return max(0., 5. * accum / tw - .7);
}
void main() {
vec2 uv=gl_FragCoord.xy/RENDERSIZE.xy-.5;
uv.y*=RENDERSIZE.y/RENDERSIZE.x;
vec3 p = vec3(uv / 4., 0) + vec3(1., -1.3, 0.);
p.x -= 0.25*move.x;
p.y -= 0.25*move.y;
p.x += 0.25*(1.0)*5.0*cos(0.01*TIME)+0.001*TIME;
p.y += 0.25*(1.0)*5.0*sin(0.01*TIME)+0.001*TIME;
p.z += 0.003*TIME;
float speed = rate * cos(TIME*0.02 + pi/4.0);
vec3 dir=vec3(uv*zoom,1.);
vec3 from=vec3(0.0, 0.0,0.0);
vec3 forward = vec3(0.,0.,1.);
float a1 = pi * (move.x/RENDERSIZE.x-.5);
mat2 rot1 = mat2(cos(a1),sin(a1),-sin(a1),cos(a1));
float a2 = pi * (move.y/RENDERSIZE.y-.5); .6;
mat2 rot2 = mat2(cos(a2),sin(a2),-sin(a2),cos(a2));
p.xz *= rot1;
p.xy *= rot1;
p.yz *= -rot2;
p = abs(vec3(density)-mod(p,vec3(density*2.)));
float t = field(p);
float v2 = (1. - exp((abs(uv.x) - 1.) * 6.)) * (1. - exp((abs(uv.y) - 1.) * 6.));
from.x += 5.0*(0.01*rate) + 0.001*TIME;
from.y += 5.0*(0.01*rate) +0.001*TIME;
from.z += 0.003*TIME;
dir.xz*=rot1;
forward.xz *= rot1;
dir.xy*=rot1;
forward.xy *= rot1;
dir.yz*=-rot2;
forward.yz *= -rot2;
from.xz*=rot1;
from.xy*=rot1;
from.yz*=-rot2;
from += (move.x-.5)*vec3(-forward.z,0.,forward.x);
from += (move.y-.5)*vec3(0.,-forward.z, forward.y);
float zooom = (TIME-3311.)*speed;
from += forward* zooom;
float sampleShift = mod( zooom, depth );
float zoffset = -sampleShift;
sampleShift /= depth;
float s=0.1;
vec3 v=vec3(0.);
for (int r=0; r<volsteps; r++) {
vec3 p=from+(s+zoffset)*dir;
p = abs(vec3(density)-mod(p,vec3(density*2.)));
float pa,a=pa=0.;
for (int i=0; i<iterations; i++) {
p=abs(p)/dot(p,p)-morph;
float D = abs(length(p)-pa);
a += i > 7 ? min( 12., D) : D;
pa=length(p);
}
a*=a*a;
float s1 = s+zoffset;
float fade = pow(distfading,max(0.,float(r)-sampleShift));
float dm=max(0.,2.0-a*a*.001);
if (r>3) fade*=1.-dm;
if ( r == 0 ) fade *= 1. - sampleShift;
if ( r == volsteps-1 ) fade *= sampleShift;
v+=vec3(s1,s1*s1,s1*s1*s1*s1)*a*brightness*fade;
s+=depth;
}
v=mix(vec3(length(v)),v,saturation);
if (nebula) {
vec4 forCol = vec4(v*.01,1.);
vec4 backCol = mix(.4, 1., v2) * vec4(1.8 * t * t * t, 1.4 * t * t, t, 1.0);
backCol *= 0.2;
backCol.b *= 1.0;
backCol.r = mix(backCol.r, backCol.b, 0.2);
forCol.g *= max((backCol.r * 4.0), 1.0);
forCol.r += backCol.r * 0.05;
forCol.b += 0.5*mix(backCol.g, backCol.b, 0.8);
gl_FragColor = forCol;
}
else
{
vec4 col = vec4(vec3(v*.01),1.);
gl_FragColor = col;
}
}
+143
View File
@@ -0,0 +1,143 @@
/*{
"CATEGORIES": [
"generator",
"sphere"
],
"CREDIT": "by mojovideotech",
"DESCRIPTION": "",
"INPUTS": [
{
"DEFAULT": [
0.5,
0.3
],
"MAX": [
0.99,
0.99
],
"MIN": [
0.01,
0.01
],
"NAME": "O",
"TYPE": "point2D"
},
{
"DEFAULT": [
0.1,
0.5
],
"MAX": [
1,
1
],
"MIN": [
0,
0
],
"NAME": "C",
"TYPE": "point2D"
},
{
"DEFAULT": 9,
"MAX": 36,
"MIN": 0,
"NAME": "R1",
"TYPE": "float"
},
{
"DEFAULT": 17,
"MAX": 54,
"MIN": 0,
"NAME": "R2",
"TYPE": "float"
},
{
"DEFAULT": 2.0,
"MAX": 5.0,
"MIN": 1.1,
"NAME": "zoom",
"TYPE": "float"
},
{
"DEFAULT": 1.5,
"MAX": 3,
"MIN": -3,
"NAME": "rate",
"TYPE": "float"
},
{
"DEFAULT": 64,
"MAX": 72,
"MIN": 24,
"NAME": "depth",
"TYPE": "float"
},
{
"DEFAULT": 0.55,
"MAX": 1.25,
"MIN": 0.25,
"NAME": "gamma",
"TYPE": "float"
}
],
"ISFVSN": "2",
"VSN": "2"
}
*/
////////////////////////////////////////////////////////////////////
// SpaceSpore by mojovideotech
// v2.0 5/2020 ; optimized code, added uniforms
//
// based on :
// shadertoy.com/lslcWj by LukeRissacher
//
// License Creative Commons Attribution-NonCommercial-ShareAlike 3.0
////////////////////////////////////////////////////////////////////
#define twpi 6.283185307179586
#define R(p, a) p = p * cos(a) + vec2(-p.y, p.x) * sin(a)
float Swave(float w) { return 0.5 + 0.5 * sin(twpi * w); }
float Sdef(vec3 p) { return 1.0 - abs(sin(p.x) + sin(p.y) + sin(p.z)) * 0.333; }
float Smap(vec3 p, float s) {
float dSphere = length(p) - 1.0;
return max(dSphere, (0.95 - Sdef(s * p)) / s);
}
vec3 Scol(vec3 p) {
float a = clamp((2.0 - length(p)) * 0.5, 0.0, 1.0);
vec3 c = 0.5 + 0.5 * cos(twpi * cross(vec3(1.0, C.x, C.y), vec3(Swave(-a) * vec3(0.5, 1.0, 1.0))));
return c * a;
}
vec3 rgb(vec3 c) { return c*c*c*(c*(c*6.0-15.0)+10.0); }
void main() {
float TT = TIME * rate;
vec3 rd = normalize(vec3(2.0 * gl_FragCoord.xy - RENDERSIZE.xy, -min(RENDERSIZE.x,RENDERSIZE.y)));
vec3 ro = vec3(0.0, 0.0, zoom);
R(rd.xz, O.x * -TT);
R(ro.xz, O.x * -TT);
R(rd.yz, O.y * TT);
R(ro.yz, O.y * TT);
float t = 0.0;
vec3 col = vec3(0.0);
float S = mix(R1, R2, Swave(0.05 * TT));
for (int i = 0; i < 90; i++) {
if (float(i) >= floor(depth)) { break; }
vec3 p = ro + t * rd;
float d = Smap(p, S);
if (t > 5.0 || d < 0.001) {
break;
}
t += 0.8 * d;
col += 0.05 * Scol(p);
}
gl_FragColor = vec4(pow(rgb(col),vec3(gamma)),1.0);
}
@@ -0,0 +1,113 @@
/*{
"CREDIT": "by mojovideotech",
"CATEGORIES": [
"2d",
"generator",
"spirograph",
"radial",
"rotation"
],
"DESCRIPTION": "based on https://www.shadertoy.com/view/lddGD4 by Xor. Here's a simple 2D Spirograph test.",
"INPUTS": [
{
"NAME": "center",
"TYPE": "point2D",
"DEFAULT": [
0,
0
],
"MAX": [
1,
1
],
"MIN": [
-1,
-1
]
},
{
"NAME": "freq",
"TYPE": "float",
"DEFAULT": 12.32,
"MIN": 1,
"MAX": 16
},
{
"NAME": "radius1",
"TYPE": "float",
"DEFAULT": 0.1,
"MIN": 0.01,
"MAX": 0.5
},
{
"NAME": "radius2",
"TYPE": "float",
"DEFAULT": 0.67,
"MIN": 0.01,
"MAX": 1.99
},
{
"NAME": "rate",
"TYPE": "float",
"DEFAULT": 0.01,
"MIN": -0.1,
"MAX": 0.1
},
{
"NAME": "loops",
"TYPE": "float",
"DEFAULT": 58.93,
"MIN": 1,
"MAX": 200
},
{
"NAME": "thickness",
"TYPE": "float",
"DEFAULT": 0.005,
"MIN": 0.001,
"MAX": 0.01
},
{
"NAME": "nudge",
"TYPE": "float",
"DEFAULT": 0.875,
"MIN": 0,
"MAX": 1
}
],
"ISFVSN": "2"
}*/
//////////////////////////////////////////////
// SpirographSpectrum by mojovideotech
//
// based on :
// www.shadertoy.com/\view/\lddGD4
//
// Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.
/////////////////////////////////////////////
#define twpi 6.283185307179586 // two pi, 2*pi
#define pi 3.141592653589793 // pi
void main() {
vec2 uv = (gl_FragCoord.xy-RENDERSIZE.xy*0.5) / RENDERSIZE.y - center ;
float ang = (atan(-uv.y,-uv.x)/atan(1.0)*0.125+0.5)+TIME*rate;
float len = length(uv);
vec3 col = vec3(0.0);
for(float i = 0.0;i<200.;i+=1.0)
{
float L = floor(loops);
float F = ceil(freq);
if (i >= L) break;
float tag = (ang+i)*twpi;
float tln = (cos((ang+i*(1.0-nudge))*F)*0.5+0.5)*(radius2-radius1)+radius1;
vec2 pos = normalize(uv)*tln;
col += smoothstep(thickness,0.0,distance(uv,pos)*pow(length(uv),0.001))*(cos(tag+vec3(0.0,twpi,2.0*twpi)/3.0)*0.5+0.5);
}
gl_FragColor = vec4(col,1.0);
}

Before

Width:  |  Height:  |  Size: 76 KiB

After

Width:  |  Height:  |  Size: 76 KiB

+80
View File
@@ -0,0 +1,80 @@
/*{
"DESCRIPTION": "Your shader description",
"CREDIT": "by you",
"CATEGORIES": [
"Your category"
],
"INPUTS": [
{
"NAME": "BASE_ANGLE",
"TYPE": "float",
"DEFAULT": 3.5,
"MIN": -10.0,
"MAX": 10.0
},
{
"NAME": "ANGLE_DELTA",
"TYPE": "float",
"DEFAULT": 0.0,
"MIN": -3.1416,
"MAX": 3.1416
},
{
"NAME": "XOFF",
"TYPE": "float",
"DEFAULT": 0.7,
"MIN": -1.0,
"MAX": 1.0
}
]
}*/
vec3 iResolution = vec3(RENDERSIZE, 1.);
float iGlobalTime = TIME;
//String Theory by nimitz (twitter: @stormoid)
// #define BASE_ANGLE 3.5
// #define ANGLE_DELTA 0.02
// #define XOFF .7
#define time iGlobalTime
mat2 mm2(in float a){float c = cos(a), s = sin(a);return mat2(c,-s,s,c);}
float aspect = iResolution.x/iResolution.y;
float featureSize = 60./((iResolution.x*aspect+iResolution.y));
float f(vec2 p)
{
p.x = sin(p.x*1.+time*1.2)*sin(time+p.x*0.1)*3.;
p += sin(p.x*1.5)*.1;
return smoothstep(-0.0,featureSize,abs(p.y));
}
void mainImage( out vec4 fragColor, in vec2 fragCoord )
{
vec2 p = fragCoord.xy / iResolution.xy*6.5-3.25;
p.x *= aspect;
p.y = abs(p.y);
vec3 col = vec3(0);
for(float i=0.;i<26.;i++)
{
vec3 col2 = (sin(vec3(3.3,2.5,2.2)+i*0.15)*0.5+0.54)*(1.-f(p));
col = max(col,col2);
p.x -= XOFF;
p.y -= sin(time*0.11+1.5)*1.5+1.5;
p*= mm2(i*ANGLE_DELTA+BASE_ANGLE);
vec2 pa = vec2(abs(p.x-.9),abs(p.y));
vec2 pb = vec2(p.x,abs(p.y));
p = mix(pa,pb,smoothstep(-.07,.07,sin(time*0.24)+.1));
}
fragColor = vec4(col,1.0);
}
void main(void) {
mainImage(gl_FragColor, gl_FragCoord.xy);
}
@@ -0,0 +1,102 @@
/*{
"CREDIT": "by echophons",
"DESCRIPTION": "",
"CATEGORIES": [ "generator"
],
"INPUTS": [
{
"NAME": "k",
"TYPE": "float",
"DEFAULT": 0.3,
"MIN": 0.001,
"MAX": 0.999
},
{
"NAME": "h",
"TYPE": "float",
"DEFAULT": 0.5,
"MIN": 0.0,
"MAX": 1.0
},
{
"NAME": "j",
"TYPE": "float",
"DEFAULT": 0.5,
"MIN": 0.0,
"MAX": 1.0
},
{
"NAME": "c",
"TYPE": "float",
"DEFAULT": 0.632,
"MIN": 0.001,
"MAX":0.999
},
{
"NAME": "s",
"TYPE": "float",
"DEFAULT": 0.131,
"MIN": 0.001,
"MAX":0.999
},
{
"NAME": "e",
"TYPE": "float",
"DEFAULT": 0.3,
"MIN": 0.001,
"MAX":0.999
},
{
"NAME": "u",
"TYPE": "float",
"DEFAULT": 0.17,
"MIN": 0.001,
"MAX":0.999
},
{
"NAME": "m",
"TYPE": "float",
"DEFAULT": 0.3,
"MIN": 0.001,
"MAX": 0.999
}
]
}*/
// edit of http://glslsandbox.com/e#18752.0
// additional iputs added by Doctor Mojo
uniform vec2 mouse;
vec3 iResolution = vec3(RENDERSIZE, 1.0);
float iGlobalTime = TIME;
float gTime = iGlobalTime*0.5;
void main( void )
{
float f = 1.0;
float g = 1.0;
vec2 res = iResolution.xy;
vec2 mou = mouse.xy;
//if (mouse.x < 0.5)
//{
mou.x = sin(gTime * e)*sin(gTime * u) * 1. + sin(gTime * m);
mou.y = (1.0-cos(gTime * c))*sin(gTime * s)*1.0+cos(gTime * k);
mou = (mou+1.0) * res;
//}
vec2 z = ((-res+2.0 * gl_FragCoord.xy) / res.y);
vec2 p = ((-res+2.0+mou) / res.y) * j;
for( int i = 0; i < 24; i++)
{
float d = dot(z,z);
z = (vec2( z.x, -z.y ) / d) + p * h;
z.x = 1.0-abs(z.x);
f = max( f-d, (dot(z-p,z-p) ));
g = min( g*d, sin(dot(z+p,z+p))+1.0);
}
f = abs(-log(f) / 3.5);
g = abs(-log(g) / 8.0);
gl_FragColor = vec4(min(vec3(g, g*f, f), 1.0),1.0);
}
@@ -0,0 +1,187 @@
// SaturdayShader Week 31 : WaveShapes
// by Joseph Fiola (http://www.joefiola.com)
// 2016-03-26
//modified by Sprohgis
// Based on shader by Shadertoy user smb02dunnal entitiled "Electro-Prim's" - https://www.shadertoy.com/view/Mll3WS
// https://twitter.com/AlexWDunn
// Sadly it's not working with VDMX. Gan somone please make it work.
/*{
"CREDIT": "Joseph Fiola",
"DESCRIPTION": "",
"CATEGORIES": [
"Generator"
],
"INPUTS": [
{
"NAME": "shape",
"TYPE": "long",
"VALUES": [
0,
1
],
"LABELS": [
"triangle",
"square"
],
"DEFAULT": 0
},
{
"NAME": "triside1",
"TYPE": "float",
"DEFAULT": 3,
"MIN": 0,
"MAX": 3
},
{
"NAME": "squareside1",
"TYPE": "float",
"DEFAULT": 1,
"MIN": 0,
"MAX": 10
},
{
"NAME": "zoom",
"TYPE": "float",
"DEFAULT": 1,
"MIN": 0,
"MAX": 10
},
{
"NAME": "rotate",
"TYPE": "float",
"DEFAULT": 0,
"MIN": 0,
"MAX": 1
},
{
"NAME": "twist",
"TYPE": "float",
"DEFAULT": 0.02,
"MIN": 0,
"MAX": 1
},
{
"NAME": "tunnel",
"TYPE": "float",
"DEFAULT": 1.1,
"MIN": 0.25,
"MAX": 1.75
},
{
"NAME": "thickness",
"TYPE": "float",
"DEFAULT": 0.003,
"MIN": 0,
"MAX": 0.2
},
{
"NAME": "amplitude",
"TYPE": "float",
"DEFAULT": 0,
"MIN": 0,
"MAX": 100
},
{
"NAME": "frequency",
"TYPE": "float",
"DEFAULT": 0,
"MIN": 0,
"MAX": 50
},
{
"NAME": "band",
"TYPE": "float",
"DEFAULT": 0,
"MIN": -0.5,
"MAX": 1
},
{
"NAME": "pos",
"TYPE": "point2D",
"DEFAULT": [
0.5,
0.5
],
"MIN": [
0,
0
],
"MAX": [
1,
1
]
}
]
}*/
// line commented out enabling compile in xLights by Old Salt
// precision mediump float;
#define PI 3.14159265359
#define TWO_PI 6.28318530718
float electro(vec2 uv, float d, float f, float o, float a, float b)
{
float theta = atan(uv.y,uv.x);
float amp = smoothstep(0.0, 1.0, (sin(theta + TIME * PI)*0.5+0.5)-b)*a;
float phase = d + sin(theta * f + o + TIME * PI) * amp;
return sin(clamp(phase, 0.0, PI*2.0) + PI/2.0) + 1.0005;
}
mat2 rotate2d(float _angle){
return mat2(cos(_angle),-sin(_angle),
sin(_angle),cos(_angle));
}
void main()
{
const float radius = 0.1;
vec2 uv = gl_FragCoord.xy / RENDERSIZE.xy;
uv -= vec2(pos);
uv.x *= RENDERSIZE.x/RENDERSIZE.y;
uv = rotate2d(rotate*-TWO_PI) * uv;
uv *= zoom;
float grey = 0.0;
float alpha = 1.0;
for(int i = 0; i < 20; i++) {
float d = 0.0;
//triangle
if (shape == 0){
float root2 = sqrt(triside1);
d = dot(uv, vec2(0.0,-2.0));
d = max(d, dot(uv, vec2(-root2,1.0)));
d = max(d, dot(uv, vec2( root2,1.0)));
}
//square
if (shape == 1){
d = max(abs(uv).x*squareside1, abs(uv).y);
}
grey += 1.0 - smoothstep(0.0, thickness, electro(uv, d/radius, frequency, 0.0 * PI, amplitude, band));
grey += 1.0 - smoothstep(0.0, thickness, electro(uv, d/radius, frequency, 0.5 * PI, amplitude, band));
grey += 1.0 - smoothstep(0.0, thickness, electro(uv, d/radius, frequency, 1.0 * PI, amplitude, band));
//tunnel
uv *= tunnel;
//twist
uv = rotate2d(twist*-TWO_PI) * uv;
}
gl_FragColor = vec4(vec3(grey),1.0);
}
+142
View File
@@ -0,0 +1,142 @@
/*
{
"CATEGORIES" : [
"Generator"
],
"DESCRIPTION" : "Twin Rays",
"ISFVSN" : "2",
"INPUTS" : [
{
"NAME" : "rate",
"TYPE" : "float",
"MAX" : 0.059999999999999998,
"DEFAULT" : -0.016063844785094261,
"LABEL" : "SPEED",
"MIN" : -0.059999999999999998
},
{
"NAME" : "colorIN",
"TYPE" : "color",
"DEFAULT" : [
1,
0.20000000298023224,
0.10000000149011612,
1
],
"LABEL" : "Color"
},
{
"NAME" : "Count",
"TYPE" : "float",
"MAX" : 25,
"DEFAULT" : 18.131168365478516,
"LABEL" : "Ray Count",
"MIN" : 3
},
{
"NAME" : "posY",
"TYPE" : "float",
"MAX" : 0.5,
"DEFAULT" : -0.33067807555198669,
"LABEL" : "Position Y",
"MIN" : -0.5
},
{
"NAME" : "posX",
"TYPE" : "float",
"MAX" : 0.5,
"DEFAULT" : 0.1662137508392334,
"LABEL" : "Position X",
"MIN" : 0
},
{
"NAME" : "width",
"TYPE" : "float",
"MAX" : 0.45,
"DEFAULT" : 0.2891484797000885,
"LABEL" : "Ray Width",
"MIN" : 0.01
},
{
"NAME" : "soft",
"TYPE" : "float",
"MAX" : 0.99,
"DEFAULT" : 0.2891484797000885,
"LABEL" : "Ray Softness",
"MIN" : 0.01
}
],
"CREDIT" : "howie.tv"
}
*/
// its a howie.tv thing
// _read the time buffer
#define M_PI 3.1415926535897932384626433832795
// rgb2hsv
vec3 rgb2hsv(vec3 c)
{
vec4 K = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0);
vec4 p = mix(vec4(c.bg, K.wz), vec4(c.gb, K.xy), step(c.b, c.g));
vec4 q = mix(vec4(p.xyw, c.r), vec4(c.r, p.yzx), step(p.x, c.r));
float d = q.x - min(q.w, q.y);
float e = 1.0e-10;
return vec3(abs(q.z + (q.w - q.y) / (6.0 * d + e)), d / (q.x + e), q.x);
}
// hsv2rgb
vec3 hsv2rgb(vec3 c)
{
vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);
vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);
return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);
}
float rays(vec2 uv, float c, float w, float s)
{
uv.x = fract(uv.x*c)-0.5;
return smoothstep(-w , -w*s, uv.x) * smoothstep(w, w*s, uv.x);
}
void main() {
float ratio = RENDERSIZE.y/RENDERSIZE.x;
vec2 uv = vec2( isf_FragNormCoord.x -0.5, (isf_FragNormCoord.y -0.5) * ratio);
vec3 color;
vec3 col;
vec2 UV;
float m;
float angle;
float radius;
float count = floor(Count);
uv.y -= posY;
vec3 hvs = rgb2hsv(colorIN.rgb);
vec3 colorA = hsv2rgb(vec3(hvs.x +0.1, hvs.y, hvs.z));
vec3 colorB = hsv2rgb(vec3(hvs.x -0.1, hvs.y, hvs.z));
for(int i = 0; i< 2; i++)
{
UV = uv;
UV.x -= posX*(1.0-(float(i)*2.0));
UV.x *= 1.0-(float(i)*2.0);
angle = atan(UV.y, UV.x);
angle = angle/((M_PI*4.0)*0.5) + TIME*rate ;
radius = length(UV);
UV = vec2(angle, radius*1.5);
col = mix(colorA,colorB, abs(UV.y)/ratio);
m = rays(UV,count,width,soft);
m = pow(m,3.0);
color += col*m;
}
gl_FragColor = vec4(color,1.0);
}
+298
View File
@@ -0,0 +1,298 @@
/*
{
"CREDIT": "by mojovideotech",
"DESCRIPTION": "",
"CATEGORIES": [
"generator",
"flame",
"fire",
"3d noise"
],
"INPUTS": [
{
"NAME" : "center",
"TYPE" : "point2D",
"DEFAULT" : [ 0.0, 0.0 ],
"MAX" : [ 1.0, 1.0 ],
"MIN" : [ -1.0, -1.0 ]
},
{
"NAME" : "scale",
"TYPE" : "float",
"DEFAULT" : 0.5,
"MIN" : 0.01,
"MAX" : 2.0
},
{
"NAME" : "rate",
"TYPE" : "float",
"DEFAULT" : 1.75,
"MIN" : 0.0,
"MAX" : 3.0
},
{
"NAME" : "seed1",
"TYPE" : "float",
"DEFAULT" : 111,
"MIN" : 55,
"MAX" : 233
},
{
"NAME" : "seed2",
"TYPE" : "float",
"DEFAULT" : 277,
"MIN" : 98,
"MAX" : 337
},
{
"NAME" : "seed3",
"TYPE" : "float",
"DEFAULT" : 497,
"MIN" : 301,
"MAX" : 579
},
{
"NAME" : "freq",
"TYPE" : "float",
"DEFAULT" : 1.5,
"MIN" : 0.1,
"MAX" : 3.0
},
{
"NAME" : "flicker",
"TYPE" : "float",
"DEFAULT" : 5.0,
"MIN" : 0.0,
"MAX" : 50.0
},
{
"NAME" : "intensity",
"TYPE" : "float",
"DEFAULT" : 0.15,
"MIN" : -0.33,
"MAX" : 2.0
},
{
"NAME" : "light",
"TYPE" : "float",
"DEFAULT" : 0.45,
"MIN" : 0.0,
"MAX" : 0.5
},
{
"NAME" : "contours",
"TYPE": "float",
"DEFAULT" : 1.05,
"MIN" : 0.0,
"MAX" : 2.0
},
{
"NAME" : "bottomedges",
"TYPE" : "float",
"DEFAULT" : 0.05,
"MIN" : 0.0,
"MAX" : 0.667
},
{
"NAME" : "topedges",
"TYPE" : "float",
"DEFAULT" : 0.45,
"MIN" : 0.125,
"MAX" : 1.0
},
{
"NAME" : "depth",
"TYPE" : "float",
"DEFAULT" : 100.0,
"MIN" : 5.0,
"MAX" : 250.0
},
{
"NAME" : "expand",
"TYPE": "float",
"DEFAULT" : 0.8,
"MIN" : 0.1,
"MAX" : 5.0
},
{
"NAME" : "cutoff",
"TYPE": "float",
"DEFAULT" : 8.0,
"MIN" : 6.0,
"MAX" : 10.0
},
{
"NAME" : "wave",
"TYPE": "float",
"DEFAULT" : 0.15,
"MIN" : 0.1,
"MAX" : 2.0
},
{
"NAME" : "fractnoise",
"TYPE": "float",
"DEFAULT" : 0.33,
"MIN" : 0.0,
"MAX" : 1.0
},
{
"NAME" : "multiplier",
"TYPE": "float",
"DEFAULT" : 2.0,
"MIN" : 1.0,
"MAX" : 4.9
},
{
"NAME": "style",
"TYPE": "long",
"VALUES": [
0,
1,
2
],
"LABELS": [
"EightBit",
"PhotoReal",
"OpArt"
],
"DEFAULT": 1
}
]
}
*/
////////////////////////////////////////////////////////////
// UltimateFlame by mojovideotech
//
// based on :
// The Blue Flame by Hadyn Lander
// shadertoy.com/\lsjcRt
//
// 3D noise from Nikita Miropolskiy
// shadertoy.com/\XsX3zB
//
// License:
// Creative Commons Attribution-NonCommercial-ShareAlike 3.0
////////////////////////////////////////////////////////////
#define pi 3.141592653589793 // pi
vec3 random3(vec3 c) {
float j = 4231.0*sin(dot(c,vec3(seed1, seed2, seed3)));
vec3 k;
k.z = fract(seed1*j);
j *= .5;
k.x = fract(seed2*j);
j *= .25;
k.y = fract(seed3*j);
return k-0.5;
}
const float F3 = 0.3333333;
const float G3 = 0.1666667;
float simplex3d(vec3 p) {
vec3 s = floor(p + dot(p, vec3(F3)));
vec3 x = p - s + dot(s, vec3(G3));
vec3 e = step(vec3(0.0), x - x.yzx);
vec3 i1 = e*(1.0 - e.zxy);
vec3 i2 = 1.0 - e.zxy*(1.0 - e);
vec3 x1 = x - i1 + G3;
vec3 x2 = x - i2 + 2.0*G3;
vec3 x3 = x - 1.0 + 3.0*G3;
vec4 w, d;
w.x = dot(x, x);
w.y = dot(x1, x1);
w.z = dot(x2, x2);
w.w = dot(x3, x3);
w = max(0.6 - w, 0.0);
d.x = dot(random3(s), x);
d.y = dot(random3(s + i1), x1);
d.z = dot(random3(s + i2), x2);
d.w = dot(random3(s + 1.0), x3);
w *= w;
w *= w;
d *= w;
return dot(d, vec4(depth));
}
const mat3 rot1 = mat3(-0.37, 0.36, 0.85,-0.14,-0.93, 0.34,0.92, 0.01,0.4);
const mat3 rot2 = mat3(-0.55,-0.39, 0.74, 0.33,-0.91,-0.24,0.77, 0.12,0.63);
const mat3 rot3 = mat3(-0.71, 0.52,-0.47,-0.08,-0.72,-0.68,-0.7,-0.45,0.56);
float simplex3d_fractal(vec3 n) {
return 0.5333333*simplex3d(n*rot1)
+0.2666667*simplex3d(2.0*n*rot2)
+0.1333333*simplex3d(4.0*n*rot3)
+0.0666667*simplex3d(8.0*n);
}
void main()
{
vec3 finalColor, bgColor, hColor, fColor;
float noise, value, edge, m, v, r, h, o;
float TT = 28.22 + TIME * rate;
float nf = 1.0/freq;
vec2 pos = gl_FragCoord.xy / RENDERSIZE.y;
vec2 wf = vec2(0.0);
float aspect = RENDERSIZE.x/RENDERSIZE.y;
vec2 poc = pos-vec2(0.5*aspect, 0.5) - center;
poc/=scale;
poc.x /= expand;
float pob = 0.5*(poc.y+1.0);
wf.x += pob*sin(4.0*poc.y-4.0*TT);
wf.y += 0.1*pob*sin(4.0*poc.x-1.561*TT);
poc += wave*wf;
poc.x += poc.x / (1.0-(poc.y));
m = 1.0-pow(1.0-clamp(1.0-length(poc), 0.0, 1.0), 10.1-cutoff);
vec3 p3 = nf*0.25*vec3(pos.x, pos.y, 0.0) + vec3(0.0, -TT*0.1, TT*0.025);
noise = mix(simplex3d(p3*16.0*floor(multiplier)),simplex3d_fractal(p3*8.0*floor(multiplier)),fractnoise);
noise = 0.5 + 0.5*noise;
value = (m*noise)+intensity*m;
if(style == 0)
{
edge = mix(bottomedges, topedges, pow(0.5*(poc.y+1.0), 1.2) );
v = smoothstep(edge,edge+0.01, value);
v = mix(0.5*v, 1.0, smoothstep(1.5*edge,1.5*edge+0.01, value));
v = mix(0.5*v, 1.0, smoothstep(3.0*edge,3.0*edge+0.01, value));
bgColor = vec3(0.1,0.0,0.2);
finalColor = mix(bgColor, vec3(1.1,0.5,0.0), v);
}
else if(style == 1)
{
edge = mix(bottomedges, topedges, pow(0.5*(poc.y+1.0), 1.2) );
v = smoothstep(edge,edge+0.1, value);
h = light+.5-clamp(value-edge, 0.0 , 1.0);
p3 = nf*0.1*vec3(pos.x, pos.y, 0.0) + vec3(0.0, -TT*0.01, TT*0.025);
noise = simplex3d(p3*32.0);
noise = 0.5 + 0.5*noise;
r = mix(h, noise, 0.65);
r = 0.5*sin(6.0*pi*(1.0-pow(1.0-r,1.8)) - 0.5*pi)+0.5;
o = smoothstep(0.95, 1.0, pow(r, 8.0));
o = mix(o, 0.0, (2.1-contours)-noise);
h = max(o, h);
h = pow(h, 2.0);
hColor = mix(vec3(1.0,0.4,0.0), vec3(2.0,0.6,0.0), pos.y);
hColor += vec3(0.9,0.4,0.0) * pow(sin(TIME*flicker), 4.0);
fColor = mix(vec3(0.2,0.2,0.2), vec3(1.0,0.05,0.05), pos.y);
finalColor = hColor*(v*h);
finalColor += fColor*v;
bgColor = mix(vec3(0.07,0.0,0.15), vec3(0.075,0.025,0.15), 1.0);
finalColor += bgColor;
}
else
{
edge = mix(bottomedges, topedges, pow(0.5*(poc.y+1.0), 1.2) );
v = smoothstep(edge,edge+0.01, value);
r = 0.5*sin(1.0*pi*(value/edge) + 0.5*pi)+0.5;
v = 1.0-smoothstep(0.5,0.6, 1.0-r);
finalColor = vec3(1.0,1.0,1.0)*v;
}
gl_FragColor = vec4(finalColor,1.0);
}
@@ -0,0 +1,144 @@
/*{
"CREDIT": "by mojovideotech",
"CATEGORIES": [
"generator",
"circuits",
"2d",
"fractal",
"Kaliset"
],
"ISFVSN" : "2",
"DESCRIPTION": "",
"INPUTS": [
{
"NAME" : "center",
"TYPE" : "point2D",
"DEFAULT" : [ 0.0, 0.0 ],
"MAX" : [ 3.0, 3.0 ],
"MIN" : [ -3.0, -3.0 ]
},
{
"NAME" : "zoom",
"TYPE" : "float",
"DEFAULT" : 1.5,
"MIN" : 0.5,
"MAX" : 3.0
},
{
"NAME" : "offset",
"TYPE" : "float",
"DEFAULT" : 0.05,
"MIN" : 0.01,
"MAX" : 0.1
},
{
"NAME" : "glow",
"TYPE" : "float",
"DEFAULT" : 3.0,
"MIN" : 0.0,
"MAX" : 9.0
},
{
"NAME" : "intensity",
"TYPE" : "float",
"DEFAULT" : 0.00125,
"MIN" : 0.0005,
"MAX" : 0.0025
},
{
"NAME" : "trace",
"TYPE" : "float",
"DEFAULT" : 40.0,
"MIN" : 10.0,
"MAX" : 100.0
},
{
"NAME" : "runtime",
"TYPE" : "float",
"DEFAULT" : 24.0,
"MIN" : 6.0,
"MAX" : 60.0
},
{
"NAME" : "rate",
"TYPE" : "float",
"DEFAULT" : 0.5,
"MIN" : -2.0,
"MAX" : 2.0
}
]
}
*/
////////////////////////////////////////////////////////////
// UltimateKaliCircuits by mojovideotech
//
// based on :
// shadertoy/XlX3Rj by Kali
//
// Creative Commons Attribution-NonCommercial-ShareAlike 3.0
////////////////////////////////////////////////////////////
#define pisq 9.869604401089359 // pi squared, pi^2
#define twpi 6.283185307179586 // two pi, 2*pi
#define phicu 4.236067977499791 // phi cubed, phi^3
#define cuphi 1.173984996705329 // cube root of phi
#define rctwpi 0.159154943091895 // reciprocal of twpi, 1/twpi
#define r36 0.027777777777778
vec3 color = vec3(0.0,0.5,0.0);
float S = glow;
float T = rate*TIME*0.005;
vec2 hash22(vec2 p) { return fract(vec2(21.0, 97.0)*sin(dot(p, vec2(92.0, 61.0)))); }
void formula(vec2 z, float f)
{
float m = 0.0;
float o, ot2, ot=ot2=10000.0;
for (int i=0; i<9; i++) {
z = abs(z)/clamp(dot(z,z), 0.1, 0.5)-f;
float l = length(z);
o = min(max(abs(min(z.x, z.y)),-l+0.25), abs(l-0.25));
ot = min(ot, o);
ot2 = min(l*0.1, ot2);
m = max(m, float(i)*(1.0-abs(sign(ot-o))));
}
m += 1.0;
float w = intensity*m*2.0;
float circ = pow(max(0.0,w-ot2)/w,6.0);
S += max(pow(max(0.0,w-ot)/w,0.25),circ);
vec3 col = vec3(hash22(z),f);
color += col*(0.4+mod(m/9.0-T*trace+ot2*2.0, 1.0)*1.6);
color += vec3(1.0, 0.7, 0.3)*circ*(10.0-m)*3.0
*smoothstep(0.0, 0.5, vec3(f, isf_FragNormCoord));
}
void main()
{
vec2 pos = 2.0 * gl_FragCoord.xy - RENDERSIZE.xy;
pos /= max(RENDERSIZE.x,RENDERSIZE.y);
vec2 uv = pos-center;
uv *= 4.0-zoom;
float a = T + mod(T, floor(runtime))*cuphi;
float b = a*phicu;
uv *= mat2(cos(b),sin(b),-sin(b),cos(b));
uv += vec2(sin(a),cos(a*cuphi))*pisq;
uv *= offset;
float pix = cuphi/RENDERSIZE.x*offset;
float c = 1.5+mod(floor(T), 16.0)*0.125;
for (int aa=0; aa<36; aa++) {
vec2 aauv = floor(vec2(float(aa)*rctwpi, mod(float(aa), twpi)));
formula(uv+aauv*pix, c);
}
S *= r36, color *= r36;
vec3 colo = mix(vec3(0.025), color, S)*(1.5-length(pos));
colo *= vec3(1.2, 1.1, 1.0);
gl_FragColor = vec4(colo, 1.0);
}
+100
View File
@@ -0,0 +1,100 @@
/*{
"CREDIT": "by crackhouse",
"DESCRIPTION": "",
"CATEGORIES": [
"generator"
],
"INPUTS": [
{
"NAME": "R",
"TYPE": "float",
"DEFAULT": 1,
"MIN": 0.1,
"MAX":9
},
{
"NAME": "grid",
"TYPE": "float",
"DEFAULT": 5,
"MIN": 0.1,
"MAX": 1
}
]
}*/
vec3 iResolution = vec3(RENDERSIZE, 1.);
float iTime = TIME;
// Anaglyph Structure
// Framed for https://fanzine.cookie.paris/
// Licensed under hippie love conspiracy
// Leon Denise (ponk) 2019.10.24
// Using code from Inigo Quilez
mat2 rot (float a) { float c=cos(a),s=sin(a); return mat2(c,-s,s,c); }
float random (in vec2 st) { return fract(sin(dot(st.xy,vec2(12.9898,78.233)))*43758.5453123); }
vec3 look (vec3 eye, vec3 target, vec2 anchor) {
vec3 forward = normalize(target-eye);
vec3 right = normalize(cross(forward, vec3(0,1,0.)));
vec3 up = normalize(cross(right, forward));
return normalize(forward * .5 + right * anchor.x + up * anchor.y);
}
float map (vec3 pos) {
float scene = 10.0;
float r = R;
const float count = 8.0;
for (float index = count; index > 0.0; --index)
{
pos.xz = abs(pos.xz)-1.5*r;
pos.xz *= rot(0.4/r + iTime * 0.1)-sin(grid*0.03);
pos.yz *= rot(1.5/r + iTime * 0.05)-sin(grid*0.03);
pos.yx *= rot(.2/r + iTime * 0.05)+sin(grid*0.03);
scene = min(scene, length(pos.xy)-0.001);
scene = min(scene, length(pos)-.3*r)*cos(.2-grid*0.05);
r /= 1.8;
}
return scene;
}
vec4 raymarch (vec3 eye, vec3 ray) {
float dither = random(ray.xy+fract(iTime));
vec4 result = vec4(eye, 0);
float total = 0.0;
float maxt = 20.0;
const float count = 30.;
for (float index = count; index > 0.0; --index) {
result.xyz = eye + ray * total;
float dist = map(result.xyz);
if (dist < 0.001 + total * .002 || total > maxt) {
result.w = index / count;
break;
}
dist *= 0.9 + 0.1 * dither;
total += dist;
}
result.w *= step(total, maxt);
return result;
}
void mainImage( out vec4 fragColor, in vec2 fragCoord ){
vec2 uv = (fragCoord.xy-0.5*iResolution.xy)/iResolution.y;
vec3 eye = vec3(1.,0.5,-4.5);
vec3 at = vec3(0);
vec3 ray = look(eye, at, uv);
vec3 eyeoffset = 0.02*normalize(cross(normalize(at-eye), vec3(0,1.*grid,0)));
vec4 resultLeft = raymarch(eye-eyeoffset, ray);
vec4 resultRight = raymarch(eye+eyeoffset, ray);
fragColor = vec4(resultLeft.w,vec2(resultRight.w),1);
}
void main(void) {
mainImage(gl_FragColor, gl_FragCoord.xy);
}
@@ -0,0 +1,78 @@
/*{
"CREDIT": "by mojovideotech",
"CATEGORIES": [
"raymarching",
"Automatically Converted"
],
"DESCRIPTION": "Automatically converted from https://www.shadertoy.com/view/MsXGR2 by rez.",
"IMPORTED": [
],
"INPUTS": [
]
}
*/
const float PI=3.14159265358979323846;
float speed=TIME;
float ground_x=0.0;//+0.125*sin(PI*speed*0.25);
float ground_y=0.0;//+0.125*cos(PI*speed*0.25);
float ground_z=4.0*sin(PI*speed*0.0625);//+speed*0.5;
float rand(in vec2 p,in float t,in float v)
{
return fract(sin(dot(p+mod(t,1.0),vec2(12.9898,78.2333)))*v);
}
vec2 rotate(vec2 k,float t)
{
return vec2(cos(t)*k.x-sin(t)*k.y,sin(t)*k.x+cos(t)*k.y);
}
float scene(vec3 p)
{
float bar_p=1.0;
float bar_w=bar_p*(0.125+0.03125*float(1.0+2.0*sin(PI*p.z*2.0-PI*0.5)));
float bar_x=length(max(abs(mod(p.yz,bar_p)-bar_p*0.5)-bar_w,0.0));
float bar_y=length(max(abs(mod(p.xz,bar_p)-bar_p*0.5)-bar_w,0.0));
float bar_z=length(max(abs(mod(p.xy,bar_p)-bar_p*0.5)-bar_w,0.0));
float tube_p=0.125;
float tube_w=tube_p*0.375;
float tube_x=length(mod(p.yz,tube_p)-tube_p*0.5)-tube_w;
float tube_y=length(mod(p.xz,tube_p)-tube_p*0.5)-tube_w;
float tube_z=length(mod(p.xy,tube_p)-tube_p*0.5)-tube_w;
return -min(min(max(max(-bar_x,-bar_y),-bar_z),tube_y),tube_z);
}
void main()
{
vec2 position=(gl_FragCoord.xy/RENDERSIZE.xy);
vec2 p=-1.0+2.0*position;
vec3 dir=normalize(vec3(p*vec2(1.0/RENDERSIZE.y*RENDERSIZE.x,1.0),1.0)); // screen ratio (x,y) fov (z)
dir.yz=rotate(dir.yz,PI*0.5*sin(speed*0.25)); // rotation x
//dir.zx=rotate(dir.zx,speed*0.5); // rotation y
dir.xy=rotate(dir.xy,PI*1.0*cos(speed*0.25)); // rotation z
vec3 ray=vec3(ground_x,ground_y,ground_z);
float t=0.0;
const int ray_n=64;
for(int i=0;i<ray_n;i++)
{
float k=scene(ray+dir*t);
if(abs(k)<0.001) break;
t+=k*0.5;
}
vec3 hit=ray+dir*t;
vec2 h=vec2(0.005,-0.005);
vec3 n=normalize(vec3(scene(hit+h.xyy),scene(hit+h.yxx),scene(hit+h.yyx)));
float c=(n.x*2.0+n.y+n.z)*0.25-t*0.025;
vec3 color=vec3(c*t*0.625-p.x*0.125,c*t*0.25+t*0.03125,c*0.375+t*0.0625+p.y*0.125);
color=smoothstep(0.4,0.7,c)+color*color;
/* post process */
color*=0.6+0.4*rand(p,TIME,43758.5453);
color=vec3(color.x*0.9-0.1*cos(p.x*RENDERSIZE.x),color.y*0.95+0.05*sin(p.y*RENDERSIZE.x/2.0),color.z*0.9+0.1*cos(PI/2.0+p.x*RENDERSIZE.x));
/* return color */
gl_FragColor=vec4(color,1.0);
}
+119
View File
@@ -0,0 +1,119 @@
/*{
"CREDIT": "Silvia",
"DESCRIPTION": "vary_particularV",
"CATEGORIES": [
"particles",
"noise"
],
"INPUTS":
[
{
"NAME": "ColorG",
"TYPE": "float",
"MIN": 0.0,
"MAX": 1.0,
"DEFAULT": 0.0
},
{
"NAME": "ColorB",
"TYPE": "float",
"MIN": 0.0,
"MAX": 1.0,
"DEFAULT": 0.0
},
{
"NAME": "Stripe",
"TYPE": "float",
"MIN": 0.0,
"MAX": 60.0,
"DEFAULT": 29.0
},
{
"NAME": "Rotation",
"TYPE": "float",
"MIN": 0.0,
"MAX": 1.0,
"DEFAULT": 0.5
},
{
"NAME": "Filling",
"TYPE": "float",
"MIN": 1.0,
"MAX": 5.0,
"DEFAULT": 2.96
},
{
"NAME": "Half",
"TYPE": "float",
"MIN": 0.0,
"MAX": 0.04,
"DEFAULT": 0.00
}
]
}*/
////////////////////////////////////////////////////////////
// ParticularVortex by mojovideotech
// mod of : interactiveshaderformat.com/\sketches/\2358
//
// based on :
// glslsandbox/\e#44948.0
//
// Creative Commons Attribution-NonCommercial-ShareAlike 3.0
////////////////////////////////////////////////////////////
#define pi 3.141592653589793 // pi
#define T (TIME + 100000.0) * 0.1
float cash(float c) { return mix(mod(c, cos(c)), sin(pi+pi)*c, cos(c*pi)); }
float hash(float r) { return fract(cos(sin(r * 1113.27) * 43758.5453123)); }
float bash(float n) { return fract((sin(n)/log2(T))-(atan(n,-T))/55.753); }
float noise( vec2 w ) {
vec3 x = vec3(w.x,length(w),w.y);
vec3 p = floor(x), f = fract(x);
//addinput
f = f*f*(Filling-2.0*f);
float n = p.x + p.y*157.0 + 113.0*p.z;
return mix(mix(mix( bash(n+0.0), bash(n+1.0),f.x),
mix( bash(n+157.0), bash(n+158.0),f.x),f.y),
mix(mix( bash(n+113.0), bash(n+114.0),f.x),
mix( bash(n+270.0), bash(n+271.0),f.x),f.y),f.z);
}
mat2 rotate2d(float angle){ return mat2(cos(angle), -sin(angle), sin(angle), cos(angle)); }
void main() {
vec2 uv = (gl_FragCoord.xy * 2.0 - RENDERSIZE.xy) / RENDERSIZE.x;
vec2 p = uv * rotate2d(T * 0.213);
float direction = 120.0/(T/p.x,T/p.y,sqrt(T));
float speed = T * direction ;
float distanceFromCenter = cash(direction*dot(uv,p) - length(p));
//add input
p.yx *= rotate2d(-T * Rotation);
float meteorAngle = atan(p.y, p.x) * (Stripe + cos(atan(speed,pi))+pi);
float flooredAngle = floor(meteorAngle);
float randomAngle = pow(hash(flooredAngle),mix(cos(direction*pi),-sin(speed*pi),distanceFromCenter));
float t = speed + randomAngle;
float lightsCountOffset = bash(direction);
float adist = randomAngle / distanceFromCenter * lightsCountOffset;
float dist = t + adist;
float meteorDirection = (direction <
//addinput
0.5) ? -1.0 : Half;
dist = abs(fract(dist) + meteorDirection);
float lightLength =45.0/noise(uv.xy);
float meteor = (noise(p.xy) / dist) * cos(sin(speed)) / lightLength;
meteor -= dot(vec2(distanceFromCenter,meteorDirection),vec2(randomAngle,meteorAngle));
vec3 color = vec3(0.2);
color += meteor;
gl_FragColor = vec4(color, 1.0);
gl_FragColor.b *= ColorB;
gl_FragColor.g *= ColorG;
gl_FragColor.r *= 1.0;
}
+107
View File
@@ -0,0 +1,107 @@
// SaturdayShader Week 29 : Wave Lines
// by Joseph Fiola (http://www.joefiola.com)
// 2016-03-05
// Based on "WAVES" Shadertoy by bonniem
// https://www.shadertoy.com/view/4dsGzH
/*{
"CREDIT": "Joseph Fiola",
"DESCRIPTION": "",
"CATEGORIES": [
"Generator"
],
"INPUTS": [
{
"NAME": "amp",
"TYPE": "float",
"DEFAULT": 0.4,
"MIN": 0,
"MAX": 2
},
{
"NAME": "glow",
"TYPE": "float",
"DEFAULT": -3,
"MIN": -20,
"MAX": -0.5
},
{
"NAME": "mod1",
"TYPE": "float",
"DEFAULT": 0.2,
"MIN": -0.5,
"MAX": 0.5
},
{
"NAME": "mod2",
"TYPE": "float",
"DEFAULT": 0,
"MIN": -0.2,
"MAX": 0.2
},
{
"NAME": "zoom",
"TYPE": "float",
"DEFAULT": 4,
"MIN": 1,
"MAX": 16
},
{
"NAME": "rotateCanvas",
"TYPE": "float",
"DEFAULT": 0,
"MIN": 0,
"MAX": 1
},
{
"NAME": "scroll",
"TYPE": "float",
"DEFAULT": 0,
"MIN": 0,
"MAX": 1
},
{
"NAME": "twisted",
"TYPE": "float",
"DEFAULT": 0,
"MIN": 0.0,
"MAX": 0.06
}
]
}*/
#define PI 3.14159265359
#define TWO_PI 6.28318530718
mat2 rotate2d(float _angle){
return mat2(cos(_angle),-sin(_angle),
sin(_angle),cos(_angle));
}
void main()
{
vec2 uv = gl_FragCoord.xy / RENDERSIZE.xy;
uv -= vec2(0.5, 0.5 + mod2 * 4.);
uv.x *= RENDERSIZE.x/RENDERSIZE.y;
uv *= zoom; // Scale the coordinate system
uv = rotate2d(rotateCanvas*-TWO_PI) * uv;
// waves
vec3 wave_color = vec3(0.0);
float wave_width = 0.01;
for(float i = 0.0; i < 10.0; i++) {
uv = rotate2d(twisted * - TWO_PI) * uv;
uv.y += sin(sin(uv.x + i * (mod1 * TWO_PI * 0.5) + (scroll * TWO_PI) ) * amp + (mod2 * PI));
wave_width = abs(1.0 / (50.0 * uv.y * glow));
wave_color += vec3(wave_width, wave_width, wave_width);
}
gl_FragColor = vec4(wave_color, 1.0);
}
+144
View File
@@ -0,0 +1,144 @@
// SaturdayShader Week 30 : Wisps
// by Joseph Fiola (http://www.joefiola.com)
// 2016-03-12
// Based on Week 29 Saturday Shader + "WAVES" Shadertoy by bonniem
// https://www.shadertoy.com/view/4dsGzH
/*{
"CREDIT": "",
"DESCRIPTION": "",
"CATEGORIES": [
"Generator"
],
"INPUTS": [
{
"NAME": "lines",
"TYPE": "float",
"DEFAULT": 100,
"MIN": 1,
"MAX": 200
},
{
"NAME": "linesStartOffset",
"TYPE": "float",
"DEFAULT": 0.5,
"MIN": 0,
"MAX": 1
},
{
"NAME": "amp",
"TYPE": "float",
"DEFAULT": 0.1,
"MIN": 0,
"MAX": 1
},
{
"NAME": "glow",
"TYPE": "float",
"DEFAULT": -6,
"MIN": -40,
"MAX": 0
},
{
"NAME": "mod1",
"TYPE": "float",
"DEFAULT": 1,
"MIN": 0,
"MAX": 1
},
{
"NAME": "mod2",
"TYPE": "float",
"DEFAULT": 0.01,
"MIN": -1,
"MAX": 1
},
{
"NAME": "twisted",
"TYPE": "float",
"DEFAULT": 0.01,
"MIN": -0.5,
"MAX": 0.5
},
{
"NAME": "zoom",
"TYPE": "float",
"DEFAULT": 11,
"MIN": 0,
"MAX": 100
},
{
"NAME": "rotateCanvas",
"TYPE": "float",
"DEFAULT": 0,
"MIN": 0,
"MAX": 1
},
{
"NAME": "scroll",
"TYPE": "float",
"DEFAULT": 0,
"MIN": 0,
"MAX": 1
},
{
"NAME": "pos",
"TYPE": "point2D",
"DEFAULT": [
0.5,
0.5
],
"MIN": [
0,
0
],
"MAX": [
1,
1
]
}
]
}*/
#define PI 3.14159265359
#define TWO_PI 6.28318530718
mat2 rotate2d(float _angle){
return mat2(cos(_angle),-sin(_angle),
sin(_angle),cos(_angle));
}
void main()
{
vec2 uv = gl_FragCoord.xy / RENDERSIZE.xy;
uv -= vec2(pos);
uv.x *= RENDERSIZE.x/RENDERSIZE.y;
uv *= zoom; // Scale the coordinate system
uv = rotate2d(rotateCanvas*-TWO_PI) * uv;
// waves
vec3 wave_color = vec3(0.0);
float wave_width = 0.01;
//uv = -1.0 + 2.0 * uv;
//uv.y += 0.1;
for(float i = 0.0; i < 200.0; i++) {
uv = rotate2d(twisted*-TWO_PI) * uv;
if (lines <= i) break;
uv.y += sin(sin(uv.x + i*mod1 + (scroll * TWO_PI) ) * amp + (mod2 * PI));
if(lines * linesStartOffset - 1.0 <= i) {
wave_width = abs(1.0 / (50.0 * uv.y * glow));
wave_color += vec3(wave_width, wave_width, wave_width);
}
}
gl_FragColor = vec4(wave_color, 1.0);
}
+36
View File
@@ -0,0 +1,36 @@
/*{
"CREDIT": "by mojovideotech",
"DESCRIPTION": "",
"CATEGORIES": [],
"INPUTS": []
}*/
///////////////////////////////////////////
// Z'sSpiral by mojovideotech
//
// Variation of LogarithmicPinwheel by mojovideotech
//
// Creative Commons Attribution-NonCommercial-ShareAlike 3.0
///////////////////////////////////////////
#define ee 3.140692632779269
#define ii 2.141592653589793
#define ppp 1.918033988749895
#define rr 1.047197551196598
#define ll 2.497149872694134
#define pp 0.318309886183790
#define iii 0.027425693123298
#define c mod(floor(a+t-i.x* L) +fract(a+t-i.y* L),ppp)
void main ( void ) {
vec3 o;
vec2 i = gl_FragCoord.xy / RENDERSIZE.xy - log2(ii*isf_FragNormCoord.xy+.5);
float t = TIME/log(ll), a, L = pow(length(i),-(ppp+sin(t)/ee));
a = exp(iii/t); o.r = c;
a = log(pp); o.g = c;
a = exp(rr); o.b = c;
gl_FragColor = vec4(o.r,1.-o.g,o.b,a-(c*ppp));
}
@@ -0,0 +1,82 @@
/*
{
"CATEGORIES": [
"Automatically Converted",
"Shadertoy"
],
"DESCRIPTION": "Automatically converted from https://www.shadertoy.com/view/MltXWn by blackpolygon. :D",
"IMPORTED": {
},
"INPUTS": [
]
}
*/
// Author: blackpolygon
// Title: Double Galaxy
// Based on 'Audio Eclipse' by airtight
// https://www.shadertoy.com/view/MdsXWM
const float dots = 600.;
float radius = 0.232125;
const float brightness = 0.0002131211;
//convert HSV to RGB
vec3 hsv2rgb(vec3 c){
vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);
vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);
return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);
}
mat2 rotate2d(float _angle){
return mat2(cos(_angle),-sin(_angle),
sin(_angle),cos(_angle));
}
void main() {
vec2 st=(gl_FragCoord.xy-.5*RENDERSIZE.xy)/min(RENDERSIZE.x,RENDERSIZE.y);
vec3 c=vec3(0.0);
st = rotate2d( sin(TIME/5.)*3.14 ) * st;
float b1a0 = 1.5+sin(TIME)*.5;
float b1a02 = 1.5+cos(TIME)*0.5;
float ra = (0.15+sin(TIME/.1)*.3)*0.002;
//inner
for(float i=0.;i<dots*.341; i++){
radius +=ra/2000.;
//get location of dot
float x = radius*cos(2.*3.14*float(i)/(dots/(15.+b1a0)));
float y = radius*sin(2.*3.14*float(i)/(dots/(14. +b1a02)));
vec2 o = vec2(x,y);
//get color of dot based on its index in the
//circle + time to rotate colors
vec3 dotCol = hsv2rgb(vec3((i + TIME*5.)/ (dots/14.),1.,1.0));
//get brightness of this pixel based on distance to dot
c += brightness/(length(st-o))*dotCol;
}
//outer
for(float i=0.;i<dots*1.2; i++){
radius += ra*.15;
float y = radius*cos(2.*3.14*float(i)/(dots/(10.+b1a0)));
float x = radius*sin(2.*3.14*float(i)/(dots/(10. +b1a02)));
vec2 o = vec2(x,y);
vec3 dotCol = hsv2rgb(vec3((i + TIME*5.)/ (dots/10.),1.,1.0));
c += brightness/(length(st-o))*dotCol*1.7;
}
gl_FragColor = vec4(c,1);
}
@@ -0,0 +1,263 @@
/*
{
"CATEGORIES": [
"Converted by bennoH.",
"Generator", "from Shadertoy", "freeVJing License 1.6"
],
"DESCRIPTION": "Converted by bennoH. at 06-19-2025 from https://www.shadertoy.com/view/wcyXzV by mrange. CC0: Sorry for the banding\n I wanted to go smaller than before so I left the banding artifacts in\n",
"IMPORTED": {
},
"INPUTS": [
{
"NAME": "speed",
"TYPE": "float",
"DEFAULT": 0.5,
"MIN": -3.2,
"MAX": 3.2,
"LABEL": "Tunnel Speed"
},
{
"NAME": "zRotation",
"TYPE": "float",
"DEFAULT": 0.0,
"MIN": -3.14159,
"MAX": 3.14159,
"LABEL": "Z Rotation"
},
{
"NAME": "zoom",
"TYPE": "float",
"DEFAULT": 1.0,
"MIN": 0.1,
"MAX": 5.0,
"LABEL": "Zoom"
},
{
"NAME": "soomp",
"TYPE": "float",
"DEFAULT": 0.6,
"MIN": 0.20,
"MAX": 2.0,
"LABEL": "Soomp"
},
{
"NAME": "DistK",
"TYPE": "float",
"DEFAULT": 0.5,
"MIN": 0.05,
"MAX": 1.1,
"LABEL": "Distance K"
},
{
"NAME": "DistQ",
"TYPE": "float",
"DEFAULT": 0.5,
"MIN": 0.01,
"MAX": 0.85,
"LABEL": "Distance Q"
},
{
"NAME": "wobble",
"TYPE": "float",
"DEFAULT": 0.0,
"MIN": 0.0,
"MAX": 4.0,
"LABEL": "Tunnel Wobble"
},
{
"NAME": "pulse",
"TYPE": "float",
"DEFAULT": 0.0,
"MIN": 0.0,
"MAX": 3.0,
"LABEL": "Beat Pulse"
},
{
"NAME": "colorIntensity",
"TYPE": "float",
"DEFAULT": 1.0,
"MIN": 0.1,
"MAX": 5.0,
"LABEL": "Color Intensity"
},
{
"NAME": "hueShift",
"TYPE": "float",
"DEFAULT": 0.0,
"MIN": 0.0,
"MAX": 6.28318,
"LABEL": "Hue Shift"
},
{
"NAME": "brightness",
"TYPE": "float",
"DEFAULT": 1.0,
"MIN": 0.1,
"MAX": 3.0,
"LABEL": "Brightness"
},
{
"NAME": "contrast",
"TYPE": "float",
"DEFAULT": 1.4,
"MIN": 0.1,
"MAX": 3.0,
"LABEL": "Contrast"
},
{
"NAME": "blueBoost",
"TYPE": "float",
"DEFAULT": 1.5,
"MIN": 0.1,
"MAX": 3.0,
"LABEL": "Blue Boost"
}
]
}
*/
// =====================================================================================
// freeVJing License 1.6
// Copyright (c) 2025 bennoH.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
// software and associated documentation files (the "Software"), to deal in the Software
// solely for the following permitted uses:
//
// PERMITTED USES:
// - VJ Performances: Use in VJ performances at events of any kind, including commercial events
// - Video Art Installations: Use by light and video artists in any artistic installation format,
// including immersive and 360-degree installations
// - Live Visual Arts: Use in live visual performances and artistic presentations
//
// PERMITTED MODIFICATIONS:
// - The Software may be modified and extended
// - Modified versions must be distributed under this same license
// - All original credits and annotations in the source code must be preserved
// - Additional credits and annotations may be added
//
// PERMITTED DISTRIBUTION:
// - The Software may be redistributed free of charge only
// - Redistribution must include this license and all original credits
// - Redistribution must be under the same license terms
//
// PROHIBITED USES:
// - Commercial Products: Incorporation into commercial software products or packages for sale
// - Video Loop Creation: Creating video loops or pre-rendered content using this Software
// - Any commercial use outside of VJ performances and video art installations
//
// This license was developed with support from Claude (Sonnet4) by Anthropic PBC
// This license was developed with support from ChatGPT (GPT-4o omni) by OpenAI
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
//
// This license is specifically designed to support the VJ and video art community
// without allowing further commercial use.
//
// https://github.com/bennoH2025/freeVJing-license/blob/main/README.md
// https://github.com/bennoH2025/freeVJing-license/tree/main
// ===================-===================-====================-========================
// According to Anthropic's design guidelines, the name "Claude"
// is a trademark owned by Anthropic PBC.
// According to OpenAI's design guidelines, the names "OpenAI", "ChatGPT", and "GPT"
// are trademarks owned by OpenAI Inc.
//
// AI version used in this ISF-Shader project: Claude (Sonnet 4).
// Note: This shader was developed in collaboration with Claude (Sonnet 4 free version)
// and was custom-built in several interactive steps under the creative guidance of bennoH.
// Credits:
// Credits for the inspiring shadertoy: mrange https://www.shadertoy.com/user/mrange/
// Credits for the idea and project instructions management & supervision: bennoH. 06/16-17/2025
// Credits for some code creation Claude (Sonnet 4) of Anthropic PBC under guidance and review by bennoH. 06/16/2025
// Credits for inputs creation Claude (Sonnet 4) of Anthropic PBC under guidance and review by bennoH. 06/17/2025
//
// Original Shadertoy License:
// CC0 (for the Shadertoy by mrange): Sorry for the banding
// I wanted to go smaller than before so I left the banding artifacts
void main() {
// Initialize output color to black
gl_FragColor = vec4(0.0);
vec3 p; // Current 3D position in space
vec4 P; // Color contribution from current position
float d = 0.0; // Distance to surface
float z = 0.0; // Depth along ray
// Main raymarching loop - use standard for loop
for (int i = 0; i < 77; i++) {
// Convert screen coordinates to 3D ray direction
p = z * normalize(vec3(gl_FragCoord.xy + gl_FragCoord.xy, 0.0) - RENDERSIZE.xyy);
// Apply zoom
p.xy /= zoom;
// Apply Z-rotation to the ray direction
float cosZ = cos(zRotation);
float sinZ = sin(zRotation);
mat2 zRotMatrix = mat2(cosZ, -sinZ, sinZ, cosZ);
p.xy *= zRotMatrix;
// Apply wobble effect - makes the tunnel dance!
if (wobble > 0.0) {
float wobbleX = sin(TIME * 2.0 + p.z * 0.5) * wobble * 0.3;
float wobbleY = cos(TIME * 1.7 + p.z * 0.3) * wobble * 0.2;
p.xy += vec2(wobbleX, wobbleY);
}
// Create forward motion through the tunnel and rotation
p.z -= speed * TIME;
p.xy *= mat2(cos(p.z + vec4(0,11,33,0)));
// Generate procedural color based on position
P = 1.0 + sin(5.0 * p.x + p.z + vec4(2,1,0,2));
// Apply beat pulse effect - makes colors throb rhythmically
if (pulse > 0.0) {
float beatThrob = 1.0 + sin(TIME * 8.0) * pulse * 0.4;
P *= beatThrob;
}
// Calculate distance to nearest surface (spheres in a grid) - using DistK and DistQ parameters
d = abs(length(fract(p) - DistK) - DistQ) + 1e-3;
// Add color contribution: brighter when closer to surface
gl_FragColor += P.w / d * P * colorIntensity;
// March forward along ray
z += soomp * d;
}
// Tone mapping: simple version instead of tanh
gl_FragColor = gl_FragColor / 20000.0;
gl_FragColor = gl_FragColor / (1.0 + gl_FragColor);
// Apply brightness
gl_FragColor.rgb *= brightness;
// Apply contrast
gl_FragColor.rgb = (gl_FragColor.rgb - 0.5) * contrast + 0.5;
// Boost blue channel
gl_FragColor.b *= blueBoost;
// Apply hue shift
if (hueShift > 0.0) {
float cosHue = cos(hueShift);
float sinHue = sin(hueShift);
mat3 hueMatrix = mat3(
cosHue + (1.0 - cosHue) * 0.299, (1.0 - cosHue) * 0.587 - sinHue * 0.114, (1.0 - cosHue) * 0.114 + sinHue * 0.587,
(1.0 - cosHue) * 0.299 + sinHue * 0.114, cosHue + (1.0 - cosHue) * 0.587, (1.0 - cosHue) * 0.114 - sinHue * 0.299,
(1.0 - cosHue) * 0.299 - sinHue * 0.587, (1.0 - cosHue) * 0.587 + sinHue * 0.299, cosHue + (1.0 - cosHue) * 0.114
);
gl_FragColor.rgb = hueMatrix * gl_FragColor.rgb;
}
}
+57
View File
@@ -0,0 +1,57 @@
/*{
"CATEGORIES": ["Generator", "Trippy", "Psychedelic"],
"DESCRIPTION": "Morphing DMT-style visual with palette cycling and shape modulation.",
"INPUTS": [
{ "NAME": "speed", "TYPE": "float", "DEFAULT": 1.0, "MIN": 0.0, "MAX": 5.0 },
{ "NAME": "paletteShift", "TYPE": "float", "DEFAULT": 0.0, "MIN": 0.0, "MAX": 10.0 },
{ "NAME": "geometryMorph", "TYPE": "float", "DEFAULT": 0.5, "MIN": 0.0, "MAX": 1.0 },
{ "NAME": "scale", "TYPE": "float", "DEFAULT": 1.0, "MIN": 0.1, "MAX": 5.0 },
{ "NAME": "saturation", "TYPE": "float", "DEFAULT": 1.2, "MIN": 0.0, "MAX": 3.0 },
{ "NAME": "contrast", "TYPE": "float", "DEFAULT": 1.0, "MIN": 0.5, "MAX": 3.0 },
{ "NAME": "brightness", "TYPE": "float", "DEFAULT": 1.0, "MIN": 0.1, "MAX": 3.0 }
]
}*/
vec3 palette(float t) {
return 0.5 + 0.5 * cos(6.2831 * (vec3(0.3, 0.5, 0.9) + t));
}
vec3 applyContrastSaturationBrightness(vec3 color, float con, float sat, float brt) {
const vec3 averageLuminance = vec3(0.2126, 0.7152, 0.0722);
float intensity = dot(color, averageLuminance);
vec3 grey = vec3(intensity);
color = mix(grey, color, sat);
color = (color - 0.5) * con + 0.5;
return color * brt;
}
void main() {
vec2 uv = (gl_FragCoord.xy - 0.5 * RENDERSIZE.xy) / RENDERSIZE.y;
float t = TIME * speed;
// Zoom in/out
uv *= scale;
// Morphing shape
float r = length(uv);
float angle = atan(uv.y, uv.x);
float morph = sin(t + r * 10.0 + cos(angle * 6.0)) * geometryMorph;
// Make base pattern
float shape = sin(r * 10.0 + morph * 5.0 - t * 2.0);
shape += 0.5 * cos(r * 5.0 - t * 3.0 + sin(angle * 4.0));
shape = abs(shape);
// Apply palette
float paletteT = t * 0.2 + paletteShift + shape;
vec3 col = palette(paletteT);
// Shape-based masking
col *= smoothstep(1.2, 0.2, shape);
// Post-processing
col = applyContrastSaturationBrightness(col, contrast, saturation, brightness);
gl_FragColor = vec4(col, 1.0);
}
+130
View File
@@ -0,0 +1,130 @@
/*{
"CREDIT": "by lennyjpg",
"DESCRIPTION": "",
"CATEGORIES": [
"XXX"
],
"INPUTS": [
{
"NAME": "cover",
"TYPE": "color",
"DEFAULT": [
0.0,
0.0,
1.0,
1.0
]
},
{
"NAME": "blend",
"TYPE": "float",
"DEFAULT": 0.5,
"MIN": 0.0,
"MAX": 1.0
},
{
"NAME": "speed",
"TYPE": "float",
"DEFAULT": 0.2,
"MIN": 0.0,
"MAX": 10.0
},
{
"NAME": "waveA",
"TYPE": "float",
"DEFAULT": 0.25,
"MIN": 0.0,
"MAX": 1.0
},
{
"NAME": "waveB",
"TYPE": "float",
"DEFAULT": 0.15,
"MIN": 0.0,
"MAX": 1.0
},
{
"NAME": "waveC",
"TYPE": "float",
"DEFAULT": 0.05,
"MIN": 0.0,
"MAX": 1.0
},
{
"NAME": "push",
"TYPE": "float",
"DEFAULT": 2.0,
"MIN": 1.0,
"MAX": 5.0
},
{
"NAME": "stretch",
"TYPE": "float",
"DEFAULT": 0.25,
"MIN": 0.0,
"MAX": 2.0
},
{
"NAME": "level",
"TYPE": "float",
"DEFAULT": 0.0,
"MIN": 0.0,
"MAX": 1.0
},
{
"NAME": "blur",
"TYPE": "float",
"DEFAULT": 0.5,
"MIN": 0.0,
"MAX": 1.0
}
]
}*/
vec3 permute(vec3 x) { return mod(((x*34.0)+1.0)*x, 289.0); }
float snoise(vec2 v){
const vec4 C = vec4(0.211324865405187, 0.366025403784439, -0.577350269189626, 0.024390243902439);
vec2 i = floor(v + dot(v, C.yy) );
vec2 x0 = v - i + dot(i, C.xx);
vec2 i1;
i1 = (x0.x > x0.y) ? vec2(1.0, 0.0) : vec2(0.0, 1.0);
vec4 x12 = x0.xyxy + C.xxzz;
x12.xy -= i1;
i = mod(i, 289.0);
vec3 p = permute( permute( i.y + vec3(0.0, i1.y, 1.0 ))
+ i.x + vec3(0.0, i1.x, 1.0 ));
vec3 m = max(0.5 - vec3(dot(x0,x0), dot(x12.xy,x12.xy), dot(x12.zw,x12.zw)), 0.0);
m = m*m;
m = m*m;
vec3 x = 2.0 * fract(p * C.www) - 1.0;
vec3 h = abs(x) - 0.5;
vec3 ox = floor(x + 0.5);
vec3 a0 = x - ox;
m *= 1.79284291400159 - 0.85373472095314 * ( a0*a0 + h*h );
vec3 g;
g.x = a0.x * x0.x + h.x * x0.y;
g.yz = a0.yz * x12.xz + h.yz * x12.yw;
return 130.0 * dot(m, g);
}
void main(){
vec2 uv = isf_FragNormCoord.xy - .5;
float t = TIME * speed * 2.0, x = uv.x * stretch;
vec3 s = vec3(.4,.7,-1.3) * t;
vec3 f = vec3(waveA,waveB,waveC) * t;
vec3 q = vec3(1,1.5,0.5) * x;
vec3 d = vec3( snoise(vec2(q.x+s.x, f.x)), snoise(vec2(q.y+s.y, f.y)), snoise(vec2(q.z+s.z, f.z)));
vec3 w = sin(d)*0.5;
vec3 ww = smoothstep(w - blur, w + blur,vec3(uv.y+level));
ww *= push;
vec3 gradient = vec3(4. * uv.y + .5),
overlay = mix(cover.rgb,gradient,.5),
final = mix(ww,overlay, blend);
gl_FragColor = vec4(final,1.0);
}
+79
View File
@@ -0,0 +1,79 @@
/*{
"DESCRIPTION": "based https://www.shadertoy.com/view/XlXcWj",
"CATEGORIES": ["fractal", "generator"],
"INPUTS": [
{
"NAME": "mX",
"TYPE": "float",
"DEFAULT": 0.67,
"MIN": 0.0,
"MAX": 2.0
},
{
"NAME": "mY",
"TYPE": "float",
"DEFAULT": 1.0,
"MIN": 0.0,
"MAX": 2.0
},
{
"NAME": "rate",
"TYPE": "float",
"DEFAULT": 1.75,
"MIN": -3.0,
"MAX": 3.0
},
{
"NAME": "e",
"TYPE": "float",
"DEFAULT": 0.025,
"MIN": 0.0005,
"MAX": 0.1
}
]
}*/
////////////////////////////////////////////////////////////
// z33d+ by mojovideotech
//
// mod of :
// interactiveshaderformat.com/\2109
// based on :
// shadertoy.com/\XlXcWj
//
// Creative Commons Attribution-NonCommercial-ShareAlike 3.0
////////////////////////////////////////////////////////////
void main()
{
float k = 0.0, T = TIME*rate*0.1;
vec2 R = RENDERSIZE.xy;
vec2 M = vec2(mX,mY)*R.xy;
for (float i = 0.0; i < 12.0; i++) {
vec3 p = vec3((2.0 * gl_FragCoord.xy - R.xy) / R.yy, k - 1.);
float a = T;
p.zy *= mat2(cos(a), -sin(a), sin(a), cos(a));
a /= 2.0;
p.yx *= mat2(cos(a), -sin(a), sin(a), cos(a));
a /= 2.0;
p.zx *= mat2(cos(a), -sin(a), sin(a), cos(a));
vec3 z = p;
float c = 2.0;
for (float i = 0.; i < 9.0; i++) {
float r = length(z);
if (r > 6.0) {
k += log(r) * r / c / 3.0;
break;
}
float a = acos(z.z / r) * (6.0 + 12.0 * M.x / R.x);
float b = atan(z.y, z.x) * (6.0 + 12.0 * M.y / R.y);
c = pow(r, 7.0) * 5.0 * c / r + 1.0;
z = pow(r, 7.0) * vec3(sin(a) * cos(b), -sin(a) * sin(b), -cos(a)) + p;
}
gl_FragColor = vec4(1.0 - i / 16.0 - k + p / 4.0, 1.0);
if (log(length(z)) * length(z) / c < e) {
break;
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 749 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:8a400e27f5d23036a18e8bd07a019362455fd15a77693e7519142603210131fc
size 58472537
Binary file not shown.

Before

Width:  |  Height:  |  Size: 234 KiB

After

Width:  |  Height:  |  Size: 234 KiB

@@ -0,0 +1 @@
Select Audio Device

Before

Width:  |  Height:  |  Size: 139 KiB

After

Width:  |  Height:  |  Size: 139 KiB

@@ -0,0 +1,69 @@
Copyright © 1993, 2018, Oracle and/or its affiliates.
All rights reserved.
This software and related documentation are provided under a
license agreement containing restrictions on use and
disclosure and are protected by intellectual property laws.
Except as expressly permitted in your license agreement or
allowed by law, you may not use, copy, reproduce, translate,
broadcast, modify, license, transmit, distribute, exhibit,
perform, publish, or display any part, in any form, or by
any means. Reverse engineering, disassembly, or
decompilation of this software, unless required by law for
interoperability, is prohibited.
The information contained herein is subject to change
without notice and is not warranted to be error-free. If you
find any errors, please report them to us in writing.
If this is software or related documentation that is
delivered to the U.S. Government or anyone licensing it on
behalf of the U.S. Government, the following notice is
applicable:
U.S. GOVERNMENT END USERS: Oracle programs, including any
operating system, integrated software, any programs
installed on the hardware, and/or documentation, delivered
to U.S. Government end users are "commercial computer
software" pursuant to the applicable Federal Acquisition
Regulation and agency-specific supplemental regulations. As
such, use, duplication, disclosure, modification, and
adaptation of the programs, including any operating system,
integrated software, any programs installed on the hardware,
and/or documentation, shall be subject to license terms and
license restrictions applicable to the programs. No other
rights are granted to the U.S. Government.
This software or hardware is developed for general use in a
variety of information management applications. It is not
developed or intended for use in any inherently dangerous
applications, including applications that may create a risk
of personal injury. If you use this software or hardware in
dangerous applications, then you shall be responsible to
take all appropriate fail-safe, backup, redundancy, and
other measures to ensure its safe use. Oracle Corporation
and its affiliates disclaim any liability for any damages
caused by use of this software or hardware in dangerous
applications.
Oracle and Java are registered trademarks of Oracle and/or
its affiliates. Other names may be trademarks of their
respective owners.
Intel and Intel Xeon are trademarks or registered trademarks
of Intel Corporation. All SPARC trademarks are used under
license and are trademarks or registered trademarks of SPARC
International, Inc. AMD, Opteron, the AMD logo, and the AMD
Opteron logo are trademarks or registered trademarks of
Advanced Micro Devices. UNIX is a registered trademark of
The Open Group.
This software or hardware and documentation may provide
access to or information on content, products, and services
from third parties. Oracle Corporation and its affiliates
are not responsible for and expressly disclaim all
warranties of any kind with respect to third-party content,
products, and services. Oracle Corporation and its
affiliates will not be responsible for any loss, costs, or
damages incurred due to your access to or use of third-party
content, products, or services.
@@ -0,0 +1 @@
Please refer to http://java.com/license
@@ -0,0 +1 @@
Please refer to http://java.com/licensereadme
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,28 @@
<html>
<head>
<title>
Welcome to the Java(TM) Platform
</title>
</head>
<body>
<h2>Welcome to the Java<SUP><FONT SIZE=-2>TM</FONT></SUP> Platform</h2>
<p> Welcome to the Java<SUP><FONT SIZE=-2>TM</FONT></SUP> Standard Edition Runtime
Environment. This provides complete runtime support for Java applications.
<p> The runtime environment includes the Java<SUP><FONT SIZE=-2>TM</FONT></SUP>
Plug-in product which supports the Java environment inside web browsers.
<h3>References</h3>
<p>
See the <a href="http://download.oracle.com/javase/7/docs/technotes/guides/plugin/">Java Plug-in</a> product
documentation for more information on using the Java Plug-in product.
<p> See the <a href=
"http://www.oracle.com/technetwork/java/javase/overview/"
>Java Platform</a> web site for
more information on the Java Platform.
<hr>
<font size="-2">
Copyright (c) 2006, 2018, Oracle and/or its affiliates. All rights reserved.
</font>
<p>
</body>
</html>

Some files were not shown because too many files have changed in this diff Show More