Collected files added nuit an set without gridnode

This commit is contained in:
Squishy
2025-12-28 19:32:26 +01:00
parent 9a5c8d86fd
commit adc092efee
213 changed files with 8729 additions and 0 deletions
Binary file not shown.
Binary file not shown.
+1
View File
@@ -0,0 +1 @@
AuraGroveNYP
Binary file not shown.
Binary file not shown.
+6
View File
@@ -0,0 +1,6 @@
[.ShellClassInfo]
ConfirmFileOp=0
NoSharing=0
IconFile=heavym_project.ico
IconIndex=0
InfoTip=HeavyM Project
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 946 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 MiB

+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);
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 264 KiB

+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);
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 926 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

@@ -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);
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 123 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 130 KiB

@@ -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);
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 212 KiB

+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);
}
@@ -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);
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

+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 );
}
@@ -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);
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

+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);
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 491 KiB

@@ -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;
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

+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);
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

@@ -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);
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 MiB

@@ -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);
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 104 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 269 KiB

+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);
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 744 KiB

@@ -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);
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

@@ -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);
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 362 KiB

@@ -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);
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 104 KiB

+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.);
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 415 KiB

@@ -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);
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 397 KiB

+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);
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 673 KiB

+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);
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

@@ -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);
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

@@ -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);
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 743 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 342 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 MiB

+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);
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 351 KiB

+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);
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

+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);
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 240 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 411 KiB

Binary file not shown.
@@ -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);
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 163 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.0 MiB

+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);
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 989 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 172 KiB

@@ -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

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