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

Is there any way to test my shader's efficiency?

Discussion in 'Shaders' started by zhutianlun810, Jan 7, 2020.

  1. zhutianlun810

    zhutianlun810

    Joined:
    Sep 17, 2017
    Posts:
    165
    Is there any way to test my shader's efficieny? I feel the profiler and statics in Unity are not clear enough. I would like to know how long does my "vert" and "frag" function take and where is the bottleneck.
     
  2. Invertex

    Invertex

    Joined:
    Nov 7, 2013
    Posts:
    1,539
    There's various external frame debuggers you can use to get a more detailed dive, though they don't offer the same kind of integration Unity has with its own featureset. Nvidia NSight is a particularly in-depth one, but you'll have to compile to a dummy project to test things. You can see a list of recommended ones at the bottom of this page:

    https://docs.unity3d.com/Manual/FrameDebugger.html

    They provide a guide for the VS based debugger:
    https://docs.unity3d.com/Manual/SL-DebuggingD3D11ShadersWithVS.html