Premium Only Content

music with shader
#version 300 es
#define PI 3.14159265359
#define PI2 6.28318530718
// Comment or uncomment
// (Leave commented if in shadergif)
// (uncomment if in shadertoy)
//#define shadertoy 1
#ifdef shadertoy
// time is iGlobalTime in shadertoy
#define time iGlobalTime
#endif
#ifndef shadertoy
// Define some uniforms
// (which shadertoy already defines for us, but not shadergif)
precision highp float;
uniform float time;
uniform float iGlobalTime;
in vec2 UV;
out vec4 out_color;
uniform vec3 iResolution;
uniform sampler2D texture0;
#endif
float sdSegment( in vec2 p, in vec2 a, in vec2 b )
{
vec2 pa = p-a, ba = b-a;
float h = clamp( dot(pa,ba)/dot(ba,ba), 0.0, 1.0 );
return length( pa - ba*h );
}
float sdCircle( vec2 p, float r )
{
return length(p) - r;
}
// Cube function
float map(vec3 pos){
pos = fract(pos) * 2.0 - 1.0;
return sdCircle(pos.rb,.01);
//return length(max(abs(pos) - 0.2, 0.0));
}
/* Walk the ray through the scene */
float trace(vec3 o, vec3 r){
vec3 p;
float t = 0.0;
float d;
for(int i = 0; i < 30; i++){
p = o + r * t;
d = map(p);
t += d * 0.45;
if(d < 0.04){
break;
}
}
return t;
}
void mainImage( out vec4 fragColor, in vec2 fragCoord )
{
vec2 uv = fragCoord.xy / iResolution.xy;
float ratio = iResolution.x / iResolution.y;
uv.x *= ratio;
vec4 col = vec4(1.0);
vec2 pos = uv - vec2(0.5 * ratio, 0.5);
// Create ray (with position and origin)
vec3 r,o;
r = normalize(vec3(pos, 1.0));
o = vec3(0.0);
o.z += time;
// Trace
float t = trace(o, r);
vec4 col0 = vec4(.4,.2,.4,.0);
vec4 col1 = vec4(1.8,.8,.8,0.);
vec4 col2 = vec4(1.,.5,0.,0);
// Fog function
vec4 tc = texture(texture0, UV * vec2(1.0, -1.0) + vec2(0.0, 1.0));
col -= 1.3 / (1.0 + t * t * 0.06)*tc;
if (uv.y<.5){
col += pow(.5-uv.y,2.)*2.+(t*t*t)*.0001*col1;
} else {
col += (uv.y-.5)*(1.+t*t*.005)*col2;
}
col.a = 1.0;
fragColor = col;
}
#ifndef shadertoy
void main(){
vec2 uv = UV.xy * iResolution.xy;
vec4 col;
mainImage(col, uv);
out_color = col;
}
#endif
-
15:06
Russell Brand
1 day agoPeople Are SHOCKED As Bill Burr Goes After Elon Musk on 'The View'
133K248 -
7:32:11
SpartakusLIVE
13 hours ago#1 Action HERO ends your weekend in a FIERY BLAZE of non-stop GLORY
113K5 -
2:34:20
vivafrei
22 hours agoEp. 257: More ROGUE Judges! More Deportations! Candace v. RFK Jr.? Wisconsin Election & MORE!
206K489 -
2:27:35
Nerdrotic
14 hours ago $25.72 earnedGobekli Tepe Coverup, Pyramid Structures w/ Jimmy Corsetti & Wandering Wolf | Forbidden Frontier 096
84.6K38 -
54:17
Man in America
19 hours ago50 MILLION Illegals: The TIME BOMB Threatening to Destroy America w/ J.J. Carrell
68.3K91 -
1:09:13
Tundra Tactical
11 hours ago $6.40 earnedThe Worlds Okayest Gun Live Stream
52.3K8 -
4:01:56
The Sufari Hub
12 hours ago🔴ELDEN RING MODDED - ROAD TO #1 GAMER ON RUMBLE - #RumbleGaming
67.1K1 -
4:23:35
thatsnotkyle
11 hours agoPUBG | Chicken Dinners
66.9K6 -
54:47
Sarah Westall
15 hours agoTranshumanism vs Natural Human Zones, AI consciousness and the Hive Mind Future w/ Joe Allen
101K55 -
4:29:06
Joke65
13 hours ago[LIVE] The Sunday Surprise! | Testing Halo Star Wars Mods!
73.8K