Anyone know of any labour-saving automatic script or tool for making GLSL code generated by LLVM human-readable. For those who haven’t seen it, it produces this kind of thing:
(z_318)=((xyMiddle)+(vec2(((((vec2((((((z_318)-(xyMiddle))[0])*((vec2((((_zoom)[0])/(float((pow((length(_zoom)), (2.000000)))))), ((-((_zoom)[1]))/(float((pow((length(_zoom)), (2.000000))))))))[0]))-((((z_318)-(xyMiddle))[1])*((vec2((((_zoom)[0])/(float((pow((length(_zoom)), (2.000000)))))), ((-((_zoom)[1]))/(float((pow((length(_zoom)), (2.000000))))))))[1]))), (((((z_318)-(xyMiddle))[0])*((vec2((((_zoom)[0])/(float((pow((length(_zoom)), (2.000000)))))), ((-((_zoom)[1]))/(float((pow((length(_zoom)), (2.000000))))))))[1]))+((((z_318)-(xyMiddle))[1])*((vec2((((_zoom)[0])/(float((pow((length(_zoom)), (2.000000)))))), ((-((_zoom)[1]))/(float((pow((length(_zoom)), (2.000000))))))))[0])))))[0])*((vec2(((exp((vec2((((-0.000000)*((_rotate)[0]))-((-1.000000)*((_rotate)[1]))), (((-0.000000)*((_rotate)[1]))+((-1.000000)*((_rotate)[0])))))[0]))*(cos((...
SO, basically, I just need to get rid of all the extraneous brackets. Doing it manually is harder than you might think though, especially when you’ve got a lot of lines to work through.
Anyone any ideas?