Search Unity

Async Graphics.Blit?

Discussion in 'Scripting' started by The-Oddler, Jun 30, 2016.

  1. The-Oddler

    The-Oddler

    Joined:
    Nov 26, 2010
    Posts:
    101
    I'm using Graphics.Blit to do some water simulations on the GPU. However, Graphics.Blit is a blocking call, so it takes away time from the CPU where it shouldn't.

    I was looking at CommandBuffers, making each of my Graphics.Blit calls a command. However, I can't seems to find how to properly execute the buffer. I found Graphics.ExecuteCommandBuffer but it looks like it is also blocking (though haven't gotten as far as testing it yet).

    So I was wondering, are CommandBuffers the way to go? And if so, how/where should I execute them? Or is there something else that can make my simulation not block the CPU thread?
     
  2. Nanoxin

    Nanoxin

    Joined:
    Mar 25, 2015
    Posts:
    3
    I'm currently also looking into Graphics.Blit and on how to remove the CPU stall.
    From a short conversation with The-Oddler, I do know that he also did not find a solution yet, so we're both still looking for a solution.
    If somebody has any knowledge on how to do it, we'd both be happy! :)

    Thanks!
     
    The-Oddler likes this.