News for hackers. Stuff that matters.

rjkaplan

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.
Re:Speeding up C++ build times on Sunday April 28, 2024 @10:43PM (#40193862)
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.

Re:The engineering behind Figma's vector networks (2019) on Saturday February 03, 2024 @02:20PM (#39243774)
Figma supported vector networks a few years before that thesis was written (I worked there at the time).
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.
Re:My Favorite Books 2020 on Thursday December 31, 2020 @03:46PM (#25596925)
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.
Re:Ray Marching Soft Shadows in 2D on Wednesday September 23, 2020 @06:17PM (#24572766)
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.

Re:Ray Marching Soft Shadows in 2D on Wednesday September 23, 2020 @06:09PM (#24572703)
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.
Re:Ray Marching Soft Shadows in 2D on Wednesday September 23, 2020 @05:00PM (#24571971)
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 :)

Re:Ray Marching Soft Shadows in 2D on Wednesday September 23, 2020 @04:30PM (#24571625)
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...

Re:Ray Marching Soft Shadows in 2D on Wednesday September 23, 2020 @04:23PM (#24571532)
Thanks! I just pushed a fix. Does it work now?
Re:Ray Marching Soft Shadows in 2D on Wednesday September 23, 2020 @04:22PM (#24571528)
Thanks! I just pushed a fix. Does it work now?
Re:Ray Marching Soft Shadows in 2D on Wednesday September 23, 2020 @03:32PM (#24570965)
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 :)
Re:Ray Marching Soft Shadows in 2D on Wednesday September 23, 2020 @03:31PM (#24570957)
Whoops, just pushed a fix! Does it work now?
Re:Ray Marching Soft Shadows in 2D on Wednesday September 23, 2020 @03:25PM (#24570901)
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 :)

Re:Emacs is sexy on Wednesday May 10, 2017 @07:43PM (#14312757)
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

Re:Building a Fast Equation Grapher (Part I) on Sunday April 23, 2017 @03:45AM (#14177034)
Thanks! (I wrote the article and just found it here)
Re:Request for Startups: News, Jobs, and Democracy on Tuesday January 31, 2017 @02:18PM (#13534199)
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?

Re:Sketch 3.7 released on Thursday April 14, 2016 @01:23AM (#11494461)
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.
Re:Voronoi Diagrams on the GPU on Thursday April 14, 2016 @12:47AM (#11494359)
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!
Re:Voronoi Diagrams on the GPU on Wednesday April 13, 2016 @11:47PM (#11494164)
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!
Re:Voronoi Diagrams on the GPU on Wednesday April 13, 2016 @10:56PM (#11494027)
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

Re:Voronoi Diagrams on the GPU on Wednesday April 13, 2016 @10:23PM (#11493917)
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
Re:Voronoi Diagrams on the GPU on Wednesday April 13, 2016 @10:06PM (#11493851)
Thanks - I'm glad you found it interesting!
Re:Voronoi Diagrams on the GPU on Wednesday April 13, 2016 @09:18PM (#11493670)
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/

Older »