Search Unity

Find why a shader is not supported on my GPU?

Discussion in 'Web' started by sebj, May 13, 2018.

  1. sebj

    sebj

    Joined:
    Dec 4, 2013
    Posts:
    70
    Hi,

    I have a utility shader that does some calculations on the GPU. The shader works in the Editor with Graphics Emulation set to Shader Hardware Tier 3 and WebGL 1.0.

    When I load the scene in the browser, I receive the error:

    "Shader is not supported on this GPU (none of subshaders/fallbacks are suitable)"

    While that is helpful, it would be more helpful to know why the shader is not supported. Where can I find out (e.g. via more verbose logging, etc) why the shader is not supported?

    Sj
     
  2. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
  3. sebj

    sebj

    Joined:
    Dec 4, 2013
    Posts:
    70
    Thanks Hippocoder. That page is good but it would still be useful to have proper errors in the browser.

    (In the end I just resorted to commenting out bits of the shader in a binary-search pattern and found the issue was with flow control - nothing mentioned by the WebGL page or that showed as an error in the Editor)

    Not sure how else I would have found that. Next time I'll try WebGL inspector. I also wonder what the browser calls to compile the shaders, maybe we could do the same outside and get more detailed reports...