Custom Shader Rendering Differently For Each Eye

Hello,

I am trying to build a portal effect using an extra camera, a render texture, and a custom shader very similar to this post. My shader graph is exactly the same in this post with the suggested fixes from Kapolka.

My problem is when I run my app on the headset, the render texture has two separate renders at different positions in each eye causing a lot of distortion. Is this because the camera is rendering in stereo and the render texture is not? Is their a way to fix this?

If you’re only rendering to a single RenderTexture, from a single Camera, then you won’t get a 3D effect. To get that, you would have to render to two RenderTextures (or two sides of the same RenderTexture), one for each eye (with camera offsets corresponding to half the IPD), and use the Eye Index shader graph node on the portal material to select between them.

So I created another camera and render texture to feed into my shader. It seems though that no matter what my camera’s offsets are, the renders are still split up especially when moving forward and away from the camera. I can see I’m rendering the correct textures to each eye though. Am I missing something important here?

Here is my current updated shader.