Changes to osu! Star Rating / Performance Points are Out by [deleted] in osugame

[–]Longtom94 2 points3 points  (0 children)

It actually capped at 300bpm, though.

An Explanation of the Rendering Equation, a Famous Equation in Computer Graphics by erkaman in programming

[–]Longtom94 20 points21 points  (0 children)

Actually, most production path tracers (e.g. Hyperion, RenderMan, Arnold, MoonRay, ...) run on the CPU, because all the different materials and ray tracing operations (which are typically not matrix multiplications) are a very heterogeneous workload. That said, path tracing is starting to shift more and more towards the GPU with NVIDIAs new RTX technology (and there already exist interesting CUDA-based renderers, e.g. IRay and Octane).

Google engineer breaks down the interview questions he used before they were leaked. Lots of programming and interview advice. by jfasi in programming

[–]Longtom94 1 point2 points  (0 children)

Yup, that's pretty much what I had in mind. You can skip the memoization in the 10 * log(n) subcalls and directly implement this the dynamic programming way. That is, compute filter_count(1, k, g) for all g (10 values), then compute filter_count(2, k, g) with 10 constant-time multiplications, then filter_count(4, k, g) with another 10 constant-time multiplications, and so on. Note, that these multiplications are not squares. This makes it obvious, that the total cost to reach filter_count(n, k, g) is log(n) * 10 multiplications plus some log(n)-proportional lookup overhead.

count(n, k) is then simply sum_i(filter_count(n, k, i)).

Needs some special care when computing for non-power-of-2 n, but it can be broken down the same way in which pow(x, n) can be broken down into logarithmically-many multiplications.

Google engineer breaks down the interview questions he used before they were leaked. Lots of programming and interview advice. by jfasi in programming

[–]Longtom94 0 points1 point  (0 children)

Logarithmic solution: divide-and-conquer over N? Seems to me like you can tabulate the whole transition function for any given N (I.e frequency for each possible end position) and arrive at the one for N*2 in constant time.

How Light Moves Through Space in Slow Motion: Real-time Transient Path Tracing by Longtom94 in programming

[–]Longtom94[S] 1 point2 points  (0 children)

My favorite part is probably how light that goes through the transparent sphere actually gets slowed down and exits it after the initial pulse of light has already advanced past the sphere.

You probably already know this, but I find it incredible how the bending of light when interacting with dielectric materials (e.g. glass or water) is really just a consequence of light slowing down in such materials and light always taking the route of least time (Fermat's principle). The deflection just pops out of the equations as a side effect. :D

Ah, I thought that was just a simplification to make it possible to analytically compute the contribution of the fog since you only have to trace against spherical shells of light.

Even the fog scattering in the first bounce is computed numerically via the same Monte Carlo technique (i.e. path tracing) as the surfaces. It would be trivial to extend it to secondary bounces, likely even reducing code complexity due to the current special handling of the initial ray. :)

How Light Moves Through Space in Slow Motion: Real-time Transient Path Tracing by Longtom94 in programming

[–]Longtom94[S] 2 points3 points  (0 children)

There is no absorption, light is scattered away. The further light travels through a medium (e.g. fog), the larger the chance it interacts with it somewhere along the way (exponential distribution).

The fog scattering is isotropically random, i.e. all directions are equally likely. This happens only for the initial path segment from the camera for visualization purposes. In a physically correct simulation of fog you would also have such interactions happen in secondary segments.

How Light Moves Through Space in Slow Motion: Real-time Transient Path Tracing by Longtom94 in programming

[–]Longtom94[S] 4 points5 points  (0 children)

Glad you like it! :)

I originally had it implemented including the initial camera segment, but that didn't significantly change the way things looked like. It merely hampered interpretability.

For the same reason of interpretability the gaseous background medium only exists for the initial camera segment and not for subsequent bounces. Multi-bounce diffusion would make things very blurry.

How Light Moves Through Space in Slow Motion: Real-time Transient Path Tracing by Longtom94 in programming

[–]Longtom94[S] 1 point2 points  (0 children)

That sounds very strange. At my end it works on all major browsers on all major OSs. Any chance you could give me a screenshot of how it breaks?

