#ifdef GL_ES precision mediump float; #endif sampler uImage0 : register(s0); uniform float2 uResolution; uniform float uTime; float uProgress; #define PI 3.14159 // Note: to whomever reads this trying to work out shaders, do NOT bundle them in one file like I have here. This is just an experiment. float mod(float x, float y){ float z = x; return z%y; } float4 lines(float2 st : TEXCOORD0) : COLOR0 { float time=uProgress*.06 + .5*PI; float2 ce = float2(.5,.5); float2 ef = st; ef.x=ef.x-0.3*mod(ef.y,0.2) + 0.2*ceil(5.*ef.y); float4 tex=tex2D(uImage0, st); float4 gl_FragColor=float4(0,0,0,0); float3 color = float3(0,0,0); //float3 notcolor = float3(0,1,0); float3 notcolor = tex.xyz; if(sin(time*1.+1.5*PI)>0.){ if(ef.x-1.st.x){gl_FragColor.r=1.;} return gl_FragColor; } float clam(float x, float minimum, float maximum){ if(x>maximum){return maximum;} if(x.29 && i<.31)){use=pink;} float step1=smooth(0.,1.,time-i); //float step1=time-i; //float step2=time-i-1.; float step2=smooth(0.,1.,time-1.-i); if(abs(st.y-.1-2.*i)<.1 && st.x50)st.y+=2.; st.y-=1.-1.0*cos(0.01*uProgress*PI); st=(st-ce)/(6.0-clam(7.*sin(0.01*uProgress*PI+0.3), 0., 5.5))+ce; //st = (st-ce)*(1.0/(time*0.1)) + ce; //st.y+=sin(time/30.)*0.15; float3 color = float3(0,0,0); if ( st.y>ce.y && abs(st.x-ce.x) < clam(.4*cos((ce.y-st.y)*PI), 0.0, 1.0) && st.y>0. && st.y<1. || st.y0 && abs(st.y-ce.y)+.5*te<.2 ){newt=colorNew;} } return newt; } float4 starry(float2 st : TEXCOORD0) : COLOR0 { // int BURST = 1; // Remind me to figure out how to compile things ps_3_0 PROPERLY (without modder's toolkit) so I can increase this a bunch. float2 ce = float2(.5,.5); float fP = uProgress; //float time = abs(sin(uProgress*0.5/PI)); //float2 st = gl_FragCoord.xy/u_resolution.xy; float3 color2=float3(0,0,0); float3 color =tex2D(uImage0, st).rgb; if(fP>50){ fP-=50; color2=color; color=float3(0,0,0); } float time = fP*0.07; float2 ef = st; ef=(ef-ce)/time + ce; ef = rotate(ef,PI); color=star(ef,color,color2); /*float separation = 1./(float(BURST)+1.); for(int i=0;iabs(.2*sin(st.y*PI+.5*PI)))color=tex2D(uImage0, ef).rgb; return float4(color,1.); } float4 columns_sudden_angled(float2 st : TEXCOORD0) : COLOR0 { float BURST=9.; float time=(uProgress+50.)/(10.*PI); float2 ce = float2(.5,.5); float3 color2=tex2D(uImage0, st).rgb; float3 color=float3(0,0,0); st = rotate(st, 0.25*PI); float ttime = ceil(time/(PI*2.) - .2)*PI*2.; float segment=ceil(BURST*(st.x+ttime))/BURST; st.y-=.4*sin(4.3*segment); float pause = abs(st.y-ce.y)+.3; if( .8*pausetime*0.02)return color2; return color; } float4 doors(float2 st : TEXCOORD0) : COLOR0 { float time=uProgress*0.01*PI; float2 ce = float2(.5,.5); float4 color2=tex2D(uImage0, st); float4 color=float4(0,0,0,0); if(.5-abs(st.x-ce.x)>0.5*sin(time))return color2; return color; } technique Technique1 { pass Lines {PixelShader = compile ps_2_0 lines();} pass Prideful {PixelShader = compile ps_2_0 prideful();} pass Loving {PixelShader = compile ps_2_0 heart();} pass Rising {PixelShader = compile ps_2_0 uparrow();} pass Falling {PixelShader = compile ps_2_0 downarrow();} pass Starry {PixelShader = compile ps_2_0 starry();} pass Winding {PixelShader = compile ps_2_0 columns_ordered();} pass Jaws {PixelShader = compile ps_2_0 columns_sudden();} pass Flooding {PixelShader = compile ps_2_0 water();} pass Wonder {PixelShader = compile ps_2_0 wonder();} pass Collapse {PixelShader = compile ps_2_0 columns_sudden_angled();} pass Circle {PixelShader = compile ps_2_0 circle();} pass Doors {PixelShader = compile ps_2_0 doors();} }