The question is answered, right answer was accepted
Transparency shader with graphic graph (URP)
Hi guys,
I have been creating a transparency shader on my game objects.
My shader has these general parameters:
And this is the way I have assigned my nodes:
So far so good, my problem is when I apply the shader to my model because it looks like it has transparent areas or parts that are noticeable when I move the game camera.
Result: link text
Original model with an opaque shader: link text
I know it has to do with ztest but shader graph doesn't give me that node or configuration.
Answer by ab_salazar · Jul 17, 2021 at 01:54 AM
Hello, I managed to solve it. What I did was the following:
1- Make your shader in the graph 2- Select your graph and click "Copy Shader" in the inspector 3- Create a blank unlit shader and open it in visual studio then erase everything 4- Paste the shader code in the clip board to the shader in visual studio 5- Ctrl H to find and replace zwrite off to zwrite on 6- Save it and now you can create materials from it
Basically I had to pass the nodes to code and from there manipulate the Zwrite.