Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stitching offset #2

Open
githubbar opened this issue Oct 26, 2021 · 2 comments
Open

Stitching offset #2

githubbar opened this issue Oct 26, 2021 · 2 comments

Comments

@githubbar
Copy link

Hey, i'm using your shader! Sweet. The stitching seems to be offset. I'm ready to start debugging it, any pointers?

@hakanai
Copy link
Owner

hakanai commented Oct 26, 2021

It's possible that at some point YouTube changed the texture mapping.

The "correct" way to play EAC videos, which this doesn't implement, is to read the mesh data out of the video metadata, construct that mesh around the viewpoint, and then play the video on the texture for that mesh.

There's some info on that here.

There's some related discussion about this over on the youtube-dl issue tracker as well.

If you happen to be using a full game engine where you can read the metadata from the video file yourself and construct a mesh from it, that may produce a better result than my shader.

If you are stuck with something like VRChat like I am, then it might be possible to just steal the offsets from the mesh and do the maths to figure out what the shader has to do to get the right offsets. In my case, I didn't even know the mesh existed at the time, so I was jogging the offsets by hand until it looked right. You'd be changing the OFFSET_ values up the top of the shader and possibly also needing to add a new SCALE_ value for each of the 6 directions.

@githubbar
Copy link
Author

Thanks, looks like I'll have my hands full with reading the meshes from mp4s. Didn't even know it was a thing. Trying to build a 3D stereo viewer for HTC Vive in Unity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants