Problems with fragment shader transparency

Hi,

I’m trying to write vertex and fragment shader with alpha blend for transparency.

If I turn the ZWrite off the object get completely transparent.

If I turn the ZWrite on it seens to work fine, but the skybox is covered by a solid color.

How can I fix this?

Thank you

I’ve literally copied the code into a new script and now it’s working properly , but not in the old one.

Now I have two scripts with the same code, but one works and the other don’t.

What could be causing this?

After digging some more I found this report:

Changing the material shader “fixes” the problem, but definitely is something that shouldn’t happen…

Thank you!