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

Standard Shader : Cutout transparency not working

Discussion in 'General Graphics' started by Kasper_OmsK, Apr 22, 2020.

  1. Kasper_OmsK

    Kasper_OmsK

    Joined:
    Jul 9, 2015
    Posts:
    47
    Hi there,

    I set up a material with cutout transparency (I used a gradiant albedo texture just for testing) using the standard shader but the transparent sections just become black.

    Here's my material :
    upload_2020-4-22_16-25-48.png

    And here's the result :

    upload_2020-4-22_16-25-22.png

    I'm pretty sure this is supposed to work. In fact, when I switch the shader to legacy shader > transparent > cutout > diffuse, it works as expected...
    Does the standard shader read transparency differently from the legacy shader ?

    Thanks in advance.

    EDIT : I tried setting the texture as "sRGB" and "single alpha channel". It didn't work
     
  2. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,255
    You have your Standard shader's Smoothness source set to Albedo Alpha. That disables using the albedo texture's alpha for transparency.
     
    A_Marraff likes this.
  3. tahsin3194

    tahsin3194

    Joined:
    Aug 11, 2021
    Posts:
    1
    Same Problem
     
  4. zedz

    zedz

    Joined:
    Aug 31, 2013
    Posts:
    233
    You I have the same problem, but only with builds, where the cutout lpah becomes black.
    If I run in the editor everything works fine
     
  5. ScopeDopeBC

    ScopeDopeBC

    Joined:
    Apr 28, 2022
    Posts:
    3
    Same as above - editor works fine, build gets black instead of transparent
     
  6. c0d3_m0nk3y

    c0d3_m0nk3y

    Joined:
    Oct 21, 2021
    Posts:
    560
    It's the shader graph that breaks it. There are many threads about this already. Please search before you post.
     
  7. korsynx

    korsynx

    Joined:
    Jan 2, 2021
    Posts:
    6
    Please explain what you mean by "it's the shader graph".. This is the only place I could find discussing this issue
     
  8. c0d3_m0nk3y

    c0d3_m0nk3y

    Joined:
    Oct 21, 2021
    Posts:
    560