Applying metallic in fragment shader

I’m trying to implement PBR decal shader, and I’d like to know, is there a way to apply the default “metallic” PBR property in the fragment shader instead of surface one?

For some reason I cannot get surface shader to work with the command buffer setup.
It works when I supply material for the MeshRenderer, but it’s competely ignored when drawed by .DrawMesh() command.

I’ve managed to set the smoothness / roughness via GBuffer1 / SV_TARGET1 / spec.a inside frag shader, but I’m completely have no clue where or how to apply the metallic value. Haven’t found anything on the topic, any ideas?

I think I found what I was looking for. It’s called DiffuseAndSpecularFromMetallic();

Much more usefull was to look at fragDeferred function, it has all the good stuff.

For the future reference more:

And in UnityStandardCore.cginc