• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
  • Help Room /
avatar image
3
Question by siberhecy · Aug 24, 2019 at 01:03 PM · shadertextureshadersmaterialsuniversal

Shader Graph Transparent Texture Problem HELP!

Hello, I have a problem in Unity Shader Graph. Why transparent texture looks like this? Is there any way to make it transparent? alt text

unity-shader-graph-transparent-problem.png (168.6 kB)
Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

3 Replies

· Add your reply
  • Sort: 
avatar image
4

Answer by dan_wipf · Aug 27, 2019 at 10:52 AM

You need to a add Clip function =>
Shader Graph Setup


EDIT:

i do an example Step by Step on a Unlit Graph High Definition RP


  1. Create new Shader => Create/Shader/HDRP/Unlit Graph & Name it as you like

  2. Open the Shader and click on the Unlit Master node. There's a Wheel next to a little arrow(for expand / minimize node Preview) click on it and press on dropdown button called "Surface Type". Default is Opaque, change that to Transparent (Second Option). If needed check Double-Sided for front and back displaying the Texture.

  3. Click on the "+" in the Blackboard Window (where the Name of your shader appears), select Vector 1 and name it "Cutoff". Press on the Mode Dropdown and select Slide. Set the Default value to 0.2.

  4. Create now a new "Step" Node, a "Property: Cutoff Node and a "Sample Texture 2D" Node.

  5. Connect the Cutoff to the Step's "Edge" input and the Alpha Value from the Sample Texture 2D Node to the Step's "In" input. The Output of the Step's Node goes to the Alpha Input from the Unlit Master Node.

  6. Connect the RGBA Channel to the Color Input of your Unlit Master Node.


Works on Unlit and Lit HDRP Graph, and Unlit LWRP (as far as I know haven't tested other Shader Variant's yet)


EDIT 2: ![Example Picture][3]

Now you can do an overlay Material method. Simply add as first Material your Main Opaque Texture (in my case a bark texture). As second Material I added my cutoff material with the Shader example above (in my case a branch texture).


this will result that the transparent texture will be rendered above the main texture => I guess the effect you're looking for


EDIT 3: From the comments, it's a Blend Node in Override Mode what you're looking for, with the Alpha clip Explanation from above => here's the picture:


Explenation



bildschirmfoto-2019-08-28-um-180759.png (502.6 kB)
bildschirmfoto-2019-08-27-um-162444.png (255.8 kB)
Comment
Add comment · Show 14 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image siberhecy · Aug 27, 2019 at 01:23 PM 1
Share

Thanks but I cannot make surface type transparent :(

avatar image dan_wipf siberhecy · Aug 27, 2019 at 02:32 PM 1
Share

@siberhecy I've update my Answer.. (and replaced the picture of the Shader Graph, there was an unnecessary connection. if it still not works let me know.

avatar image siberhecy · Aug 27, 2019 at 02:37 PM 1
Share

@dan_wipf Hey! Thanks for your comment, but there is a problem. I cannot make Surface Type to Transparent because my object is not transparent. The thing I want to do is, for example; I have a "face texture" but this "face texture" doesn't have "eyebrows", I want to combine "face texture" with this "eyebrows texture". So that's why I cannot make surface type transparent. It will be broken when I make transparent :(

avatar image dan_wipf siberhecy · Aug 28, 2019 at 07:39 AM 0
Share

@siberhecy I've update my answer!

avatar image siberhecy dan_wipf · Aug 28, 2019 at 08:31 AM 1
Share

@dan_wipf Yes this is the effect I looking for but I don't have two materials.. How you split up cube into two materials?

Show more comments
avatar image
4

Answer by zain9 · Feb 12, 2020 at 12:40 PM

I faced the same problem, no matter what I did with the transparent texture the result in sample texture was blurry. I just multiplied the RGBA output with the Alpha output and my problem was solved. So that every pixel where the alpha value is zero is negated by the multiplication and hence result in a clear output.alt text


2020-02-12-17-35-17-greenshot.jpg (88.9 kB)
Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by Mehrdad995 · May 16 at 03:32 PM

There was once that I had a similar problem with Transparency and no matter what I did I couldn't have the transparency in my shader, what I was doing wrong was that instead of using the "Sample Texture 2D" I was using "Gather Texture 2D".
Thought it might be good to point that out here.

alt text


screenshot-2022-05-16-195825.jpg (33.3 kB)
Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

284 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Toon Basic shader turns objects pink in 5.3.4f1 1 Answer

How to make a shader with multiple textures, one color for each texture? 0 Answers

AVPro plugin + Amplify Shader 0 Answers

shader graph messes up the texture (2D) 0 Answers

Shader displaying with weird colors 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges