Amplify Shader - Outline - Blue and green color is transparent

Hello! I’m newbie in shaders, so I can’t understand why my shader is not work.
I using Amplify Shader Editor to create Outline shader for SpriteRenderes (not 3D Objects).
I used tutorial for Unity Shader Graph (why not use shader graph? We cant use URP at this moment).
It almost work except one moment - outline coloring.

Problem is: when I set color in unity, blue color became transparent!

I dont understand why it works so. I have feeling I dont understand some basic principles.


what is going into the Subtraction node before clamp? the color channel?

the clamp vector4 (-> subtraction) might be tracked as Yellow (i.e. blue = 0)

if that is what you are doing then vertex blue is going to become 0
you might need to use only the alpha channel to make the outline, but we can’t see the rest of the graph

Sorry! This is full shader screen. It is texture alpha offsets and adds before clamp.

well nothing looks wrong, but we can try to deduce a fix.

Screenshot 2021-09-16 220119

isolate just the vertex alpha for the opacity input
use another mult node for the emissive input

Sorry, it seem I cant understand you (lack of termins knowledge too).
Vertex alpha - it is Alpha channel from Texture Sample?
Mult node, that you draw, is just the same I already have.
If I use only texture opacity, outline doesnt draw (it is clear why);
And I dont understand purpose of multiply Subscract and Color Alpha.
Althrough, I tried; it didn’t result somehow (in any possible node connections).

I found soluton; thank you for replying me!
Problem really was in using R channel in opacity calculating. It doesn’t draw on shader preview, it is very dissappointiong(

1 Like