It's pretty simple and I understand what it is supposed to do. I triple checked the TextureDimension and I'm certainI pass the correct value.I tried to find a way around this problem or come up with my own solution, but it didn't work out and I'm sure the samplein the blog post should work.

I actually played with something similar a few weeks back.Looking at your distortion map, it seems that to the left and right you have walls, meaning, everything ends up in shadows... which also seems more evident as it becomes wider in the second pass, as the algorithm propagates the shadows.

Try a different picture without the center walls and see what happens.

EDIT: Wait a bit, I'm looking at it the wrong way I think, those are the outer walls of course.

EDIT: From looking at the results from the first pass, it seems like it's scaling it down incorrectly, rather than scaling it down, it's cropping it.

EDIT: From looking at the results from the first pass, it seems like it's scaling it down incorrectly, rather than scaling it down, it's cropping it.

That's what I think, too, but why would it do that? The shader is straight forward, it compares the current pixel with the next pixel on the right and writes the one with thelowest distance to the render target. The only thing I could imagine is, that the UV-Coordinates are messed up. But even that would give different results than just cropping the right half, wouldn't it?Well, I'll keep trying, maybe it's just one of those tiny stupid mistakes...

EDIT: From looking at the results from the first pass, it seems like it's scaling it down incorrectly, rather than scaling it down, it's cropping it.

That's what I think, too, but why would it do that? The shader is straight forward, it compares the current pixel with the next pixel on the right and writes the one with thelowest distance to the render target. The only thing I could imagine is, that the UV-Coordinates are messed up. But even that would give different results than just cropping the right half, wouldn't it?Well, I'll keep trying, maybe it's just one of those tiny stupid mistakes...

From what I can tell, it's cropping it to half the size, but fixed to the left.

EDIT: Wrong again! Opened it in photoshop, the vertical size is correct, but it's stretched horizontally by a factor of two, so the right half is missing (basically, it's never scaled down in X).

hmm, I got it working now, but I used alot of the sample code. That's not optimal as I wanted to learn something from it
and I don't know what was wrong before. But it will do for now. When I get back to it and find a solution I'll post it here.
Thanks for your help anyway, I appreciate it