Problem with SceneTextureLookup in vulkan UE5.1

Hi everyone

So i’m trying to use a shader that uses custom stencil and custom depth buffer for mobile vr quest 2, but it seems that instanced stereo rendering causes problems when sampling uvs of the depth buffer, in the build the shader in the left eye works perfect but in the right eye the visual effect has an “offset”, i think the problem is similar to this described from Ben Peck with his outline shader.

the problem is when i try his solution, scenetexturelookup works in es3.1 but when i switch to vulkan sm5 the shader don’t compile it gives me the errro;

err0r X3004: undeclared identifier ‘SceneTextureLookup’

Anyone know how to call scenetexturelookup for android sm5, or an alternative solution ?

Thank you!

I have same problem