Search Unity

Performance: Load a large texture without frame drop.

Discussion in 'General Graphics' started by darkesco, Aug 3, 2019.

  1. darkesco

    darkesco

    Joined:
    Mar 19, 2015
    Posts:
    61
    Hi.

    I'm working on a VR game and have 2048x2048 sky textures. Everything runs well, until the sky changes and then frame drop occurs. I'm using resources.load(). Is there a way to load the texture gradually in the background until it is ready for render? I have day/night/week cycle in my game and the image changes at midnight. I can have the skydome stay a solid color for a long time without the user really noticing. However the frame drop is noticeable and I cannot pre-load 7+ 2k textures into memory. Any ideas?
     
  2. iSinner

    iSinner

    Joined:
    Dec 5, 2013
    Posts:
    201
    Asynchronous texture upload might be something you would want to experiment with.

    Try setting the size of the ring buffer to the size of your 2k texture, tell me if it helped.
     
  3. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,619