Skip to main content

All Questions

Tagged with
0 votes
2 answers
217 views

Relative coordinates -- cumulative sum

I have a vertex shader happily producing all the vertices I want for a 2D plot. Now I want to also render a plot of the same data, but each point relative to the previous one, like SVG Paths using <...
Nick's user avatar
  • 11
2 votes
1 answer
510 views

Having trouble implementing distance transform with jump flood

I'm attempting to use the jump flood algorithm to compute distance transforms of an arbitrary texture derived from a canvas2d context, roughly following the explanations detailed here/here. In the ...
Nico's user avatar
  • 23
3 votes
1 answer
1k views

How do I efficiently calculate the distance to the edge of a shape?

I'm trying to implement something like an "inner glow". That is, I have an image which defines the shape of an object, and then I want to create overlay that is a gradient that goes from the ...
Steinbitglis's user avatar
9 votes
2 answers
3k views

Why are oct trees so much more common than hash tables?

When reading papers I commonly find Oct tree implementations of geometry representations to sort the data. However whenever I think about the problem hash tables seem better overall. Hash tables have ...
Makogan's user avatar
  • 1,736
8 votes
3 answers
264 views

What algorithm is used in the animation of the uTorrent 's "About window"?

In a recent version of uTorrent , if you open the About Window, you will see an animated background , which is kind of waves that go on forever. How can this be achieved? Is this kind of a well-known ...
Wfi Okly's user avatar
  • 103
7 votes
1 answer
252 views

Shadow map projection issue

I am using Unity but this question might not be proper to this engine. I have projected the shadow map onto this sphere but there are grazing shadows. Is it possible to avoid it or to correct it as I ...
MaT's user avatar
  • 1,229
8 votes
1 answer
896 views

How to implement a realtime 2D light renderer with fog/colored light on the GPU?

Since long ago I wanted to implement a 2D lightning algorithm based on an idea I saw on YouTube. The video is realtime, but it runs on the CPU and the resolution is pretty low. I'm curious if anyone ...
sydd's user avatar
  • 253