HNHacker News
TopNewBestAskShowJobs

rjkaplan

204 karma · joined December 5, 2015

submissionscomments
rjkaplan··on Figma files for proposed IPO
True... this was a conscious trade-off at Figma since it needs to support designs for web, iOS, Android, etc. That unfortunately means it doesn't map 1:1 to any of them.
rjkaplan··on Speeding up C++ build times
I'm guessing the comment was downvoted because the suggestions are mentioned in the first paragraph of the article...

> After trying a few stopgap solutions—like purchasing M1 Maxs for our team—build times gradually reverted to their original pace; Ccache and remote caching weren’t enough either.

rjkaplan··on The engineering behind Figma's vector networks (2019)
Figma supported vector networks a few years before that thesis was written (I worked there at the time).
rjkaplan··on WebGPU now available for testing in Safari Technology Preview
Hmm, why does this page say that iOS has 1.26% support? Safari developer preview isn't supported on iOS, and neither are non-Apple browser engines.
rjkaplan··on My Favorite Books 2020
Strongly recommend either The Way of Kings or Mistborn. They're the first books in two separate series of his. The Way of Kings is epic fantasy. Mistborn is somewhere between fantasy and YA.
rjkaplan··on Ray Marching Soft Shadows in 2D
Neat! In my experience jump flooding on the GPU is faster than any CPU side approach for images bigger than a few hundred pixels. It's O(n ^ 2 log n) which sounds really expensive, but it requires just O(log n) draw calls.

The link you provided also describes a GPU amenable approach, but it says that jump flooding on the GPU is faster.

> For a more efficient GPU-amenable method, see also jump flooding by Rong and Tan. Their method generates a closest point coordinate field from which a distance field can be derived.

rjkaplan··on Ray Marching Soft Shadows in 2D
Ah, thanks for clarifying! I think someone already called this out above, but the benefit of the approach I describe is that you only need one sample per pixel. Four samples per pixel starts to feel pretty slow on my machine, and I suspect you'd need more than that to make the averaging approach look good.
rjkaplan··on Ray Marching Soft Shadows in 2D
There are definitely more physically accurate ways to render soft shadows, but AFAIK they all involve some kind of bounce lighting where light bounces off of objects in the scene and indirectly lights other parts of it.

This looks great when combined with area light sources, like you suggest, but in my experience it's too slow for interactive demos.

I'd love to be proven wrong on this :)

rjkaplan··on Ray Marching Soft Shadows in 2D
Thanks! I've learned a ton from iq's writing. He's such an inspiration!

I find that his articles are best for folks who already know a thing or two about computer graphics. Here's a post that I think is pretty good for beginners: http://jamie-wong.com/2016/07/15/ray-marching-signed-distanc...

rjkaplan··on Ray Marching Soft Shadows in 2D
Thanks! I just pushed a fix. Does it work now?
rjkaplan··on Ray Marching Soft Shadows in 2D
Thanks! I just pushed a fix. Does it work now?
rjkaplan··on Ray Marching Soft Shadows in 2D
I just pushed something that will print more info when that error happens. If you or anyone else runs into it again, please post the error here so I can fix it :)
rjkaplan··on Ray Marching Soft Shadows in 2D
Whoops, just pushed a fix! Does it work now?
rjkaplan··on Ray Marching Soft Shadows in 2D
Author here. That's a neat trick!

> I mention this because the mystery of the getDistance() function is often one of the tricky parts of demos like these.

I agree! In the demos I use a library I wrote to generate 2D distance fields: https://github.com/ryankaplan/gpu-distance-field

It's also pretty fast :)

rjkaplan··on Emacs is sexy
The page's domain and title are disappointing to me.

Using sexualized language can create an environment that is unduly hostile to women, even if this is not intended. Many of the biases against women that such language provokes are totally unconscious, so even if the intent is not harmful, it can be bad regardless.

More info here: http://geekfeminism.wikia.com/wiki/Sexualized_environment

Wording in this comment borrowed from here: https://github.com/alecthomas/voluptuous/issues/287

rjkaplan··on Building a Fast Equation Grapher (Part I)
Thanks! (I wrote the article and just found it here)
rjkaplan··on Request for Startups: News, Jobs, and Democracy
That depends on how you define progress.

Just to play devil's advocate: what if you define progress as "that stuff" that will increase the general well-being of the greatest number of people over the next 20 years? With that definition, does technology-powered automation still count as progress?

rjkaplan··on Sketch 3.7 released
Out of curiosity, what platform do you design for? I often make designs for web and mobile web, and I want my text to look the same in my design tool as it does on the platform I'm designing for. Since mobile devices don't support sub-pixel antialiasing, I don't want it enabled in my design tool either.
rjkaplan··on Voronoi Diagrams on the GPU
Thanks for the report - I reproduced and fixed an issue on a Windows machine. It'd be great if you could let me know if it now works for you!
rjkaplan··on Voronoi Diagrams on the GPU
I fixed an issue that I was able to repro on a Windows machine. It'd be great if you could try again and let me know if it now works for you!
rjkaplan··on Voronoi Diagrams on the GPU
Yeah! It's a pretty big omission in my post that I don't talk about other methods of generating Voronoi diagrams, but I wanted to keep it relatively short.

Chris Wellons has a great article on the method that you mention: http://nullprogram.com/blog/2014/06/01/

It's also mentioned in the OpenGL red book: http://www.glprogramming.com/red/chapter14.html#name19

rjkaplan··on Voronoi Diagrams on the GPU
I'm sorry that you're running into issues - I just got started with WebGL and I don't have a Windows machine to test on. I'd be interested to know if other WebGL demos work on your machine. Do you see a triangle and square when you visit this page? http://learningwebgl.com/lessons/lesson01/index.html
rjkaplan··on Voronoi Diagrams on the GPU
Thanks - I'm glad you found it interesting!
rjkaplan··on Voronoi Diagrams on the GPU
I recently got started with WebGL so I hope that others post more/better resources, but...

- I found this to be a good starting point for WebGL as a whole: https://webglfundamentals.org/

- This is a great resource for learning about GLSL and shaders (writing code that runs on the GPU): http://patriciogonzalezvivo.com/2015/thebookofshaders/

- As a starting point for implementing the Jump Flood Algorithm (which is what I used to implement the Voronoi Diagram demos) I found it helpful to read Chris Wellon's articles on GPGPU programming. Here's the first one: http://nullprogram.com/blog/2014/06/10/

rjkaplan··on Voronoi Diagrams on the GPU
I mostly just think they look cool :)

In the post there's a demo on how to use the same algorithm that generates Voronoi diagrams to render 2D drop shadows with a spread radius.

You may also be interested in Alan Zucconi's article on Voronoi diagrams where he outlines a few use-cases in games: http://www.alanzucconi.com/2015/02/24/to-voronoi-and-beyond/...

rjkaplan··on Voronoi Diagrams on the GPU
Cool! If you're willing to share, I'm interested to hear how your approximation works. Do you just do fewer rounds? Do you use bigger step sizes?
rjkaplan··on WOOT: an Algorithm for Concurrrent and Collaborative Authoring (2013) [video]
In case anyone is interested, I built a toy implementation of WOOT in Typescript. You can find it here: https://github.com/ryankaplan/woot-collaborative-editor

Disclaimer: it's a toy project and I don't suggest using it for anything important.