Better HN
topnewbestaskshowjobs
Log inSign up

Atrix256

221 karma · joined Jun 17, 2016 (10y ago) · 69 submissions

Graphics research at EA SEED. Previously a game/engine/graphics/audio/animation programmer at blizzard, monolith, midway and others. Blog.demofox.org
Submissions

comment 9y ago · link · parent

Thanks. Probably ought to do that (:

comment 9y ago · link · parent

good point. That's interesting!

33.

Demystifying Floating Point Precision(blog.demofox.org ↗)

3 points · by Atrix256 · 9y ago · discuss

34.

Animating Noise for Integration Over Time(blog.demofox.org ↗)

1 points · by Atrix256 · 9y ago · discuss

35.

Transmuting White Noise to Blue, Red, Green, Purple(blog.demofox.org ↗)

3 points · by Atrix256 · 9y ago · discuss

36.

Generating Blue Noise Sample Points with Mitchell’s Best Candidate Algorithm(blog.demofox.org ↗)

5 points · by Atrix256 · 9y ago · discuss

comment 9y ago · link · parent

I'm out of my depth but I believe it's a torus because it's 2 cylinders, not circles?

38.

Calculating the Distance Between Points in Wrap Around (Toroidal) Space(blog.demofox.org ↗)

106 points · by Atrix256 · 9y ago · 39 comments

39.

Half Tile Offset Streaming World Grids(blog.demofox.org ↗)

28 points · by Atrix256 · 9y ago · 7 comments

40.

Generating Random Numbers from a Specific Distribution with Rejection Sampling(blog.demofox.org ↗)

1 points · by Atrix256 · 9y ago · discuss

comment 9y ago · link · parent

Have another way to explain it that you think is more appropriate?

42.

Generating Random Numbers from a Specific Distribution by Inverting the CDF(blog.demofox.org ↗)

66 points · by Atrix256 · 9y ago · 10 comments

43.

Counting Bits and the Normal Distribution(blog.demofox.org ↗)

1 points · by Atrix256 · 9y ago · discuss

44.

Why Are Some Shadows Soft and Other Shadows Hard?(blog.demofox.org ↗)

1 points · by Atrix256 · 9y ago · discuss

comment 9y ago · link · parent

I'm not the one who downvoted you, but I am the one who wrote the article :P

comment 9y ago · link · parent

You are completely right, I'll mention this in the post (In that case do a branchless comparison based on subtraction or similar?). Fwiw when doing simd, you'd use intrinsics which wouldn't have this issue, but it is a valid point and completely true. Thanks!

comment 9y ago · link · parent

Here's a godbolt to play with as well, showing how it does actually compile down to being branchless in clang (you can switch it to use other compilers too) https://goo.gl/bywp8b

comment 9y ago · link · parent

This isn't a parallelized implementation, no. To have that, imagine that instead of a size_t for ret, that it was something like size_t[4], and that each operation you did acted on all 4 items at once (this is how SIMD operations work, they do the same thing to each item in a vector of values).

You would end up returning a size_t[4], which would have the results of your 4 searches in it, which ran in parallel.

Regarding the ternary operator, you can always check your assembly (here's some that shows it https://godbolt.org/g/BM6tfc), but the article also shows how to do it with a multiply instead of the ternary operator.

The biggest thing sticking out of this as being slow would be the cache unfriendliness of binary searching, but the link at the end shows how to clear that up (which is not the point of the article, but the ideas are compatible and combinable).

49.

SIMD / GPU Friendly Branchless Binary Search(blog.demofox.org ↗)

82 points · by Atrix256 · 9y ago · 46 comments

50.

When Random Numbers Are Too Random: Low Discrepancy Sequences(blog.demofox.org ↗)

3 points · by Atrix256 · 9y ago · 1 comment

51.

Solving N Equations and N Unknowns: The Fine Print (Gauss Jordan Elimination)(blog.demofox.org ↗)

2 points · by Atrix256 · 9y ago · discuss

52.

Plastic Bag Ban – Semi Reusable Bag Kiosks a Better Solution?(blog.demofox.org ↗)

2 points · by Atrix256 · 9y ago · discuss

comment 9y ago · link · parent

If you tried the demo and were remarkably unimpressed, give it a try again and it ought to work better (make sure and manually refresh - F5 so you don't have the old page cached).

I read how the MNIST data was generated and followed suit: Find the bounding box of the drawn image and scale it down to 20x20, preserving the aspect ratio. Put that 20x20 image into a 28x28 image using the center of mass of the pixels as the center point.

There is still some error due to how different mouse drawn and hand drawn numbers look, but I've found it to be a lot more accurate.

Demo: http://demofox.org/MNIST1.html

Example training data to see what i mean about difference between hand drawn and mouse drawn images: https://i2.wp.com/blog.demofox.org/wp-content/uploads/2017/0...

Thanks for the feedback on that... it was a mistake rolling it out in such a broken state.

54.

Neural Network Recipe: Recognize Handwritten Digits with 95% Accuracy-C++/nolibs(blog.demofox.org ↗)

3 points · by Atrix256 · 9y ago · 1 comment

55.

Neural Network Gradients: Backpropagation, Dual Numbers, Finite Differences(blog.demofox.org ↗)

2 points · by Atrix256 · 9y ago · discuss

56.

How to Train Neural Networks with Backpropagation(blog.demofox.org ↗)

4 points · by Atrix256 · 9y ago · discuss

comment 9y ago · link · parent

Too funny, what's your shadertoy handle? (this is demofox)

comment 9y ago · link · parent

Thanks!

comment 9y ago · link · parent

BTW this older article of mine is extended with a new one that shows how to handle multiple variables (: http://blog.demofox.org/2017/02/20/multivariable-dual-number...
123