Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice
  2. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  3. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

[Shadergraph] Overlay UI shader appears black in game view

Discussion in 'Graphics Experimental Previews' started by Adrien-Ninpo, Mar 4, 2019.

  1. Adrien-Ninpo

    Adrien-Ninpo

    Joined:
    Oct 2, 2018
    Posts:
    17
    Hi,

    I'm trying to use Shadergraph for the first time, otherwise being used to shaderforge. I managed to get the thing running, but am facing a couple of issue with my shader :

    First, my shader will appear pitch black in game view when applied to an UI image in Overlay mode. It works as intended in the scene view, or when applied to SpriteRenderers or other kind of Canvases (Camera and world).
    Overlay canavs being of course, the one type of display I need.

    Secondly, I can't add a `_MainTex` property to my shader. When I do so, the shader throws various errors and appears magenta, most commonly :
    From the package manager, I've installled the Lightweight Scriptable Render Pipeline.
    I'm running Unity 2018.3
     

    Attached Files:

  2. JonasS95

    JonasS95

    Joined:
    Oct 4, 2017
    Posts:
    3
    I am having the exact same problem.

    Works in scene view or camera preview, but not in game view.

    For me it appears after having installed the lightweight render pipeline and using shadergraph for a custom shader.