Skip to content

Does not work with Stereo Rendering #18

@zxubian

Description

@zxubian

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);
    ...
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions