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

Question Unity Shader Emission is not showing (URP 2D)

Discussion in 'Shader Graph' started by shaherfi, Jun 13, 2022.

  1. shaherfi

    shaherfi

    Joined:
    Mar 27, 2020
    Posts:
    1
    Hi there, I am trying to create a holographic card in Unity 2D but for some reason, whatever I plug into emission in the shader graph seems to be ignored by the material.

    #1
    upload_2022-6-13_11-42-59.png


    Here in image #1 you see I have some things plugged into Emission.

    #2
    upload_2022-6-13_11-44-44.png

    However, it does not show up in the material preview (#2).

    #3
    upload_2022-6-13_11-45-35.png

    And naturally it does not show up on the object with the material too (#3). Changing the base colour however does change the colour of the material and it does reflect on the object. So it appears to be just the emission that is being ignored.

    I am trying to follow this tutorial by Binary Lunar.


    #4
    upload_2022-6-13_11-47-56.png

    #5
    upload_2022-6-13_11-49-21.png

    Downloaded his project files and the are working fine(#4). However when I import these exact same files into my own project file, they become completely greyed out (#5). I have also tried creating a new empty 2D(URP) project and they are also grey.

    Question: Does anyone know what might be the problem here ? Is there a setting that I have forgotten to switch on ??? Is there a solution for this or is this a strange bug? Any help would be much appreciated! (P.S I am new with playing around with shader graphs so please bear with me)

    Update!: Created a new empty Unity 3D (URP) project and it seems to be working. However, what I dont understand now is what about Unity 2D (URP) makes this not work ?
     
    Last edited: Jun 13, 2022
    Coccho likes this.
  2. dapken

    dapken

    Joined:
    Oct 21, 2017
    Posts:
    2
    Hey,
    late answer to this, but for me it had to do with the fact that my Universal Render Pipeline Asset (Project Settings -> Graphics -> Scriptable Render Pipeline Settings) had a Renderer 2D Data in the Renderer List. When I replace it with a Universal Render Data (Create -> Rendering -> URP Rendering Feature), the Emission is shown. I can't tell you if that change is advisable for a 2D game though.

    Good luck and cheers
     
    Coccho likes this.
  3. Lo-renzo

    Lo-renzo

    Joined:
    Apr 8, 2018
    Posts:
    1,323
    Are you using the 2D Renderer? You say Unity 2D so could be either that or standard URP. If you are using the 2D Renderer, the reason your material doesn't work is that the 2D Renderer uses totally different lighting. If you're not using the 2D Renderer, disregard the rest of this post.

    To fix, emission requires the use of a Sprite Custom Lit material following the example below.
    Sample here:
    For other 2D Renderer features, check out this sample project.
     
    kayroice, breylinlee and Coccho like this.