Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

URP Lit Shader -> Main Preview remains grey

Discussion in '2D' started by mgod1234, Apr 24, 2022.

  1. mgod1234

    mgod1234

    Joined:
    Apr 19, 2022
    Posts:
    2
    Hi all,

    its my first post here :) Iam very new and struggeling very bad with the URP LIT Shader graph. I have some effects (Fresnel, Time, Multiply and so on) and all look fine BUT i only see grey on the Main Preview, no matter what iam doing. (See atteched "shadergraph" picture) When iam connecting the chain to Fragment -> Emission, nothing happends. The only change i can see is the Base Color, but only on the material itself.

    It doesnt matter which tutorial iam trying, nothing happends on my side outside the graph itself. When iam assigning the material to an object, i only can see basecolor. Its frustrating.

    Regular textures on some models are applying as the should, but i still cant do anything with the Lit Shader.

    I would be grateful if someone can help me here.

    My Project -> Graphic settings are atteched

    Best, Marc
     

    Attached Files:

  2. mgod1234

    mgod1234

    Joined:
    Apr 19, 2022
    Posts:
    2
    Just forgot: Its a 2D project. Shadergraph -> URP -> LIT is used and Universal Render Pipeline Asset
     
  3. petr_kolias

    petr_kolias

    Joined:
    May 24, 2022
    Posts:
    1
    Same problem here.
     
    Mist82 likes this.
  4. BlueSin

    BlueSin

    Joined:
    Apr 26, 2013
    Posts:
    136
    Have you properly set your URP renderer in the Graphics section of your project preferences? Typically implementing URP in 2D means creating your pipeline asset, then right clicking said asset and creating a 2D renderer under the rendering menu. Then you select the URP asset and change the renderer from the one that it auto generated, to the new 2D one you just created. After that you have to go into project preferences and set the renderer under the Graphics section, as well as the Quality section (for each quality level). Hope this helps, good luck!

    Afterwards, have you also converted your project and scene to use the new URP renderers? You do this by clicking Assets > Rendering > Update Scene / Update Project, or if using the 2D renderer, those are under Assets > Rendering > 2D > Update Scene / Project.
     
  5. Benz56

    Benz56

    Joined:
    Jul 30, 2022
    Posts:
    1
    I have the same issue. The Main Preview is fine for Unlit shaders, however, when selecting Lit it greys out.
     
  6. dyguests

    dyguests

    Joined:
    May 4, 2015
    Posts:
    7
    same problem for me.

    Lit not shown.
    upload_2022-11-17_23-14-30.png

    Unlit shown.
    upload_2022-11-17_23-15-13.png


    Any solution?
     
  7. Mist82

    Mist82

    Joined:
    May 25, 2020
    Posts:
    1
    Same problem for me. You can see below the difference between lit and unlit.
    In the lit version the preview is always gray.

    lit.jpg unlit.jpg
     
    Last edited: Dec 9, 2022
  8. Invertex

    Invertex

    Joined:
    Nov 7, 2013
    Posts:
    1,495
    Simplest solution, don't use the Lit shader, us the SPRITE Lit material setting. The 2D Render pipeline isn't programmed to utilize the 3D lights but to use the 2D lights. The regular Lit shader has no concept of the 2D lights, so it's not going to render properly. Unlit shader is basically the same between sprite or regular rendering since it doesn't really need to touch anything that differs between the pipelines.

    If you're intending to use 3D and 2D shading in your project, I would recommend sticking to the regular non-2D pipeline of URP.
     
    Yuhigh likes this.