0
Not a bug

Shader won't compile, is not actually PBL, but says it requires metallic/specular

Germain 9 years ago updated by Freya Holmér (Developer) 9 years ago 5
I'm not sure what's going on here. Just migrated to Unity5, and some of my pretty simple shaders won't compile anymore.

Image 409

Answer

Answer
Not a bug
In Unity 5, there's no such thing as non-PBR deferred, except in the legacy deferred system, which is no longer supported by SF. So, you are using PBR :)
Answer
Not a bug
In Unity 5, there's no such thing as non-PBR deferred, except in the legacy deferred system, which is no longer supported by SF. So, you are using PBR :)
Oh. I see. So I guess I should simply plug in a zero value in the specular input.

I just feel this defeats the purpose of SF re-compiling according to the plugged inputs if I'm not allowed to "not" plug anything in the specular slot.

Thanks for the answer :)
It's simply because PBR without specular isn't PBR at all, and thus all the math behind it falls apart! It's no additional cost in the Deferred pipeline either, it assumes all shaders use all parameters
Makes sense. I'm just used to the idea that you can compile a shader in SF without anything plugged in, and it still works, making the learning curve so much smoother. The fact that some slots are now required that I might not need (ie: deferred with zero specularity) seems like it requires prior knowledge of how things work under the hood.

At the moment, porting my game to Unity5 will require me to go into every shader and add this zero value for no other reason than the one you stated.

Anyway, It's probably more work for you than me so I'll go along :)

Cheers!
That's only when you're using deferred - you can still use the non-PBR mode with forward rendering!
Also, when you open a preset, you now get to choose which type of shader you want to start out with, it has both PBR and non-PBR as templates :)