Search Unity

  1. Unity 2019.1 is now released.
    Dismiss Notice

Advanced shader debugging with unity

Discussion in 'Shaders' started by sebas77, May 15, 2019.

  1. sebas77

    sebas77

    Joined:
    Nov 4, 2011
    Posts:
    798
    Useful links:


    Tool related links:

    RenderDoc


    Pix:

    Hints:

    1) #pragma enable_d3d11_debug_symbols makes the shader code much more readable. Using it with a development building, would get me much more information like comments in the disassembled HLSL and the original code too.

    upload_2019-5-16_12-30-45.png

    upload_2019-5-16_12-31-10.png

    2) apparently #pragma enable_d3d11_debug_symbols would work with d3d12 and pix too (not tried yet)

    3) I am not using pix or VS as not only it worked in seconds with RenderDoc, but now render doc is even integrated in the editor: https://docs.unity3d.com/Manual/RenderDocIntegration.html

    4) I strongly advise to try https://assetstore.unity.com/packages/tools/utilities/hdg-remote-debug-live-update-tool-61863 which can be very helpful either to profile and debug

    5) 2019.1.0 : Shaders: Improve shader debugging by disabling the optimiser when generating debug shaders i.e. #pragma enable_d3d11_debug_symbols.

    Summoning @phil_lira for more info :)

    If you have anything to add, please let me know that I will add it here
     
    Last edited: May 16, 2019 at 5:23 PM