Correcting UV coordinates in a simple stencil buffer material

Hi there, I have a mesh attached to my actor, and this mesh has a material applied to it.

The material is set up as a post processing material like so. It picks up the scene textures fine and I’m able to use the stencil buffer to render.

As you can see from the first image, the material looks like its picking up its texcoords from the screen space rather than the mesh itself… Or perhaps I am mistaken.

Anyway, does anyone know how to fix this? I’ve been really pulling my hair out on this one but as a super amateur to shader programming I’m stumped.