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 Alpha Cutoff issue - I'm not sure if is a bug or not.

Discussion in 'General Graphics' started by muntes, Oct 20, 2023.

  1. muntes

    muntes

    Joined:
    Nov 24, 2021
    Posts:
    16
    I'm porting from unity 2018 standard pipeline to 2023 with URP.
    Previously, for cutoff, I was doing something like this in cg:

    #if defined(_HAS_CUTOFF)
    clip(col.a - _Cutoff)
    #endif

    I've implemented all the shaders correctly in Shader Graph, but I can't get a 1:1 version of it. I keep getting artifacts from the old textures.

    The alpha from above comes from the diffuse texture as it should.



    Alpha clip is linked like this:
    upload_2023-10-21_1-50-53.png

    Both this versions generated me assets which were ok, but have on top white bars like:






    I wonder if I'm doing something wrong or if it is from porting; any input is welcomed.
     
  2. kdgalla

    kdgalla

    Joined:
    Mar 15, 2013
    Posts:
    4,408
    If you're getting a little border of color bleed on the edge of your texture, then go in to the texture import options. Make sure your wrap mode is set to "clamp".