I cannot cook any crystal, transparent shaders (but it is working in editor)?

In that picture you can see that I am testing 3 different transparent shaders. 2 are from Amberify, and one is just a simple one I created.
All of them are showing correctly inside the editor, the problem occurs only in a cooked package, in Development or Shipping mode.
I have tried to look for warnings or errors in the cook process but nothing happens, the shaders are compiled with no warning whatsoever.
This problem has started when I authorized virtual textures. But I have checked that all these shaders are not using any VT, and anyway if it was a problem with VT I would have errors or warning.
I am using forward shading, DirectX 12 and I am using a RT4090 video card.

I am out of options, that is why I am posting here, with the hope that someone else got this issue and fixed it.

been out of the loop, but --and this is a random guess-- are they set up to use nanite?
Because nanite nopes on translucency. though… I’d expect you to notice in-editor as well.

I have turned off nanite. I do not use it in the project. But it is an interesting point. I will dig in that direction to see.

The problem seems to be related to REFRACTION. When it is none, it works. When it is on, the shader is not cooking. Anyone got the same problem?

Actually I have this problem in my shaders, many of them. Some pins are greyed and I don’t know why. Is it something to do with my settings?
I have this same problem with other materials that are not transparent and not showing in packages but are fine in the editor.
Any idea?

So here is what I did: I created a brand new material, I copied the material nodes from the ones that is not working in the new one.

It is working!!!

I package and it is working in the packaged game.

But it is not finished, I check back iditor, and guess what? The shader again has the pins gryed and it is not packaging anymore.

Why Unreal destroy these shaders, with no error or warning, while they are actually working?!?!

if you want, try and send me the material. Luos_83 on discord, I can at least check it out and see if there is a weird setting or so.

Else, no clue why its doing this.

I think they changed the refraction a while back to where there’s now a dropdown of types. The old material probably had some default left over from before or it didn’t have one picked. It defaults to none, so the pin will be grayed out by default. You have to enable it first to make the pin become active again.

1 Like

I’ve fixed the problem. It turns out the issue was with the shaders themselves — if I copy their content into a brand-new shader with a different name, everything works fine.

Also, the greyed-out pins were caused by the shader being set to Unlit instead of Default Lit.

Now my crystals are working perfectly in the packaged game.

Thanks everyone for your time and help!