Desaturate nodes produce compile error in the shader.

Tristan Moore 3 years ago • updated by JVraven 2 months ago 2
Hey first time posting, I looked and it didn't appear this issue had been addressed. I'm working on a skin shader in Unity 5.0.1f and Shader Forge v1.13, and found an odd issue. It looks like the shader will intermittently fail to compile if I have the desaturate nodes plugged into spec, transmission or light wrapping. I can usually compile it once and have it work, but if I go back to make any changes it will fail predictably. Our game has a color saturation mechanic so we have to have desaturate options for all characters/objects.

I'm not sure if this is a bug or based on my usage. Desaturate works fine in the albedo, but seems to produce errors in all the other slots. I get this error:

Shader error in 'Custom/SkinShader': incorrect number of arguments to numeric-type constructor at line 203 (on d3d11)

After my first compile (which seems to work as a fluke), the shader turns pink until I eliminate the desaturation everywhere but the albedo. I THINK this is a bug relating to the output of the desaturate node, but I can't be sure as I'm not a professional shader programmer. Any help would be greatly appreciated!

I'm also encountering this issue.  If I detach and hook up the desuration node, it works once.  Then if I load it up later, it's giving me an error:

Shader error in 'Shader Forge/Magic_PostEffect': incorrect number of arguments to numeric-type constructor at line 69 (on d3d11)