Search Unity

dx11 black screen when exporting to standalone

Discussion in 'Shaders' started by yvrez, Feb 13, 2013.

  1. yvrez

    yvrez

    Joined:
    Mar 7, 2010
    Posts:
    19
    Hi

    I'm currently experimenting with dx11 compute shaders and sm5 (so powerfull!!) and have already made some nice stuff but i have a stupid problem. In the unity editor everything is working as expected but when i export to standalone (or webplayer i tried too) i only have a blackscreen. If i check the log file there are no errors or warnings.

    I have tried the -force-d3d11 command line and checked that my shaders are in the 'resources' folder but i suspect that it must be another issue. I'm using unity 4.01 last version.

    Here are a few videos of the stuff i'm working on :

    http://www.youtube.com/watch?v=gJyqMTeKcm0
    http://www.youtube.com/watch?v=hhAdlOeMEt8

    Thx in advance!
     
  2. RC-1290

    RC-1290

    Joined:
    Jul 2, 2012
    Posts:
    639
    Do things like UI elements show up?
    Are you sure that the data your shaders need is in memory when rendering? (Especially in the webplayer, data on the GPU sometimes just disappears. )
     
  3. yvrez

    yvrez

    Joined:
    Mar 7, 2010
    Posts:
    19
    Hello RC-1290,

    I pass all the parameters on every update to the compute rendering shader so i don't think that's the issue. I probably miss something really stupid. If a shader was missing from the standalone i suppose that the log file would alert me on that (like a null exception or equivalent) ? I'm going to investigate tonight and probably change the way i instantiate resourses at runtime. Thx for your help :)
     
  4. bajeo88

    bajeo88

    Joined:
    Jul 4, 2012
    Posts:
    64
    I had a similar issue with my dx11 compute shader whereby it worked in editor but not in a built application.

    For me (which might not be the same problem as you) it was because i rendering the particles in unitys OnPostRender() function which was not being fired off because the scene was actually empty. Using OnRenderObject() or adding a cube got around this problem.

    Might be the same issue for you, might not but its a very quick check to perform. Also your videos look very impressive!! Im currently working on a basic particle system using compute shaders but have noticed some odd behaviour which you may have encountered as well; i use a struct which matches the struct in CS and my material shader but when i assign 10 particles only 1 appears (This pattern continues so 100 particles = 10 visible ones). I am confident they are not being rendered in the same location but it is odd that not all particles are being drawn when i am sure all particles are being processed in the Compute shader because if i use CS.GetData the array which returns is off the correct number.

    Sorry to hijack your thread but dx11 threads drop off the list quickly and anyone who has success is usually very quiet. Hope you find your answer!
     
  5. yvrez

    yvrez

    Joined:
    Mar 7, 2010
    Posts:
    19
    Hello Bajeo sorry just catched your message. i'm in a hurry to release a mobile game since last week so i had to put my particle-lab on pause for now.
    Thx for the info i think i'm having the exact same issue as you with an empty scene.

    For you issue you may have an issue on how you define x,y,z threads threadsgroup in the CS and on the unity side (Dispatch) ? I had this kind of issue too and it was related to that. You need to be sure that the correct number of threads will be used to process your whole compute buffer.