Just started to use Godot today, and the first thing I tried is writing a PBR shader. Crazy me!
This is what I have so far. Not quite there, but it's a start.

I'm pretty sure reflections are not ok and they're just a basic addition to albedo, this far. Cook-Torrance specular seems to be working fine, on the other hand.
The worst thing is that I'm not acoustomed to separate fragment from lighting part, and this is driving me crazy.
Now the questions (a lot):
Do I need to do a linear/gamma correction of the textures (they are sRGB)? When I do, it doesn't look as expected.
For creating shadows, do I need to create a depth map, or can I get it somewhere and pass it as a uniform? How about shadow matrix? Could help a lot to have these as prebuilt uniforms.
I cannot access VAR1 and VAR2 varyings from the Lighting tab. I believe this is a temporary bug?
When accessing matrices, I cannot access values directly, as for instance:
INV_CAMERA_MATRIX.x.xyz
I have to do:
vec4 camMat1 = INV_CAMERA_MATRIX.x;
camMat1.xyz;
This would be a temporarily bug, as well, as I have seen it done in the documentation examples. right?
Thanks in advance. Looking forward for an improval on shader language documentation.