Andrew Baldwin

@baldand

Error: Undefined output

Finland / Estonia
Joined December 2009

Tweets

You blocked @baldand

Are you sure you want to view these Tweets? Viewing Tweets won't unblock @baldand

  1. 4 hours ago

    Some annoyances and challenges: - Android chrome much faster fullscreen - Fullscreen & WebAudio only work if the user interacts. So there has to be an initial state that requires a click/press - Safari WebAudio is still behind webkit prefix and has slightly different behaviour

    Show this thread
    Undo
  2. 19 hours ago

    The (text) shader code is stored with simple dictionary-based compression of keywords. But the rest of the code is not compressed. To keep code density high, I used rust to write a binary code runtime based on 4-bit opcodes and args that manipulate a JS-side stack

    Show this thread
    Undo
  3. Feb 2

    To avoid needing JS binding functions for all the Web APIs, I used the JS function Reflect.ownKeys() on API classes to enumerate all the available functions, and extract the ones I needed dynamically based on a pre-computed (12-bit) hash - then using JS fn apply() to call them

    Show this thread
    Undo
  4. Feb 2

    The version of WebAssembly widely available today in most browsers is limited to being able to call a list of javascript functions you give it at load time, with only numbers as parameters & returns - it cannot call arbitrary Web functions (such as WebGL or WebAudio) directly

    Show this thread
    Undo
  5. Feb 2

    The audio ("music") is also rendered in a fragment shader, with one pixel per sample, using additive synthesis with about 500 sin waves for left and right channels. Output float value is coded into the 4x8bit RGBA and cast back to float32 on host side, then into a WebAudio buffer

    Show this thread
    Undo
  6. Feb 2

    Each of the 4096 rings is a quad instance, positioned in 3D space by the vertex shader. Then in the fragment shader, a local single torus distance field is ray marched for a few steps. Depth testing is on, and pixels that don't hit a surface are discarded.

    Show this thread
    Undo
  7. Feb 1

    The graphics and audio are rendered with WebGL(1) shaders. The challenge for me was how to bind all the needed functions while staying "in budget" (<4KB) but still with broad compatibility

    Show this thread
    Undo
  8. Feb 1

    The file is actually one wasm binary file, with just "<!--" added to the start, and the javascript bootstrap embedded as constant data

    Show this thread
    Undo
  9. Feb 1

    On my (android) phone, performance is best in landscape

    Show this thread
    Undo
  10. Feb 1

    I've been exploring Rust+WebAssembly recently. Here's one experiment made with those - my friend said it looked like thousands of fruit loops dancing to "music". Runs in your browser (and maybe even your phone). One file, just 4092 bytes.

    Show this thread
    Undo
  11. Retweeted
    Jan 28

    Today, we are launching CineShader - A cinematic shader visualiser! It is a little side project we created for the shader community using the API. Retweet is appreciated.😉 👉

    Show this thread
    Undo
  12. Retweeted
    Jan 22

    An ominous sphere appears in the sky.

    Show this thread
    Undo
  13. Retweeted
    Jan 15

    (1) Dear friends! Please help me spread the word! Proud to announce my first single author paper, a new display technology that combines optical scanning and machine learning. The results is up to x4 resolution, faster refresh rate and no more screen door effect!

    Show this thread
    Undo
  14. Retweeted
    Jan 15

    Differentiable Digital Signal Processing (DDSP)! Fusing classic interpretable DSP with neural networks. ⌨️ Blog: 🎵 Examples: ⏯ Colab: 💻 Code: 📝 Paper: 1/

    Show this thread
    Undo
  15. Retweeted
    Jan 1

    Making really tiny WebAssembly graphics demos

    Undo
  16. Retweeted
    Jan 6

    A fascinating spin on raymarching in the "Scene Representation Networks" paper, using a *learned* rendering pipeline: The scene is implicit in a feature vector space, raymarched using an LSTM, and mapped to RGB pixels using a multi-layer perceptron

    Undo
  17. Retweeted
    27 Dec 2019

    JPEG XL, the next-generation image compression codec. It's still a work-in-progress, but since today we have a public software repository. The code is proudly Free & Open Source (Apache 2.0), the codec is Royalty-free.

    Show this thread
    Undo
  18. 22 Dec 2019

    In my case it was for audio synthesis. Could also be useful for ML model output

    Show this thread
    Undo
  19. 22 Dec 2019

    GLSL function to write out a valid full precision float value as 4 uint8s that can be cast directly back to a float host-side. Useful on WebGL 1.0 targets with no native float output if you want to calculate something with the GPU

    Show this thread
    Undo
  20. 22 Dec 2019

    vec4 f2v4(float f){if (f==0.)return vec4(0.);float s=f>0.?0.:1.;f=abs(f);float e=floor(log2(f));float t=(e+127.)*.5;float m=((f/exp2(e))-1.)*8388608.;float z=floor(m/65536.);m-=z*65536.;float y=floor(m/256.);m-=y*256.;return vec4(m,y,(fract(t)*256.+z),(s*128.+floor(t)))/255.;}

    Show this thread
    Undo

Loading seems to be taking a while.

Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.

    You may also like

    ·