Processing/GLSL expert Thomas Diewald has written and posted videos about 2D pathfinding and raycasting
thomasdiewald.com/blog/?p=2949
Warning, this first paragraph is about 3D so I’m not sweating the details.
But then he writes this:
So I’m thinking for 2D he doesn’t even use an equivalent of a Render TOP and a Camera. A GLSL TOP approach would suffice.
Then he write this
thomasdiewald.com/blog/?p=3250
Unfortunately, I haven’t figured out what he means by generating rays. I might take some ideas from this thomasdiewald.com/blog/?p=2949) until I find the target or something that has seen the target (or something that has seen something that has seen the target etc.) Early on, plenty of pixels would halt before finding something, but I’d imagine after a few frames there’d be a cascading effect that fills out the distance field. Share your thoughts!
PS. To get a pathfinding result, take a Sobel Filter of the distance field.
Update:
Hooray I got it working mainly thanks to lodev.org/cgtutor/raycasting.html