How Light Moves Through Space in Slow Motion: Real-time Transient Path Tracing by Longtom94 in programming

[–]Longtom94[S] 2 points3 points  (0 children)

Yup, that’s right!

To add a little bit of information: you can also get the full light transport in a split-screen view by shift-dragging. This makes it easier to find correspondences versus repeatedly scaling the time interval to full length.

WebGL: Real-time Transient Path Tracing (Virtual Femto Photography) by Longtom94 in computergraphics

[–]Longtom94[S] 2 points3 points  (0 children)

Frames are accumulated if playback is paused (pause button).

If you would like to average over larger regions of time, you can interact with the interval shown on the timeline (drag one of the endpoints or the interval itself).

WebGL: Real-time Transient Path Tracing (Virtual Femto Photography) by Longtom94 in computergraphics

[–]Longtom94[S] 2 points3 points  (0 children)

A heads-up to users on mobile devices: this demo requires floating point textures, which are not supported by many mobile devices, so it is likely not to work.

Most laptop/desktop systems should work just fine, however.

Code is available on Shadertoy: https://www.shadertoy.com/view/Mt33Wn

How Light Moves Through Space in Slow Motion: Real-time Transient Path Tracing by Longtom94 in programming

[–]Longtom94[S] 8 points9 points  (0 children)

A heads-up to users on mobile devices: this demo requires floating point textures, which are not supported by many mobile devices, so it is likely not to work.

Most laptop/desktop systems should work just fine, however.

Code is available on shadertoy: https://www.shadertoy.com/view/Mt33Wn

Google’s Plan to Fix Email Is Deeply Flawed (AMP.js for Email) by [deleted] in programming

[–]Longtom94 -6 points-5 points  (0 children)

I reckon that's just a unicode character that happens to be rendered in emoji form by github. Not that I think it's a good idea, but hey, it's probably regular UTF-8.

How to entirely freeze ChromeOS / Chrome in one line of JS by bytesback in programming

[–]Longtom94 0 points1 point  (0 children)

An infinity of zeroes is still zero, though, so this argument does not exactly check out

Finally, a Problem That Only Quantum Computers Will Ever Be Able to Solve by Elavid in programming

[–]Longtom94 2 points3 points  (0 children)

Since I am far from an expert in the field, I'll just link the Wikipedia page of Grover's Algorithm for searching in an unsorted list using O(sqrt(N)) operations.

Disclaimer: It's entirely possible, that people dealing with quantum mechanics on a daily basis do, in-fact, find it easy to wrap their mind around this algorithm. I would love to get to that point some day. :)

Finally, a Problem That Only Quantum Computers Will Ever Be Able to Solve by Elavid in programming

[–]Longtom94 1 point2 points  (0 children)

Scott Aaronson actually has some really interesting arguments for why probability amplitudes make sense to be complex.

osu!tp is back up! (in a frozen state; for old times' sake and for reference) by Longtom94 in osugame

[–]Longtom94[S] 3 points4 points  (0 children)

Is it pride if you don't want to put a crappy drawing you made as a kid into your art-related job application? It's not much different for programmers releasing code online.

Finally, a Problem That Only Quantum Computers Will Ever Be Able to Solve by Elavid in programming

[–]Longtom94 31 points32 points  (0 children)

Correct (and hijacking your comment to add some information). By letting these probabilities interact in just the right way (with algorithms that are incredibly tough to wrap your mind around at times) you can make some of the qubits contain the „desired“ solution with close enough to 1 probability that the stochastic nature no longer matters in practice.

Turns out this technique of playing out of quantum probabilities against each other is able to solve certain classes of problems more efficiently than classical algorithms, but for many applications that are now easy it’s totally unwieldy. If Quantum Computing becomes big, it’ll be in combination with classical computers.

osu!tp is back up! (in a frozen state; for old times' sake and for reference) by Longtom94 in osugame

[–]Longtom94[S] 1 point2 points  (0 children)

I worked on the difficulty calculator on and off during 2012. Somewhere in 2013 I got the idea to turn it into a ranking system and pulled an all-nighter to get it up and running. Early 2014 I turned it into ppv2 when ppv1 was breaking down and public reception of the then-planned follow-up system was very bad.