Shader chunk to add to the head of a fragment shader to be able to use PBR shading.

var color: vec3f = vec3(1.0);
color = getPBR(normal, worldPosition, color, viewDirection, f0, metallic, roughness);