Skip to content

A Claude Code skill that reverse-engineers any animation frame by frame, then proves the copy moves the same.

16.0 KB
Raw Blame
// The WGSL of vercel.com/fluid's ocean renderer, exactly as it ships (minified there, kept that way here).
// Taken from the page's ocean worker chunk; see ocean.worker.js for how each module is used.

export const PARTICLES_DARK = "@group(0) @binding(0) var<uniform> u:_vgsl_160545d3__ParticleUniforms;@group(0) @binding(1) var u_displacement:texture_2d<f32>;@group(0) @binding(2) var u_normalFoam:texture_2d<f32>;fn b(a:u32)-> vec2f{switch(a&3u){case 0u:{return vec2f(-1.0,-1.0);}case 1u:{return vec2f(1.0,-1.0);}case 2u:{return vec2f(-1.0,1.0);}default:{return vec2f(1.0,1.0);}}}@vertex fn vs_main(@builtin(vertex_index) a:u32,@builtin(instance_index) c:u32,)-> _vgsl_160545d3__VertexOut{let d=max(1u,u32(u.viewport.w));let e=c%d;let f=c/d;let g=vec2f(f32(e),f32(f))/f32(d);let h=vec2u(e,f);let i=textureLoad(u_displacement,h,0).xyz*u.misc.x;let j=textureLoad(u_normalFoam,h,0);let k=u.simulation.x*0.5;let l=vec3f(g.x*u.simulation.x-k,0.0,g.y*u.simulation.x-k);let m=l+i;let n=u.view*vec4f(m,1.0);let viewDir=-n.xyz;let o=-n.z;let p=1.0-smoothstep(u.fade.x,u.fade.y,o);let fade=pow(clamp(p,0.0,1.0),u.fade.z);let q=u.projection*n;var r=q.xy/q.w;let s=u.viewport.x/max(u.viewport.y,1e-3);var t=vec2f(r.x*s,r.y);t=floor(t*u.fade.w)/u.fade.w;t.x/=s;r=t;let v=b(a);let A=2.0*u.misc.y*u.viewport.z;let B=v*(A/u.viewport.xy)*q.w;let C=vec4f(r*q.w+B,q.z,q.w);var D:_vgsl_160545d3__VertexOut;D.position=C;D.pointCoord=v*0.5+vec2f(0.5);D.foam=j.w;D.normal=j.xyz;D.viewDir=viewDir;D.height=i.y;D.fade=fade;return D;}@fragment fn fs_main(a:_vgsl_160545d3__VertexOut)-> @location(0) vec4f{let c=a.pointCoord-vec2f(0.5);let d=dot(c,c);if(d>0.25){discard;}let e=normalize(a.normal);let f=normalize(a.viewDir);let g=pow(1.0-clamp(dot(e,f),0.0,1.0),5.0);let foam=clamp(a.foam,0.0,1.0);let h=smoothstep(-0.5,1.5,a.height);if(u.misc.z>0.5){let i=mix(u.neonColor.rgb,u.foamColor.rgb,foam);var j=0.06+h*0.42+g*0.12;j=mix(j,0.9,foam);j*=a.fade;return vec4f(i,clamp(j,0.0,1.0));}var k=u.oceanColor.rgb*0.5;k+=u.neonColor.rgb*h*0.5;k+=u.neonColor.rgb*g*0.15;k=mix(k,u.foamColor.rgb,foam);var l=0.02+h*0.06+g*0.04;l=mix(l,1.0,foam);k*=a.fade;l*=a.fade;return vec4f(k,clamp(l,0.0,1.0));}struct _vgsl_160545d3__ParticleUniforms{view:mat4x4f,projection:mat4x4f,viewport:vec4f,simulation:vec4f,fade:vec4f,oceanColor:vec4f,neonColor:vec4f,foamColor:vec4f,misc:vec4f,};struct _vgsl_160545d3__VertexOut{@builtin(position) position:vec4f,@location(0) pointCoord:vec2f,@location(1) foam:f32,@location(2) normal:vec3f,@location(3) viewDir:vec3f,@location(4) height:f32,@location(5) fade:f32,};";

export const PARTICLES_LIGHT = "const _vgsl_0eaa7f74__LIGHT_ALPHA_BASE:f32=0.06;const _vgsl_0eaa7f74__LIGHT_ALPHA_CREST:f32=0.18;const _vgsl_0eaa7f74__LIGHT_ALPHA_FRESNEL:f32=0.12;const _vgsl_0eaa7f74__LIGHT_ALPHA_FOAM:f32=0.85;@group(0) @binding(0) var<uniform> u:_vgsl_160545d3__ParticleUniforms;@group(0) @binding(1) var u_displacement:texture_2d<f32>;@group(0) @binding(2) var u_normalFoam:texture_2d<f32>;@vertex fn vs_main(@builtin(vertex_index) f:u32,@builtin(instance_index) i:u32,)-> _vgsl_160545d3__VertexOut{return b(u,u_displacement,u_normalFoam,f,i);}@fragment fn fs_main(f:_vgsl_160545d3__VertexOut)-> @location(0) vec4f{if(c(f.pointCoord)){discard;}let i=d(f.normal,f.viewDir);let j=e(f.height);let foam=g(f.foam);var k=_vgsl_0eaa7f74__LIGHT_ALPHA_BASE+j*_vgsl_0eaa7f74__LIGHT_ALPHA_CREST+i*_vgsl_0eaa7f74__LIGHT_ALPHA_FRESNEL;k=mix(k,_vgsl_0eaa7f74__LIGHT_ALPHA_FOAM,foam);k*=f.fade*h(f.position,u.viewport.xy);return vec4f(0.0,0.0,0.0,clamp(k,0.0,1.0));}struct _vgsl_160545d3__ParticleUniforms{view:mat4x4f,projection:mat4x4f,viewport:vec4f,simulation:vec4f,fade:vec4f,oceanColor:vec4f,neonColor:vec4f,foamColor:vec4f,misc:vec4f,};struct _vgsl_160545d3__VertexOut{@builtin(position) position:vec4f,@location(0) pointCoord:vec2f,@location(1) foam:f32,@location(2) normal:vec3f,@location(3) viewDir:vec3f,@location(4) height:f32,@location(5) fade:f32,};fn a(f:u32)-> vec2f{switch(f&3u){case 0u:{return vec2f(-1.0,-1.0);}case 1u:{return vec2f(1.0,-1.0);}case 2u:{return vec2f(-1.0,1.0);}default:{return vec2f(1.0,1.0);}}}fn b(f:_vgsl_160545d3__ParticleUniforms,i:texture_2d<f32>,j:texture_2d<f32>,k:u32,l:u32,)-> _vgsl_160545d3__VertexOut{let m=max(1u,u32(f.viewport.w));let n=l%m;let o=l/m;let p=vec2f(f32(n),f32(o))/f32(m);let q=vec2u(n,o);let r=textureLoad(i,q,0).xyz*f.misc.x;let s=textureLoad(j,q,0);let t=f.simulation.x*0.5;let v=vec3f(p.x*f.simulation.x-t,0.0,p.y*f.simulation.x-t);let A=v+r;let B=f.view*vec4f(A,1.0);let viewDir=-B.xyz;let C=-B.z;let D=1.0-smoothstep(f.fade.x,f.fade.y,C);let fade=pow(clamp(D,0.0,1.0),f.fade.z);let E=f.projection*B;var F=E.xy/E.w;let G=f.viewport.x/max(f.viewport.y,1e-3);var H=vec2f(F.x*G,F.y);H=floor(H*f.fade.w)/f.fade.w;H.x/=G;F=H;let I=a(k);let J=2.0*f.misc.y*f.viewport.z;let K=I*(J/f.viewport.xy)*E.w;let L=vec4f(F*E.w+K,E.z,E.w);var M:_vgsl_160545d3__VertexOut;M.position=L;M.pointCoord=I*0.5+vec2f(0.5);M.foam=s.w;M.normal=s.xyz;M.viewDir=viewDir;M.height=r.y;M.fade=fade;return M;}fn c(f:vec2f)-> bool{let i=f-vec2f(0.5);let j=dot(i,i);return j>0.25;}fn d(f:vec3f,i:vec3f)-> f32{let j=normalize(f);let k=normalize(i);return pow(1.0-clamp(dot(j,k),0.0,1.0),5.0);}fn e(f:f32)-> f32{return smoothstep(-0.5,1.5,f);}fn g(f:f32)-> f32{return clamp(f,0.0,1.0);}fn h(f:vec4f,i:vec2f)-> f32{let j=f.xy/max(i,vec2f(1.0));return 1.0-smoothstep(0.62,0.98,j.y);}";

export const BLOOM_BRIGHT = "struct VSOut{@builtin(position) pos:vec4f,@location(0) uv:vec2f,};struct BrightUniforms{luminosityThreshold:f32,smoothWidth:f32,_pad0:vec2f,};@group(0) @binding(0) var<uniform> uniforms:BrightUniforms;@group(0) @binding(1) var tDiffuse:texture_2d<f32>;@group(0) @binding(2) var linearSampler:sampler;@vertex fn vs_main(@builtin(vertex_index) a:u32)-> VSOut{var b=array<vec2f,3>(vec2f(-1.0,-3.0),vec2f(-1.0,1.0),vec2f(3.0,1.0));var c:VSOut;c.pos=vec4f(b[a],0.0,1.0);c.uv=b[a]*0.5+vec2f(0.5);return c;}fn luminance(a:vec3f)-> f32{return dot(a,vec3f(0.299,0.587,0.114));}@fragment fn fs_main(a:VSOut)-> @location(0) vec4f{let b=textureSample(tDiffuse,linearSampler,a.uv);let c=luminance(b.xyz);let d=vec4f(vec3f(0.0),0.0);let e=smoothstep(uniforms.luminosityThreshold,uniforms.luminosityThreshold+uniforms.smoothWidth,c);return mix(d,b,e);}";

export const BLOOM_BLUR = "override KERNEL_RADIUS:u32=6u;struct VSOut{@builtin(position) pos:vec4f,@location(0) uv:vec2f,};struct BlurUniforms{direction:vec2f,invSize:vec2f,gaussianCoefficients0:vec4f,gaussianCoefficients1:vec4f,gaussianCoefficients2:vec4f,gaussianCoefficients3:vec4f,gaussianCoefficients4:vec4f,gaussianCoefficients5:vec4f,};@group(0) @binding(0) var<uniform> uniforms:BlurUniforms;@group(0) @binding(1) var colorTexture:texture_2d<f32>;@group(0) @binding(2) var linearSampler:sampler;@vertex fn vs_main(@builtin(vertex_index) a:u32)-> VSOut{var b=array<vec2f,3>(vec2f(-1.0,-3.0),vec2f(-1.0,1.0),vec2f(3.0,1.0));var c:VSOut;c.pos=vec4f(b[a],0.0,1.0);c.uv=b[a]*0.5+vec2f(0.5);return c;}fn coefficient(a:u32)-> f32{let b=array<f32,24>(uniforms.gaussianCoefficients0 .x,uniforms.gaussianCoefficients0 .y,uniforms.gaussianCoefficients0 .z,uniforms.gaussianCoefficients0 .w,uniforms.gaussianCoefficients1 .x,uniforms.gaussianCoefficients1 .y,uniforms.gaussianCoefficients1 .z,uniforms.gaussianCoefficients1 .w,uniforms.gaussianCoefficients2 .x,uniforms.gaussianCoefficients2 .y,uniforms.gaussianCoefficients2 .z,uniforms.gaussianCoefficients2 .w,uniforms.gaussianCoefficients3 .x,uniforms.gaussianCoefficients3 .y,uniforms.gaussianCoefficients3 .z,uniforms.gaussianCoefficients3 .w,uniforms.gaussianCoefficients4 .x,uniforms.gaussianCoefficients4 .y,uniforms.gaussianCoefficients4 .z,uniforms.gaussianCoefficients4 .w,uniforms.gaussianCoefficients5 .x,uniforms.gaussianCoefficients5 .y,uniforms.gaussianCoefficients5 .z,uniforms.gaussianCoefficients5 .w);return b[a];}@fragment fn fs_main(a:VSOut)-> @location(0) vec4f{var b=coefficient(0u);var c=textureSample(colorTexture,linearSampler,a.uv).rgb*b;for(var d=1u;d<KERNEL_RADIUS;d=d+1u){let e=f32(d);let f=coefficient(d);let g=uniforms.direction*uniforms.invSize*e;let h=textureSample(colorTexture,linearSampler,a.uv+g).rgb;let i=textureSample(colorTexture,linearSampler,a.uv-g).rgb;c=c+(h+i)*f;}return vec4f(c,1.0);}";

export const BLOOM_COMPOSITE = "struct VSOut{@builtin(position) pos:vec4f,@location(0) uv:vec2f,};struct CompositeUniforms{bloomStrength:f32,bloomRadius:f32,_pad0:vec2f,bloomFactors0:vec4f,bloomFactors1:vec4f,};@group(0) @binding(0) var<uniform> uniforms:CompositeUniforms;@group(0) @binding(1) var blurTexture1:texture_2d<f32>;@group(0) @binding(2) var blurTexture2:texture_2d<f32>;@group(0) @binding(3) var blurTexture3:texture_2d<f32>;@group(0) @binding(4) var blurTexture4:texture_2d<f32>;@group(0) @binding(5) var blurTexture5:texture_2d<f32>;@group(0) @binding(6) var linearSampler:sampler;@vertex fn vs_main(@builtin(vertex_index) a:u32)-> VSOut{var b=array<vec2f,3>(vec2f(-1.0,-3.0),vec2f(-1.0,1.0),vec2f(3.0,1.0));var c:VSOut;c.pos=vec4f(b[a],0.0,1.0);c.uv=b[a]*0.5+vec2f(0.5);return c;}fn factor(a:u32)-> f32{let b=array<f32,8>(uniforms.bloomFactors0 .x,uniforms.bloomFactors0 .y,uniforms.bloomFactors0 .z,uniforms.bloomFactors0 .w,uniforms.bloomFactors1 .x,uniforms.bloomFactors1 .y,uniforms.bloomFactors1 .z,uniforms.bloomFactors1 .w);return b[a];}fn lerpBloomFactor(a:f32)-> f32{let b=1.2-a;return mix(a,b,uniforms.bloomRadius);}@fragment fn fs_main(a:VSOut)-> @location(0) vec4f{let c=3.0*uniforms.bloomStrength*(lerpBloomFactor(factor(0u))*textureSample(blurTexture1,linearSampler,a.uv).rgb+lerpBloomFactor(factor(1u))*textureSample(blurTexture2,linearSampler,a.uv).rgb+lerpBloomFactor(factor(2u))*textureSample(blurTexture3,linearSampler,a.uv).rgb+lerpBloomFactor(factor(3u))*textureSample(blurTexture4,linearSampler,a.uv).rgb+lerpBloomFactor(factor(4u))*textureSample(blurTexture5,linearSampler,a.uv).rgb);let d=max(c.r,max(c.g,c.b));return vec4f(c,d);}";

export const PRESENT = "struct VSOut{@builtin(position) pos:vec4f,@location(0) uv:vec2f,};@group(0) @binding(0) var sceneHDR:texture_2d<f32>;@group(0) @binding(1) var bloomTexture:texture_2d<f32>;@group(0) @binding(2) var linearSampler:sampler;@vertex fn vs_main(@builtin(vertex_index) a:u32)-> VSOut{var b=array<vec2f,3>(vec2f(-1.0,-3.0),vec2f(-1.0,1.0),vec2f(3.0,1.0));var c:VSOut;c.pos=vec4f(b[a],0.0,1.0);c.uv=vec2f(b[a].x*0.5+0.5,0.5-b[a].y*0.5);return c;}fn LinearTosRGB(b:vec4f)-> vec4f{let c=b.rgb*12.92;let d=1.055*pow(b.rgb,vec3f(0.41666))-vec3f(0.055);let rgb=select(d,c,b.rgb<=vec3f(0.0031308));return vec4f(rgb,b.a);}@fragment fn fs_main(b:VSOut)-> @location(0) vec4f{let c=textureSample(sceneHDR,linearSampler,b.uv);let d=textureSample(bloomTexture,linearSampler,b.uv);return LinearTosRGB(vec4f(c.rgb+d.rgb,max(c.a,d.a)));}";

export const INITIAL_SPECTRUM = "struct _vgsl_0b67735c__InitialSpectrumUniforms{resolution:f32,size:f32,windSpeed:f32,windAngle:f32,amplitude:f32,};@group(0) @binding(0) var<uniform> u:_vgsl_0b67735c__InitialSpectrumUniforms;@group(0) @binding(1) var u_noise:texture_2d<f32>;struct _vgsl_0b67735c__VSOut{@builtin(position) pos:vec4f};@vertex fn vs_main(@builtin(vertex_index) c:u32)-> _vgsl_0b67735c__VSOut{var d:_vgsl_0b67735c__VSOut;d.pos=b(c);return d;}fn a(c:vec2f)-> f32{let d=dot(c,c);if(d<1e-8){return 0.0;}let e=vec2f(cos(u.windAngle),sin(u.windAngle));let f=(u.windSpeed*u.windSpeed)/_vgsl_6774a90b__G;let g=dot(normalize(c),e);var h=u.amplitude*exp(-1.0/(d*f*f))/(d*d)*(g*g);let i=f*0.001;h*=exp(-d*i*i);if(g<0.0){h*=0.07;}return h;}@fragment fn fs_main(c:_vgsl_0b67735c__VSOut)-> @location(0) vec4f{let d=c.pos.xy-vec2f(0.5);let e=select(d.x-u.resolution,d.x,d.x<u.resolution*0.5);let f=select(d.y-u.resolution,d.y,d.y<u.resolution*0.5);let g=(2.0*_vgsl_6774a90b__PI/u.size)*vec2f(e,f);let h=textureLoad(u_noise,vec2u(d),0);let i=(1.0/sqrt(2.0))*vec2f(h.x,h.y)*sqrt(a(g));let j=(1.0/sqrt(2.0))*vec2f(h.z,h.w)*sqrt(a(-g));return vec4f(i,j.x,-j.y);}const _vgsl_6774a90b__PI:f32=3.141592653589793;const _vgsl_6774a90b__G:f32=9.81;fn b(c:u32)-> vec4f{var d=array<vec2f,3>(vec2f(-1.0,-3.0),vec2f(-1.0,1.0),vec2f(3.0,1.0));return vec4f(d[c],0.0,1.0);}";

export const SPECTRUM = "struct _vgsl_339025fa__SpectrumUniforms{resolution:f32,size:f32,time:f32,choppiness:f32,};@group(0) @binding(0) var<uniform> u:_vgsl_339025fa__SpectrumUniforms;@group(0) @binding(1) var u_initialSpectrum:texture_2d<f32>;struct _vgsl_339025fa__VSOut{@builtin(position) pos:vec4f};@vertex fn vs_main(@builtin(vertex_index) a:u32)-> _vgsl_339025fa__VSOut{var b:_vgsl_339025fa__VSOut;b.pos=d(a);return b;}@fragment fn fs_main(a:_vgsl_339025fa__VSOut)-> @location(0) vec4f{let b=a.pos.xy-vec2f(0.5);let e=select(b.x-u.resolution,b.x,b.x<u.resolution*0.5);let f=select(b.y-u.resolution,b.y,b.y<u.resolution*0.5);let g=(2.0*_vgsl_6774a90b__PI/u.size)*vec2f(e,f);let h=length(g);let i=textureLoad(u_initialSpectrum,vec2u(b),0);let j=sqrt(_vgsl_6774a90b__G*h)*u.time;let k=vec2f(cos(j),sin(j));let l=vec2f(cos(j),-sin(j));let m=c(i.rg,k)+c(i.ba,l);var n=vec2f(0.0);if(h>0.0){n=g/h;}let o=vec2f(m.y,-m.x);let p=o*n.x*u.choppiness;let q=o*n.y*u.choppiness;let r=vec2f(p.x-m.y,p.y+m.x);let s=q;return vec4f(r,s);}const _vgsl_6774a90b__PI:f32=3.141592653589793;const _vgsl_6774a90b__G:f32=9.81;fn c(a:vec2f,b:vec2f)-> vec2f{return vec2f(a.x*b.x-a.y*b.y,a.x*b.y+a.y*b.x);}fn d(a:u32)-> vec4f{var b=array<vec2f,3>(vec2f(-1.0,-3.0),vec2f(-1.0,1.0),vec2f(3.0,1.0));return vec4f(b[a],0.0,1.0);}";

export const IFFT_STAGE = "override IFFT_HORIZONTAL:u32=1u;struct _vgsl_860df637__IfftStageUniforms{resolution:f32,subtransformSize:f32,horizontal:f32,};@group(0) @binding(0) var<uniform> u:_vgsl_860df637__IfftStageUniforms;@group(0) @binding(1) var u_input:texture_2d<f32>;struct _vgsl_860df637__VSOut{@builtin(position) pos:vec4f};@vertex fn vs_main(@builtin(vertex_index) a:u32)-> _vgsl_860df637__VSOut{var b:_vgsl_860df637__VSOut;b.pos=f(a);return b;}@fragment fn fs_main(a:_vgsl_860df637__VSOut)-> @location(0) vec4f{let b=i32(u.resolution);let g=IFFT_HORIZONTAL==1u;let h=select(a.pos.y-0.5,a.pos.x-0.5,g);let i=floor(h/u.subtransformSize)*(u.subtransformSize*0.5)+(h%(u.subtransformSize*0.5));let j=select(vec2i(i32(a.pos.x-0.5),i32(i)),vec2i(i32(i),i32(a.pos.y-0.5)),g,);let k=select(vec2i(i32(a.pos.x-0.5),i32(i+u.resolution*0.5)),vec2i(i32(i+u.resolution*0.5),i32(a.pos.y-0.5)),g,);let l=e(u_input,j,b);let m=e(u_input,k,b);let n=2.0*_vgsl_6774a90b__PI*(h/u.subtransformSize);let o=vec2f(cos(n),sin(n));let p=l.xy+c(o,m.xy);let q=l.zw+c(o,m.zw);return vec4f(p,q);}const _vgsl_6774a90b__PI:f32=3.141592653589793;fn c(a:vec2f,b:vec2f)-> vec2f{return vec2f(a.x*b.x-a.y*b.y,a.x*b.y+a.y*b.x);}fn d(a:vec2i,b:i32)-> vec2u{let g=(a%vec2i(b)+vec2i(b))%vec2i(b);return vec2u(g);}fn e(a:texture_2d<f32>,b:vec2i,g:i32)-> vec4f{return textureLoad(a,d(b,g),0);}fn f(a:u32)-> vec4f{var b=array<vec2f,3>(vec2f(-1.0,-3.0),vec2f(-1.0,1.0),vec2f(3.0,1.0));return vec4f(b[a],0.0,1.0);}";

export const NORMAL_FOAM = "struct _vgsl_c962e6e6__NormalFoamUniforms{resolution:f32,worldSize:f32,displacementScale:f32,choppiness:f32,foamThreshold:f32,};@group(0) @binding(0) var<uniform> u:_vgsl_c962e6e6__NormalFoamUniforms;@group(0) @binding(1) var u_displacement:texture_2d<f32>;struct _vgsl_c962e6e6__VSOut{@builtin(position) pos:vec4f};@vertex fn vs_main(@builtin(vertex_index) b:u32)-> _vgsl_c962e6e6__VSOut{var c:_vgsl_c962e6e6__VSOut;c.pos=e(b);return c;}@fragment fn fs_main(b:_vgsl_c962e6e6__VSOut)-> @location(0) vec4f{let c=i32(u.resolution);let f=vec2i(b.pos.xy-vec2f(0.5));let g=u.worldSize/u.resolution;let h=d(u_displacement,f,c).xyz*u.displacementScale;let i=d(u_displacement,f+vec2i(1,0),c).xyz*u.displacementScale;let j=d(u_displacement,f-vec2i(1,0),c).xyz*u.displacementScale;let k=d(u_displacement,f+vec2i(0,1),c).xyz*u.displacementScale;let l=d(u_displacement,f-vec2i(0,1),c).xyz*u.displacementScale;let m=(i.y-j.y)/(2.0*g);let n=(k.y-l.y)/(2.0*g);let o=normalize(vec3f(-m,1.0,-n));let p=(i.x-j.x)/(2.0*g);let q=(k.z-l.z)/(2.0*g);let r=(k.x-l.x)/(2.0*g);let s=(i.z-j.z)/(2.0*g);let t=(1.0+p)*(1.0+q)-r*s;let v=1.0-smoothstep(u.foamThreshold,u.foamThreshold+0.8,t);return vec4f(o,v);}fn a(b:vec2i,c:i32)-> vec2u{let f=(b%vec2i(c)+vec2i(c))%vec2i(c);return vec2u(f);}fn d(b:texture_2d<f32>,c:vec2i,f:i32)-> vec4f{return textureLoad(b,a(c,f),0);}fn e(b:u32)-> vec4f{var c=array<vec2f,3>(vec2f(-1.0,-3.0),vec2f(-1.0,1.0),vec2f(3.0,1.0));return vec4f(c[b],0.0,1.0);}";