Hello,
I wrote a shader for transparent objects using this guide: mispy
I was wondering if something similar was possible with Shader Graph?
The main idea is to prevent alpha overlap of objects with a given material:
Hello,
I wrote a shader for transparent objects using this guide: mispy
I was wondering if something similar was possible with Shader Graph?
The main idea is to prevent alpha overlap of objects with a given material:
I also look for this but can’t find anything…
Hi, Has anyone found a solution? My line render lines with transparency additive look unappealing
I too am looking for a solution for this.
Thank you,
Chris
I found a semi solution by using Scene Color instead of plugging in alpha. The only issue is that it obscures other transparent objects. At least it fixes the self overlapping transparency.
Same issue here. Have been avoiding learning HLSL cause I have too much to do. Would love a Shader Graph solution.
I’m going to try to put an end to this thread with some bad news.
It’s not possible.
That’s what I was beginning to feel was the case. Aka, it’s not possible to do … yet.
It would be nice if Unity expanded Shader Graph to make this possible.
As an aside, please send me any good book recommendations for learning HLSL.
What about this: unity - How to write a transparent shader for a sprite that ignores transparent sprites behind it? - Game Development Stack Exchange
Stencil render state settings are not exposed on Shader Graph, which is why it’s not possible.
Does anyone have access to the original shader? The link doesn’t work anymore.
Usual approach for this is to render all transparent objects to a render texture, then blend the render texture itself.
Another way to do it is using the stencil buffer to ignore fragments that have already been rendered to the screen.
Neither can be done using ShaderGraph alone.
It doesn’t look like this is in the works either. At least from what I can tell on the Product Board for ShaderGraph https://portal.productboard.com/unity/1-unity-platform-rendering-visual-effects/tabs/7-shader-graph
But I could be missing something as this isn’t an area of expertise for me. Would any of the features Under Consideration or In Progress make this possible?
If not, let’s get this submitted in there.
I see Blending Modes is now listed as Under Consideration in the Product Board for Shader Graph.
Go vote if this is something you need.
Use Lerp node instead?
I’m looking for this too… I came up with a bad work around with a lot of limitations. I combined some different nodes mainly adding a blend node set to “negation” and then putting the opacity to 0.75 seems to work. The main issue is that if a third shape overlaps it creates uneven sections. There’s also a faint edge visible in this example, but I bet that could be ironed out with some more fiddling.
But in either case, there should be an easier solution!