Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Resolved Unity not convert standard shader automatically for singlepass while using my own XRDisplaySubsystem

Discussion in 'General Graphics' started by Xxxxxxxu, Aug 31, 2023.

  1. Xxxxxxxu

    Xxxxxxxu

    Joined:
    Aug 1, 2017
    Posts:
    12
    Hello everyone,

    I have implemented a DisplayProvider for XRDisplaySubsystem on my own, and successfully loaded it in Unity.

    According to the APIs of Native and Unity, it is currently in the SinglePassMultiview state during runtime. I have also implemented the singlepass renderpass with 1 render pass and 2 render parameters, and have tried to allocate textures by myself or by using Unity's textures.

    My device is equipped with an XR2 Soc and supports GL_OVR_Multivew, GL_OVR_Multivew2, and GL_OVR_Multiview_Multisampled_render_to_texture GLES extensions.

    However, I am unable to get the texture_2D_array with the correct content rendered. After using RenderDoc, I found that the shader is still of the multipass version instead of the singlepass version. I suspect that Unity XR should be automatically converting shaders for us, so there might be some bugs with my pipeline.
     
  2. Xxxxxxxu

    Xxxxxxxu

    Joined:
    Aug 1, 2017
    Posts:
    12
    The Shaders should be compiled into GLSL with multi-view related keyword ON.