Sobel edge detection off set.

Hello, I have a post process shader that highlights edges in a scene, however it seems to me off center from the actual game image. After quick googling, I found that some fixed this by changing there blendable location, however that setting is gone now, and the other blendable locations ruin the effect entirely.

here are the screenshots of the node and effect:


And here is the code for the Sobel edge detection that is in the custom node:

float2 sobelmatrix[9] = { float2(-1, -1), float2(0, -2), float2(1, -1),
float2(-1, 0), float2(0, 0), float2(1, 0),
float2(-1, 1), float2(0, 2), float2(1, 1) };

float intensity = 1;
float2 gradients = float2(0.0, 0.0); // Initialize as float2

for (int i = 0; i < 9; ++i)
{
int row = i / 3; // Current row
int col = i % 3; // Current column

// Get neighboring pixel offset
float offsetx = (col - 1) / res.x;
float offsety = (row - 1) / res.y;

float2 offsetUV = float2(uv.x + offsetx,
                         uv.y + offsety);
float sampledIntensity = SceneTextureLookup(offsetUV, 14, false); 

gradients += sobelmatrix[i] * sampledIntensity;

}

gradients *= intensity;

return length(gradients);