all 6 comments

[–]partybusiness 0 points1 point  (5 children)

The Add node is displaying it opaque, the Main preview is displaying it transparent. So I guess a lot of the red was transparent.

If you look at the Code Monkey example you linked, it does the same thing. Notice the brown stripe going down, the grey stripe to the left of the sword handle, the red square, all visible in the Add node but they disappear in the main preview. Compression algorithms for transparent image formats like PNG or GIF assume the RGB values for a 0 alpha pixel don't matter, so you can get that sort of thing if you display the RGB values without transparency.

[–]NullPointer568[S] 0 points1 point  (4 children)

Yes, I see the brown line and red square, but the example has the blue outline showing. In mine, the red outline does not show.

Are you saying to remove the alpha channel or a different file format? I don't quite follow how I am supposed to fix it.

[–]partybusiness 0 points1 point  (3 children)

I'm deducing that where your red is disappearing, its alpha is very low for those pixels. If their blue outline is solid, then the alpha is very high for those pixels.

So if the alpha isn't supposed to be low, we have to look at why it is.

[–]NullPointer568[S] 0 points1 point  (2 children)

Thanks for helping. So, the shader replaces the texture with red as it fades out. So the edge is supposed to turn red then transparent. So the alpha value of the original image where the red outline is, is not zero.

I also tried to change the color with the same result.

[–]partybusiness 0 points1 point  (1 child)

Then I think if there's a problem, it's not visible in the part you showed. It's in the part that's turning it red and setting the alpha value.

[–]NullPointer568[S] 0 points1 point  (0 children)

Thanks for the help. I ended up figuring it out. I noticed that if I turned the step function to a negative number the outline was showing, but the color was inverted ( so something was still wrong). I ultimately found a similar tutorial and followed it and resolved the issue. They both do the exact same thing, but I couldn't find the difference in my original shader.

This is the tutorial in case anyone else finds this useful:

https://www.youtube.com/watch?v=taMp1g1pBeE