getLambertDirect: "\nfn getLambertDirect(\n normal: vec3f,\n diffuseColor: vec3f,\n directLight: DirectLight,\n ptr_reflectedLight: ptr<function, ReflectedLight>\n) {\n let L = normalize(directLight.direction);\n let NdotL = max(dot(normal, L), 0.0);\n \n let irradiance: vec3f = NdotL * directLight.color;\n (*ptr_reflectedLight).directDiffuse += irradiance * BRDF_Lambert( diffuseColor );\n}\n" = ...

Helper function chunk appended internally and used to compute Lambert direct light contributions.