Skip to content

Does not work with Stereo Rendering #18

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

Open
zxubian opened this issue Dec 2, 2019 · 1 comment · May be fixed by #27
Open

Does not work with Stereo Rendering #18

zxubian opened this issue Dec 2, 2019 · 1 comment · May be fixed by #27

Comments

@zxubian
Copy link

zxubian commented Dec 2, 2019

At present, the shaders do not work properly with Single Path Instanced Rendering, which is commonly used by XR headsets (HoloLens, MagicLeap One).

Please consider adding the following changes:

@MeshChain.cginc:

  1. appdata_meshChain
    {
    UNITY_VERTEX_INPUT_INSTANCE_ID
    ...
    }

  2. struct meshChain_vertex
    {
    UNITY_VERTEX_INPUT_INSTANCE_ID
    UNITY_VERTEX_OUTPUT_STEREO
    ...
    }

  3. meshChain_vertex vert(appdata_meshChain v)
    {
    meshChain_vertex o;
    UNITY_INITIALIZE_OUTPUT(meshChain_vertex, o);
    UNITY_SETUP_INSTANCE_ID(v);
    UNITY_TRANSFER_INSTANCE_ID(v,o);
    UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
    ...
    }

  4. half4 frag(meshChain_vertex i) : COLOR
    {
    UNITY_SETUP_INSTANCE_ID(i);
    ...
    }

@dnnkeeper
Copy link

+1 so obvious necessity! How could one make an official XR asset without following official guidelines?.. Thank you zxubian

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

Successfully merging a pull request may close this issue.

2 participants