hakanai / EACSkyboxShader

Panoramic skybox shader for Unity, suitable for playing YouTube videos which are laid out as equi-angular cubemap.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Stitching offset

githubbar opened this issue · comments

commented

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

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.

commented

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.