Created
May 4, 2016 14:26
-
-
Save ChristophHaag/5e9fd2b0c9f41aa91893aa94fce883da to your computer and use it in GitHub Desktop.
from the timeless: http://www.pouet.net/prod.php?which=62935
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Shader 97 source, checksum 0 */ | |
#version 430 | |
#line 12 | |
uniform layout(location=100) float cw;layout(location=200)uniform float jo=0;layout(location=201)uniform float cq=0;layout(location=0)uniform float t=0;layout(location=1)uniform vec3 bd=vec3(1,1,1);layout(location=2)uniform vec3 aad=vec3(1,1,1);layout(location=3)uniform float qr=200;layout(location=4)uniform float aac=0;layout(location=5)uniform float aec=0;in vec2 l;layout(binding=0)uniform sampler2D hi;layout(binding=1)uniform sampler2D hh;layout(binding=2)uniform sampler2D or;layout(location=0)out vec4 io;layout(location=1)out vec4 im;layout(location=2)out vec4 ip; | |
#line 1 145 | |
#define df 6.283185307 | |
float ai(vec3 c){c*=1.5;vec3 f=floor(c);vec4 a=dot(f,vec3(1,57,21))+vec4(0,57,21,78);vec3 p=cos((c-f)*acos(-1.))*-.5+.5;a=mix(sin(cos(a)*a),sin(cos(1+a)*(1+a)),p.x);a.xy=mix(a.xz,a.yw,p.y);return mix(a.x,a.y,p.z);}float ao(vec3 c){float r;c.xz=cos(1.)*c.xz+vec2(-sin(1.),sin(1.))*c.zx;r=ai(c*.06125)*.5;c.xy=cos(1.)*c.xy+vec2(-sin(1.),sin(1.))*c.yx;r+=ai(c*.125)*.25;c.zy=cos(1.)*c.zy+vec2(-sin(1.),sin(1.))*c.yz;r+=ai(c*.25)*.125;return r*1.14286;}int cu(in int d){return d=d<<13^d,d*(d*d*15731+789221)+1376312589&2147483647;}float jl(in float c){return float(cu(int(c)))/1.07374e+09-.5;}float bm(in vec3 c){ivec3 by=ivec3(floor(c));int d=by.x+by.y*57+by.z*113;return float(cu(d))/1.07374e+09-.5;}float bk(inout float c,float k){float aa=floor((c+k*.5)/k);c=mod(c+k*.5,k)-k*.5;return aa;}float gz(inout float c,float dist){float s=sign(c);c=abs(c)-dist;return s;}float dl(vec3 v){return max(max(v.x,v.y),v.z);}float em(vec2 v){return max(v.x,v.y);} | |
#define az(c,a)c=cos((a))*c+sin((a))*vec2(c.y,-c.x) | |
#define cj(c)c=0.7071*c+0.7071*vec2(c.y,-c.x) | |
#define ga(bb,s,v)mix(vec3(1.),clamp((abs(fract(bb+vec3(3.,2.,1.)/3.)*6.-3.)-1.),0.,1.),s)*v | |
float ep(float i,float j,float r){if(-i<r&&-j<r)return-(r-sqrt((r+i)*(r+i)+(r+j)*(r+j)));else return max(i,j);}float fi(float i,float j,float r){if(-i<r&&-j<r)return(i+r+j)*sqrt(.5);else return max(i,j);}float gd(float i,float j,float r,float d){d+=1;float h;if(i<r&&j<r){vec2 c=vec2(i,j);float aq=r*sqrt(2)/((d-1)*2+sqrt(2));h=100;cj(c);c.x-=sqrt(2)/2*r;c.x+=aq*sqrt(2);if(mod(d,2)==1)c.y+=aq;bk(c.y,aq*2);h=min(h,length(c)-aq);h=min(h,c.x);h=min(h,i);h=min(h,j);}else h=min(i,j);return h;} | |
#line 36 0 | |
void main(){float cq=clamp(cq,-.01,1.);vec3 ac=texelFetch(hi,ivec2(l*cw),0).xyz,ay=texelFetch(hh,ivec2(l*cw),0).xyz,cy=vec3(qr);if(jo>0)ac=vec3(bm(l.xxy*1439),bm(l.yxx*131),bm(l.yyx*1090))*10000,ac=mod(ac+cy,cy*2)-cy,ay=vec3(0.);ay+=aec*.01*(vec3(bm(l.xxy*1439+ac.xzy*13/qr),bm(l.yxx*131+ac.xyz*12/qr),bm(l.yyx*1090+ac.yzx*15/qr))-vec3(.5));ay*=.9;ac+=ay;ac=bd+mod(ac+cy-bd,cy*2)-cy;io=vec4(ac,1);im=vec4(ay,1);vec3 color=aad*max(0,1-aac*(.5+.5*jl(l.xxy*1439)));ip.xyz=color;} | |
/* Compile status: fail */ | |
/* Log Info: */ | |
0:36(446): error: no matching function for call to `jl(vec3)'; candidates are: | |
0:36(446): error: float jl(float) | |
0:36(443): error: operands to arithmetic operators must be numeric | |
0:36(440): error: operands to arithmetic operators must be numeric | |
0:36(435): error: operands to arithmetic operators must be numeric | |
0:36(433): error: operands to arithmetic operators must be numeric | |
0:36(427): error: no matching function for call to `max(int, error)'; candidates are: | |
0:36(427): error: float max(float, float) | |
0:36(427): error: float max(float, float) | |
0:36(427): error: vec2 max(vec2, float) | |
0:36(427): error: vec3 max(vec3, float) | |
0:36(427): error: vec4 max(vec4, float) | |
0:36(427): error: vec2 max(vec2, vec2) | |
0:36(427): error: vec3 max(vec3, vec3) | |
0:36(427): error: vec4 max(vec4, vec4) | |
0:36(427): error: int max(int, int) | |
0:36(427): error: ivec2 max(ivec2, int) | |
0:36(427): error: ivec3 max(ivec3, int) | |
0:36(427): error: ivec4 max(ivec4, int) | |
0:36(427): error: ivec2 max(ivec2, ivec2) | |
0:36(427): error: ivec3 max(ivec3, ivec3) | |
0:36(427): error: ivec4 max(ivec4, ivec4) | |
0:36(427): error: uint max(uint, uint) | |
0:36(427): error: uvec2 max(uvec2, uint) | |
0:36(427): error: uvec3 max(uvec3, uint) | |
0:36(427): error: uvec4 max(uvec4, uint) | |
0:36(427): error: uvec2 max(uvec2, uvec2) | |
0:36(427): error: uvec3 max(uvec3, uvec3) | |
0:36(427): error: uvec4 max(uvec4, uvec4) | |
0:36(427): error: double max(double, double) | |
0:36(427): error: dvec2 max(dvec2, double) | |
0:36(427): error: dvec3 max(dvec3, double) | |
0:36(427): error: dvec4 max(dvec4, double) | |
0:36(427): error: dvec2 max(dvec2, dvec2) | |
0:36(427): error: dvec3 max(dvec3, dvec3) | |
0:36(427): error: dvec4 max(dvec4, dvec4) | |
0:36(423): error: operands to arithmetic operators must be numeric | |
0:36(470): warning: `color' used uninitialized |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment