Skip to content

Commit

Permalink
Even better formatting of floats
Browse files Browse the repository at this point in the history
Properly use the exponential notation when it's shorter.
  • Loading branch information
laurentlb committed Jan 12, 2022
1 parent 3793410 commit 3ac5816
Show file tree
Hide file tree
Showing 11 changed files with 75 additions and 38 deletions.
12 changes: 7 additions & 5 deletions src/printer.fs
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,15 @@ module private PrinterImpl =
let floatToS f =
let si = if f < 0.M then "-" else ""
let f = abs (float f)
let str = f.ToString("g", System.Globalization.CultureInfo.InvariantCulture)
let str = if str.EndsWith(".0") then str.[0..str.Length-2] else str

if Regex.Match(str, "^\\d+$").Success then
let str1 = f.ToString("#.################", System.Globalization.CultureInfo.InvariantCulture)
let str2 = f.ToString("0.################e0", System.Globalization.CultureInfo.InvariantCulture)
let str = [str1; str2] |> List.minBy(fun x -> x.Length)

if str = "" then
"0."
elif Regex.Match(str, "^\\d+$").Success then
si + str + "." // display "3." instead of "3"
elif str.[0] = '0' && str.Length > 2 then
si + (str.[1..]) // display ".5" instead of "0.5"
else
si + str

Expand Down
2 changes: 1 addition & 1 deletion tests/real/disco.expected
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
* http://www.ctrl-alt-test.fr
*/

var disco_frag = `uniform vec2 resolution;uniform float time;uniform sampler2D tex0,tex1,tex2,tex3;vec4 s(vec2 px,float z){float l=3.1415,k=time*sign(z),x=px.x*320.*.0065*z,y=px.y*240.*.006*z,c=sqrt(x*x+y*y);if(c>1.)return vec4(0.);else{float u=-.4*sign(z)+sin(k*.05),v=sqrt(1.-x*x-y*y),q=y*sin(u)-v*cos(u);y=y*cos(u)+v*sin(u);v=acos(y);u=acos(x/sin(v))/(2.*l)*120.*sign(q)-k;v=v*60./l;q=cos(floor(v/l));c=pow(abs(cos(u)*sin(v)),.2)*.1/(q+sin(float(int((u+l/2.)/l))+k*.6+cos(q*25.)))*pow(1.-c,.9);vec4 res;if(c<0.)res=vec4(-c/2.*abs(cos(k*.1)),0.,-c*2.*abs(sin(k*.04)),1.);else res=vec4(c,c*2.,c*2.,1.);return res;}}void main(){vec2 p=-1.+2.*gl_FragCoord.xy/resolution.xy;vec4 c=vec4(0.);for(int i=80;i>0;i--)c+=s(p,1.-float(i)/80.)*(.008-float(i)*5e-05);vec4 d=s(p,1.);gl_FragColor=(d.w==0.?s(p,-.2)*.02:d)+sqrt(c);}`
var disco_frag = `uniform vec2 resolution;uniform float time;uniform sampler2D tex0,tex1,tex2,tex3;vec4 s(vec2 px,float z){float l=3.1415,k=time*sign(z),x=px.x*320.*.0065*z,y=px.y*240.*.006*z,c=sqrt(x*x+y*y);if(c>1.)return vec4(0.);else{float u=-.4*sign(z)+sin(k*.05),v=sqrt(1.-x*x-y*y),q=y*sin(u)-v*cos(u);y=y*cos(u)+v*sin(u);v=acos(y);u=acos(x/sin(v))/(2.*l)*120.*sign(q)-k;v=v*60./l;q=cos(floor(v/l));c=pow(abs(cos(u)*sin(v)),.2)*.1/(q+sin(float(int((u+l/2.)/l))+k*.6+cos(q*25.)))*pow(1.-c,.9);vec4 res;if(c<0.)res=vec4(-c/2.*abs(cos(k*.1)),0.,-c*2.*abs(sin(k*.04)),1.);else res=vec4(c,c*2.,c*2.,1.);return res;}}void main(){vec2 p=-1.+2.*gl_FragCoord.xy/resolution.xy;vec4 c=vec4(0.);for(int i=80;i>0;i--)c+=s(p,1.-float(i)/80.)*(.008-float(i)*5e-5);vec4 d=s(p,1.);gl_FragColor=(d.w==0.?s(p,-.2)*.02:d)+sqrt(c);}`
2 changes: 1 addition & 1 deletion tests/real/elevated.hlsl.expected
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ const char *elevated_hlsl =
"float3 w=normalize(mul(z,float4(f.x*2-1,-f.y*2+1,1,1)));"
"float2 s=w.xz/w.y;"
"float c=(2*s.y+1000)%8;"
"float3 r=float3(.55,.65,.75)+.1*D(s+t[3].w*.2,10)+.5*pow(1-w.y,8)+pow(saturate(mul(w,t[3])),16)*float3(.4,.3,.1)+float4(1+.4*c,2,3+.5*c,0)*(1-cos(12.5664*s.y))*saturate(1-abs(s.y)/10-abs(s.x+t[5+c].x*.0012-8)/20)*exp(-t[5+c].x*.0002);"
"float3 r=float3(.55,.65,.75)+.1*D(s+t[3].w*.2,10)+.5*pow(1-w.y,8)+pow(saturate(mul(w,t[3])),16)*float3(.4,.3,.1)+float4(1+.4*c,2,3+.5*c,0)*(1-cos(12.5664*s.y))*saturate(1-abs(s.y)/10-abs(s.x+t[5+c].x*.0012-8)/20)*exp(-t[5+c].x*2e-4);"
"if(y.w>.5)"
"{"
"float p=length(y.xyz-t[4].xyz),d=t[1].w-y.y;"
Expand Down
2 changes: 1 addition & 1 deletion tests/real/kinder_painter.expected
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
"}"
"float intersect(in vec3 ro,in vec3 rd,out vec4 obj,out vec4 col)"
"{"
"float tmin=10000.,t;"
"float tmin=1e4,t;"
"col.w=-1.;"
"bool isok;"
"t=esfera(fpar00[0],ro,rd);"
Expand Down
4 changes: 2 additions & 2 deletions tests/real/leizex.expected
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ _leizex_frag:
db '}'
db 'vec3 calcNormal(in vec3 pos)'
db '{'
db 'float kk,eps=.0002;'
db 'float kk,eps=2e-4;'
db 'vec3 nor=vec3(map(pos+vec3(eps,0.,0.),kk)-map(pos-vec3(eps,0.,0.),kk),map(pos+vec3(0.,eps,0.),kk)-map(pos-vec3(0.,eps,0.),kk),map(pos+vec3(0.,0.,eps),kk)-map(pos-vec3(0.,0.,eps),kk));'
db 'return normalize(nor);'
db '}'
Expand All @@ -75,7 +75,7 @@ _leizex_frag:
db '}'
db 'vec3 addbump(in vec3 nor,float bumpa,in vec3 x)'
db '{'
db 'float ke=.0005,kk=fbm(256.*x);'
db 'float ke=5e-4,kk=fbm(256.*x);'
db 'vec3 xnor=vec3(fbm(256.*(x+vec3(ke,0.,0.)))-kk,fbm(256.*(x+vec3(0.,ke,0.)))-kk,fbm(256.*(x+vec3(0.,0.,ke)))-kk);'
db 'return normalize(nor+bumpa*xnor);'
db '}'
Expand Down
14 changes: 7 additions & 7 deletions tests/real/lunaquatic.frag.expected
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const char *lunaquatic_frag =
"uniform float m;"
"vec4 f;"
"vec3 y,s,x,i;"
"float r,w,c,n=.0001;"
"float r,w,c,n=1e-4;"
"float e(float v)"
"{"
"return clamp(v,0.,1.);"
Expand Down Expand Up @@ -46,7 +46,7 @@ const char *lunaquatic_frag =
"}"
"float h(vec2 v)"
"{"
"v=mod(v,1000.);"
"v=mod(v,1e3);"
"vec2 z=fract(v);"
"v-=z;"
"vec2 x=z*z*(3.-2.*z);"
Expand Down Expand Up @@ -194,20 +194,20 @@ const char *lunaquatic_frag =
"x=vec3(0.,.25,0.);"
"float l=v.z;"
"if(l<16.)"
"l=e(l,0.,16.),l=1.-pow(1.-l,2.),y=vec3(-400.,100.-l*450.,1000.),l=(l-1.)*.7,i=t(i,-l);"
"l=e(l,0.,16.),l=1.-pow(1.-l,2.),y=vec3(-400.,100.-l*450.,1e3),l=(l-1.)*.7,i=t(i,-l);"
"else"
" if(l<32.)"
"l=e(l,16.,32.),l=1.-pow(1.-l,2.),y=vec3(-400.,-350.+l*600.,1000.),x.y-=l*.1;"
"l=e(l,16.,32.),l=1.-pow(1.-l,2.),y=vec3(-400.,-350.+l*600.,1e3),x.y-=l*.1;"
"else"
" if(l<40.)"
"y=vec3(-400.,250.,1000.),x.y-=.1;"
"y=vec3(-400.,250.,1e3),x.y-=.1;"
"else"
" if(l<64.)"
"{"
"int h=int((l-40.)/6.);"
"if(h>=3)"
"f.w=1.;"
"y=vec3(-400.,min(250.,p(t(vec2(h,2)))*400.),1000.);"
"y=vec3(-400.,min(250.,p(t(vec2(h,2)))*400.),1e3);"
"x.xz+=vec2(.1,20.)*vec2(t(vec2(h,5.)),t(vec2(h,7.)));"
"x=mix(x+vec3(.008)*abs(vec3(t(vec2(h,8.)),0.,t(vec2(h,10.)))),x+vec3(.75)*abs(vec3(t(vec2(h,11.)),0.,t(vec2(h,13.)))),l-40.-float(h));"
"x.y=.2;"
Expand All @@ -216,7 +216,7 @@ const char *lunaquatic_frag =
"else"
"{"
"f.w=1.;"
"y=vec3(-400.,p(sin(l+10.))*250.,1000.);"
"y=vec3(-400.,p(sin(l+10.))*250.,1e3);"
"float h=smoothstep(118.,120.,l);"
"x.xz=f.xz+mix(vec2(sin(l*.6),cos(l*.6))*mix(sin(l*1.5+10.)+2.,2.,h),vec2(0.,2.+.75*(l-w)),smoothstep(-1.,1.,l-w));"
"x.y=mix(p(sin(l*3.)*(1.-h))*.3,0.,smoothstep(-1.,1.,l-w))+.2;"
Expand Down
6 changes: 3 additions & 3 deletions tests/real/mandelbulb.expected
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ const char *mandelbulb_frag =
"for(float g=s.x;g<s.y;)"
"{"
"vec3 p=v+x*g;"
"float d=clamp(.001*g*m,1e-06,.005),l=d*.1;"
"float d=clamp(.001*g*m,1e-6,.005),l=d*.1;"
"vec4 u;"
"float a;"
"if(f(p,a,n))"
Expand All @@ -96,7 +96,7 @@ const char *mandelbulb_frag =
"vec3 c=vec3(s*sin(6.28318*time/20.),.3-.4*sin(6.28318*time/20.),s*cos(6.28318*time/20.)),p=vec3(0.,.1,0.),l=normalize(p-c),u=vec3(0.,1.,0.),g=normalize(cross(l,u)),m=normalize(cross(g,l)),e=normalize(x.x*g+x.y*m+1.5*l),a,z;"
"vec4 t;"
"float q;"
"if(!f(c,e,q,1e+20,a,t,i))"
"if(!f(c,e,q,1e20,a,t,i))"
"z=1.3*vec3(1.,.98,.9)*(.7+.3*e.y);"
"else"
"{"
Expand All @@ -109,7 +109,7 @@ const char *mandelbulb_frag =
"vec3 r;"
"vec4 F;"
"if(d>.001)"
"if(f(n,y,b,1e+20,r,F,i))"
"if(f(n,y,b,1e20,r,F,i))"
"d=.1;"
"z=vec3(1.,1.,1.);"
"z=mix(z,vec3(.8,.6,.2),sqrt(t.x)*1.25);"
Expand Down
22 changes: 11 additions & 11 deletions tests/real/the_real_party_is_in_your_pocket.frag.expected
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,14 @@ const char *the_real_party_is_in_your_pocket_frag =
"}"
"float m(in vec2 m,in vec2 v,in vec2 l,in vec2 y)"
"{"
"float a=10000.,x;"
"float a=1e4,x;"
"for(int i=0;i<16;++i)"
"x=float(i)/15.,a=min(a,length(m-mix(mix(v,l,x),mix(l,y,x),x)));"
"return a;"
"}"
"float n(vec2 m)"
"{"
"float l=10000.;"
"float l=1e4;"
"m.x-=m.y*.11;"
"vec2 i=m-vec2(-.26,0);"
"i.x=min(-i.x,0.);"
Expand Down Expand Up @@ -71,7 +71,7 @@ const char *the_real_party_is_in_your_pocket_frag =
"}"
"float v(vec2 l)"
"{"
"return l*=1.05,max(max(min(min(min(v(max(min(min(max(min(min(min(min(max(min(min(max(max(min(length((l-vec2(-.11,.01))*vec2(1,1.3))-.016,length(vec2(l.x+.11,max(0.,abs(l.y+.02)-.009))*vec2(.8,1.))-.013),-(length(vec2(l.x+.112,max(0.,abs(l.y-.009)-.004)))-.005)),-(length(vec2(l.x+.112,max(0.,abs(l.y+.015)-.007)))-.005)),v(l-vec2(-.122,0),vec2(.007,.022))),max(-(length(vec2(l.x+.074,max(0.,abs(l.y+.006)-.006)))-.005),length((l-vec2(-.074,-.006))*vec2(.9,1))-.015)),-v(l-vec2(-.06,-.008),vec2(.01,.002))),v(l-vec2(-.075,-.0039),vec2(.01,.002))),v(vec2(abs(l.x+.037)-.01-l.y/2.2,l.y+.006),vec2(.006,.015))),v(l-vec2(-.006,0),vec2(.007,.022))),v(l-vec2(.045,0),vec2(.007,.022))),-v(l-vec2(0,.01),vec2(.06,.002))),max(-v(l-vec2(.025,-.005),vec2(.01,.007)),length(vec2(l.x-.019,l.y+.005-.007)*vec2(.65,1))-.009)),max(-v(l-vec2(.01,-.005),vec2(.01,.007)),length(vec2(l.x-.019,l.y+.005+.007)*vec2(.65,1))-.009)),-(length(vec2(l.x-.019,max(0.,abs(l.y+.0055)-.007)))-.005)),v(m(0.)*(l-vec2(.019,-.005-(l.x-.019)/2.)),vec2(.0047,.004)),1536.),max(-(length(vec2(l.x-.0735,max(0.,abs(l.y+.006)-.006)))-.005),length((l-vec2(.0735,-.006))*vec2(.9,1))-.015)),v(l-vec2(.1,-.006),vec2(.007,.015))),length(vec2(l.x-.118,max(0.,abs(l.y+.012)-.009)))-.013),-(length(vec2(l.x-.112,max(0.,abs(l.y+.012)-.01)))-.005)),-l.y-.021)+.0003;"
"return l*=1.05,max(max(min(min(min(v(max(min(min(max(min(min(min(min(max(min(min(max(max(min(length((l-vec2(-.11,.01))*vec2(1,1.3))-.016,length(vec2(l.x+.11,max(0.,abs(l.y+.02)-.009))*vec2(.8,1.))-.013),-(length(vec2(l.x+.112,max(0.,abs(l.y-.009)-.004)))-.005)),-(length(vec2(l.x+.112,max(0.,abs(l.y+.015)-.007)))-.005)),v(l-vec2(-.122,0),vec2(.007,.022))),max(-(length(vec2(l.x+.074,max(0.,abs(l.y+.006)-.006)))-.005),length((l-vec2(-.074,-.006))*vec2(.9,1))-.015)),-v(l-vec2(-.06,-.008),vec2(.01,.002))),v(l-vec2(-.075,-.0039),vec2(.01,.002))),v(vec2(abs(l.x+.037)-.01-l.y/2.2,l.y+.006),vec2(.006,.015))),v(l-vec2(-.006,0),vec2(.007,.022))),v(l-vec2(.045,0),vec2(.007,.022))),-v(l-vec2(0,.01),vec2(.06,.002))),max(-v(l-vec2(.025,-.005),vec2(.01,.007)),length(vec2(l.x-.019,l.y+.005-.007)*vec2(.65,1))-.009)),max(-v(l-vec2(.01,-.005),vec2(.01,.007)),length(vec2(l.x-.019,l.y+.005+.007)*vec2(.65,1))-.009)),-(length(vec2(l.x-.019,max(0.,abs(l.y+.0055)-.007)))-.005)),v(m(0.)*(l-vec2(.019,-.005-(l.x-.019)/2.)),vec2(.0047,.004)),1536.),max(-(length(vec2(l.x-.0735,max(0.,abs(l.y+.006)-.006)))-.005),length((l-vec2(.0735,-.006))*vec2(.9,1))-.015)),v(l-vec2(.1,-.006),vec2(.007,.015))),length(vec2(l.x-.118,max(0.,abs(l.y+.012)-.009)))-.013),-(length(vec2(l.x-.112,max(0.,abs(l.y+.012)-.01)))-.005)),-l.y-.021)+3e-4;"
"}"
"float n(vec4 v,vec2 l)"
"{"
Expand Down Expand Up @@ -124,7 +124,7 @@ const char *the_real_party_is_in_your_pocket_frag =
"a=m(m(a,min(l.z,-c+.003),256.),min(l.z,-abs(s)-.001),448.);"
"a=m(a,min(l.z-.13,-v(l.xy-vec2(0,-.118))),512.);"
"a=m(a,min(l.z-.13,-abs(length(vec2(max(abs(l.x)-.12,0.),l.y+.117))-.035)+.003),512.);"
"a=m(m(a,min(1.,-min(1.,max(m(abs(l.x)-.31,abs(l.y-.49)-.29,500.),abs(l.z-.185)-.1))+.004),576.),-abs(l.z-.01)-.0001,384.);"
"a=m(m(a,min(1.,-min(1.,max(m(abs(l.x)-.31,abs(l.y-.49)-.29,500.),abs(l.z-.185)-.1))+.004),576.),-abs(l.z-.01)-1e-4,384.);"
"if(l.y<0.)"
"{"
"if(l.y<-.5)"
Expand Down Expand Up @@ -207,7 +207,7 @@ const char *the_real_party_is_in_your_pocket_frag =
"{"
"k=x(r+p*b);"
"d=k.x;"
"if(b>o.y||abs(d)<1e-05)"
"if(b>o.y||abs(d)<1e-5)"
"break;"
"b+=d;"
"}"
Expand Down Expand Up @@ -268,7 +268,7 @@ const char *the_real_party_is_in_your_pocket_frag =
"{"
"if(a)"
"break;"
"l=d+z*.0002;"
"l=d+z*2e-4;"
"i*=mix(.1,.8,pow(1.-clamp(dot(-v,z),0.,1.),3.))*mix(vec3(1),vec3(1,.9,.5),.5);"
"v=reflect(v,z)+(vec3(m(),m(),m())-.5)*.3;"
"}"
Expand All @@ -279,9 +279,9 @@ const char *the_real_party_is_in_your_pocket_frag =
"break;"
"e=.02;"
"if(m()>e)"
"l=d-z*.0002*-sign(v.z),v=v+(vec3(m(),m(),m())-.5)*.1;"
"l=d-z*2e-4*-sign(v.z),v=v+(vec3(m(),m(),m())-.5)*.1;"
"else"
" l=d+z*.0002,v=reflect(v,z)+(vec3(m(),m(),m())-.5)*.3;"
" l=d+z*2e-4,v=reflect(v,z)+(vec3(m(),m(),m())-.5)*.3;"
"}"
"else"
" if(o.y<.5||o.y>2.5)"
Expand Down Expand Up @@ -363,7 +363,7 @@ const char *the_real_party_is_in_your_pocket_frag =
"if(o.y>3.&&o.y<3.2)"
"t=vec3(.4);"
"i*=t;"
"l=d+z*.0002;"
"l=d+z*2e-4;"
"v=k;"
"a=true;"
"}"
Expand All @@ -375,7 +375,7 @@ const char *the_real_party_is_in_your_pocket_frag =
"if(o.y>1.5)"
"h=vec3(.02);"
"i*=h;"
"l=d+z*.0002;"
"l=d+z*2e-4;"
"v=k;"
"a=true;"
"}"
Expand All @@ -384,7 +384,7 @@ const char *the_real_party_is_in_your_pocket_frag =
"if(a)"
"break;"
"i*=o.y>1.5?vec3(.5):.9*mix(h,vec3(1),.25);"
"l=d+z*.0002;"
"l=d+z*2e-4;"
"v=reflect(v,z)+(vec3(m(),m(),m())-.5)*.4;"
"}"
"}"
Expand Down
6 changes: 3 additions & 3 deletions tests/real/yx_long_way_from_home.frag.expected
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,15 @@ const char *yx_long_way_from_home_frag =
"}"
"float m(vec3 m)"
"{"
"float x=1000000000.;"
"float x=1e9;"
"x=min(x,length(m-vec3(0,5,0))-2.5);"
"vec3 i=m;"
"i.x=abs(i.x-1.1)-.2;"
"float s=max(length(i.xz+vec2(0,5.))-.01,i.y-5.);"
"vec3 n=m;"
"if(m.y<.3)"
"{"
"m.y+=texture(v,m.xz*.125).x*.0009;"
"m.y+=texture(v,m.xz*.125).x*9e-4;"
"m.y+=texture(v,m.xz*2.*.125).x*.0011;"
"m.y+=texture(v,m.xz*4.*.125).x*.0021;"
"m.y+=texture(v,m.xz*4.*.0625).x*.0051;"
Expand Down Expand Up @@ -145,7 +145,7 @@ const char *yx_long_way_from_home_frag =
"vec3 h(vec3 v,vec3 m)"
"{"
"vec3 x=normalize(vec3(.3,.36,-1));"
"const float y=.0001;"
"const float y=1e-4;"
"const vec3 n=vec3(1.,.6,.2)*2.;"
"vec3 z=vec3(1),c=vec3(0);"
"for(int r=0;r<10;++r)"
Expand Down
27 changes: 25 additions & 2 deletions tests/unit/float.frag
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,38 @@ void precision() {
float a = 0.00000012345;
float b = 1.234567891234;
float c = 1234567.891234;
float d = 123456700000000.;
}

void largeNumbers() {
float a = 4.1e8;
float b = 4.2e10;
float c = 4.3e12;
float d = 4.4e14;
}

void smallNumbers() {
float a = 4e-1;
float b = 4e-2;
float c = 4e-3;
float d = 4e-4;
float e = 4e-8;
float f = 4e-10;
float g = 4e-12;
float h = 4e-14;
}

void zero() {
float a = 0.;
float b = .0;
float c = -.0;
}

void main()
{
float f1 = 1.5;
float f2 = .0000003;
float f3 = .42;
float f4 = .0;
float f5 = 0.;
float f6 = -2e-3;
float f7 = 2E-9;
float f8 = 2E+6;
Expand Down
16 changes: 14 additions & 2 deletions tests/unit/float.frag.expected
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,22 @@
// tests/unit/float.frag
"void precision()"
"{"
"float a=1.2345e-07,b=1.234567891234,c=1234567.891234;"
"float a=1.2345e-7,b=1.234567891234,c=1234567.891234,d=1.234567e14;"
"}"
"void largeNumbers()"
"{"
"float a=4.1e8,b=4.2e10,c=4.3e12,d=4.4e14;"
"}"
"void smallNumbers()"
"{"
"float a=.4,b=.04,c=.004,d=4e-4,e=4e-8,f=4e-10,g=4e-12,h=4e-14;"
"}"
"void zero()"
"{"
"float a=0.,b=0.,c=0.;"
"}"
"void main()"
"{"
"float f1=1.5,f2=3e-07,f3=.42,f4=0.,f5=0.,f6=-.002,f7=2e-09,f8=2000000.,f9=20000000000.;"
"float f1=1.5,f2=3e-7,f3=.42,f6=-.002,f7=2e-9,f8=2e6,f9=2e10;"
"gl_FragColor=vec4(0.);"
"}",

0 comments on commit 3ac5816

Please sign in to comment.