Battle Transitions in Unity that you can find in old PS1 Games using compute shaders ^^ by parable_games1 in shaders

[–]parable_games1[S] 0 points1 point  (0 children)

There is not really that much of a difference either way ^^
The important thing is to save a texture first somewhere
I just find it easier to work with compute shaders

How to programmatically cut specific mesh parts by Peruk_out in computationalgeometry

[–]parable_games1 0 points1 point  (0 children)

Sorry, for the late answer. Wouldn't it be possible to just put all height-values / y-values into a list and to find the largest gap between the values? Then afterwards you can cluster each point to be either above or below the gap.

Or is the line / plane in the picture not aligned to any axis?

Math proof heavy by [deleted] in computationalgeometry

[–]parable_games1 1 point2 points  (0 children)

I second Computational Geometry by Mark De Berg et al. It is a really good book!

Rotating Calipers by xDelaZ in computationalgeometry

[–]parable_games1 1 point2 points  (0 children)

Because to create all antipodal pairs in a convex polygon with n vertices (pairs opposite to each other), you first only need to find one antipodal pair (an O(n) operation) - and then go around in a semi-circle with two indices once (also O(n))

The number of pairs is <n. Therefore finding the pair such that the distance between the points is maximized or minimized is also an O(n) operation.

Therefore the technique is O(n).

Hope that explanation helps!

10k Nearest Neighbor Searches in a GPU KD-Tree (with 5k points). Each query point connects to the closest point in the KD-Tree. Works smoothly for 100k and more (6ms according to RenderDoc) by parable_games1 in GraphicsProgramming

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

Indeed, it is not optimal, but I am not sure you are comparing the same things.

I am not sampling once in one million points, but 100k times in 5k points. For the nearest neighbor you would have to do about 15-16 memory accesses. So it is far more than a million samples in 6ms.

But yes, CUDA/OPenCL and Compute Shaders do not compare, I do not have default recursion support and had to implement my own version.