How to get pixel's neighbors world position in material ?

Is there any way to get the world position of nearby pixels displayed on screen in material ? DX and DY only return the pixel color and are limited to a 2x2 range around current pixel.
I would like to get the world position of each pixel around the current pixel computed by the shader.

The world position?
Cant you just use a depth texture to find exactly what you need?

Maybe, but I solved my problem without using world pos anymore.

1 Like