Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question Videos on Quest build (Vulkan) are have massive frame drops but Windows works fine

Discussion in 'XR Interaction Toolkit and Input' started by LuigiNicastro, Apr 24, 2023.

  1. LuigiNicastro

    LuigiNicastro

    Joined:
    Feb 7, 2018
    Posts:
    34
    I have a project where some scenes have videos playing in them. When I go in the scenes the videos have massive frame drops (stutters and lagging). I also notice the rooms with videos get frame drops

    Using OpenXR, Spacewarp, on Vulkan, decoded to lower resolution, turned off multi threaded rendering. At this point I'm open to any suggestions to get this smooth again.
     
  2. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    4,971
    LuigiNicastro likes this.
  3. LuigiNicastro

    LuigiNicastro

    Joined:
    Feb 7, 2018
    Posts:
    34
    1. I've been checking out a bunch of other troubleshooting forums and one said that was the solution but no luck for me
    2. What exactly would I be looking at on the profiler? I do see it calling out the frame drops on the video section but I can't tell where I should be seeing other performance hits in terms of videos
    3. Thanks for the videos, I'll check them out

    I will preface as well, my last build was on OpenGLES3 but now I'm doing a whole rework with custom shaders and running on Vulkan (so I can use Spacewarp). I wonder if it's something with the processing with the new shaders.
     
  4. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    4,971
    In the profiler check the difference between a frame with a spike and one without and check what adds the performance issue.
    If it's in a Unity script, maybe make a bug report
     
    LuigiNicastro likes this.
  5. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,350
    did the videos work fine before in previous applications?
    just wondering if the Codec causes issues, i remember seeing some warnings or error messages in webgl app about video codec.

    are you loading the scenes additively?
    how or where the videos are loaded?
    whats are the video player settings?
    how many videos are playing at the same time?
     
    DevDunk likes this.
  6. LuigiNicastro

    LuigiNicastro

    Joined:
    Feb 7, 2018
    Posts:
    34

    In a previous build. The difference this time is that we are running on Vulkan and I have the entire scene built using custom shaders.

    1. Not additive
    2. They are built into the scene and loaded there
    3. Left them at default, even tried changing to lower the settings drastically
    4. Even in scenes with only 1 video it lags
     
  7. LuigiNicastro

    LuigiNicastro

    Joined:
    Feb 7, 2018
    Posts:
    34
    For now I removed all custom URP for Spacewarp and swapped back to GLES3 and performance is back to normal. Seems like it is something with Vulkan