HN user

Atrix256

221 karma

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

Posts30
Comments37
View on HN
www.ea.com 2y ago

Machine Learning for Game Devs: Part 2

Atrix256
1pts0
blog.demofox.org 8y ago

Taking a Stroll Between the Pixels

Atrix256
95pts2
blog.demofox.org 8y ago

Prefix Sums and Summed Area Tables

Atrix256
2pts0
blog.demofox.org 8y ago

Granular Audio Synthesis

Atrix256
1pts0
blog.demofox.org 8y ago

What the Heck Is Blue Noise?

Atrix256
2pts0
blog.demofox.org 8y ago

C++ Differentiable Programming: Searching for an Optimal Dither Pattern

Atrix256
1pts0
blog.demofox.org 8y ago

Dissecting “Tiny Clouds”

Atrix256
2pts0
blog.demofox.org 8y ago

Demystifying Floating Point Precision

Atrix256
3pts0
blog.demofox.org 8y ago

Animating Noise for Integration Over Time

Atrix256
1pts0
blog.demofox.org 8y ago

Transmuting White Noise to Blue, Red, Green, Purple

Atrix256
3pts0
blog.demofox.org 8y ago

Generating Blue Noise Sample Points with Mitchell’s Best Candidate Algorithm

Atrix256
5pts0
blog.demofox.org 8y ago

Calculating the Distance Between Points in Wrap Around (Toroidal) Space

Atrix256
106pts39
blog.demofox.org 8y ago

Half Tile Offset Streaming World Grids

Atrix256
28pts7
blog.demofox.org 8y ago

Generating Random Numbers from a Specific Distribution with Rejection Sampling

Atrix256
1pts0
blog.demofox.org 8y ago

Generating Random Numbers from a Specific Distribution by Inverting the CDF

Atrix256
66pts10
blog.demofox.org 8y ago

Counting Bits and the Normal Distribution

Atrix256
1pts0
blog.demofox.org 9y ago

Why Are Some Shadows Soft and Other Shadows Hard?

Atrix256
1pts0
blog.demofox.org 9y ago

SIMD / GPU Friendly Branchless Binary Search

Atrix256
82pts46
blog.demofox.org 9y ago

When Random Numbers Are Too Random: Low Discrepancy Sequences

Atrix256
3pts1
blog.demofox.org 9y ago

Solving N Equations and N Unknowns: The Fine Print (Gauss Jordan Elimination)

Atrix256
2pts0
blog.demofox.org 9y ago

Plastic Bag Ban – Semi Reusable Bag Kiosks a Better Solution?

Atrix256
2pts0
blog.demofox.org 9y ago

Neural Network Recipe: Recognize Handwritten Digits with 95% Accuracy-C++/nolibs

Atrix256
3pts1
blog.demofox.org 9y ago

Neural Network Gradients: Backpropagation, Dual Numbers, Finite Differences

Atrix256
2pts0
blog.demofox.org 9y ago

How to Train Neural Networks with Backpropagation

Atrix256
4pts0
blog.demofox.org 9y ago

Multivariable Dual Numbers and Automatic Differentiation

Atrix256
1pts0
blog.demofox.org 9y ago

A Geometric Interpretation of Neural Networks

Atrix256
3pts0
blog.demofox.org 9y ago

Raytracing Reflection, Refraction, Fresnel, Total Internal Reflection, Beers Law

Atrix256
4pts0
blog.demofox.org 9y ago

Incremental Least Squares Surface and Hyper-Volume Fitting

Atrix256
1pts0
blog.demofox.org 9y ago

Incremental Least Squares Curve Fitting

Atrix256
3pts0
blog.demofox.org 9y ago

Evaluating Points on Surfaces and in Volumes Using the GPU Texture Sampler

Atrix256
1pts0

(author of the article) 100% agree. As others have said, a good graphics programmer works with tech artists and artists. Frankly, graphics programming is largely a role of service to enable those people to do what they want to do, or help create what they envision. People mentioned Inigo Quilez as an example of a graphics programmer who is also an artist. He is a power house and a unicorn. I personally like playing music / programming audio more, which is a good ground for learning DSP things - useful when for instance, you want to push your rendering noise into the high frequencies, so a low pass filter is more effective at denoising.

Game development tends to make code more in this style, half way between C and C++. The reasoning of this is primarily the need to avoid hidden costs in the STL, but to be honest is also just momentum & culture :)

Heya ladberg: * Were you doing direct light sampling (next event estimation)? If so that would explain it. It's the most naive path tracing you can imagine, so it's easier to understand. * Or, it might be how shadertoy is vsync limited to 60 fps which means each pixel only gets 60 samples a second, when it could be getting ~64x as much before i see any slowdown.

See step 1 of the 3 step bulleted list, but yeah, it generalizes to 2 steps with a shared initialization value.

Maybe worth noting that if your world has some known starting state (eg after map load), it might be worth the client and server using that as the implicit initial state, even when a client joins a game in progress.

I hear you. It's hard to know what a good benchmark would be. Do you have any ideas for what you'd like to see measured and possibly what it's compared against?

Does this source code help you much with that? It only deals with wave files but can read / write 8, 16, 24 or 32 bit wave files, at whatever sample rate, with however many channels.

I really wish someone would make a header only C++ audio library, that would be soooo nice.

I'm the author and didn't make this post on yc, but yes, the implementation is in 680 lines of standalone c++

The point of the article isn't about c++ or why it's a good language for doing this sort of thing, but I'm a real time graphics and game engine programmer, so it's my language of choice.

I wonder if the hacker news algorithm looks at the people who make the post to know if it should be promoted or not?

One thing I have noticed is that when you post things, they get a lot more attention than when I do hehe.

Thanks for that (:

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!

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).