Shader chunk to add to the head of a fragment shader to be able to use Lambert shading.
var color: vec3f = vec3(1.0);color = getLambert(normal, worldPosition, color); Copy
var color: vec3f = vec3(1.0);color = getLambert(normal, worldPosition, color);
parameters used to append the right chunks and calculate the Lambert shading.
Shader chunk to add to the head of a fragment shader to be able to use Lambert shading.
Example