News for hackers. Stuff that matters.
Re:Animating quasicrystals in parallel Haskell by zokier on Tuesday October 25, 2011 @02:11PM (#3155135)
My WebGL version: http://zokier.net/stuff/webgl-quasicrystal/

Almost literal translation from the Haskell version.

edit: And in amazing technicolor: http://zokier.net/stuff/webgl-quasicrystal/color.html

Re:Animating quasicrystals in parallel Haskell by rogerallen on Tuesday October 25, 2011 @03:58PM (#3155615)
Was playing with this a bit a lunchtime...

Modifying your main routine to do 3x3 super-sampling reduces flashing/aliasing quite a bit. Check it out.

    void main(void)
    {
        float s = 0.0;
        for( float xx = 0.0; xx < 1.0; xx += 1.0/3.0) {
            for( float yy = 0.0; yy < 1.0; yy += 1.0/3.0) {
                s += combine(vec2(uv.x*xpixels+xx, uv.y*ypixels+yy));
            }
        }
        gl_FragColor = vec4(vec3(s/9.0), 1.0);
    }
4x4 is better, but my puny Mac Mini GPU starts to hiccup at that many samples when rendering 1600x800.
Re:Animating quasicrystals in parallel Haskell by zokier on Tuesday October 25, 2011 @04:15PM (#3155690)
Nice, updated the colored version with that.
Re:Animating quasicrystals in parallel Haskell by pault on Tuesday October 25, 2011 @03:36PM (#3155529)
Congratulations on making the first WebGL demo I've seen that didn't turn my macbook into a mobile space heater.
Re:Animating quasicrystals in parallel Haskell by rogerallen on Tuesday October 25, 2011 @02:34PM (#3155246)
W00t! That is awesome.