Search Unity

Why does the standard shader make all my triangles completely black?

Discussion in 'Shaders' started by theforgot3n1, May 26, 2019.

  1. theforgot3n1

    theforgot3n1

    Joined:
    Sep 26, 2018
    Posts:
    3
    Hi Unity, I've been stuck on this error for two days now. The standard shader gives my mass-generated grass blades a bunch of black faces (it's double-sided). When I have unlit, or even mobile diffuse, they're at least slightly NOT black, but the standard shader unfortunately malfunctions. I would really like to have some lightning to make it look more realistic.

    I attached an image for when it's unlit, image for when it's standard (black) and image for when it's mobile diffuse (texture slightly shows).

    Help pls :>
     

    Attached Files:

  2. sylon

    sylon

    Joined:
    Mar 5, 2017
    Posts:
    242
    Do you have a light in your scene?
    If so, is your grass on a layer that your light influences?
     
    theforgot3n1 likes this.
  3. theforgot3n1

    theforgot3n1

    Joined:
    Sep 26, 2018
    Posts:
    3
    I do have a directional light, but what is the layer thing? Never heard of that.
     
  4. theforgot3n1

    theforgot3n1

    Joined:
    Sep 26, 2018
    Posts:
    3
    It's on the Default layer when I look at its inspector. The ground underneath is also on the default layer, but is still rendered.
     
  5. sylon

    sylon

    Joined:
    Mar 5, 2017
    Posts:
    242
    In your light settings there is a "culling mask" value. This holds the layers this light influences.
    Can you post a screenshot of your material settings? And while your at it, also from the light?