Add documentation on customizing existing light models in light shader
Your Godot version:
Godot 4.5
Issue description:
I needed to customize the light shaders for a 3D project. Namely, doing custom banded toon shading (the built-in toon shader has one band and it's smoothed when I wanted hard edge), specular tweaks, and hard-edge shadows. The current documentation on the light() function in shaders is very minimal, and only gives an example for replicating diffuse lambert:
void light() {
DIFFUSE_LIGHT += clamp(dot(NORMAL, LIGHT), 0.0, 1.0) * ATTENUATION * LIGHT_COLOR / PI;
}
It does not provide any examples for specular light, so I ended up referring to this recreation of the standard lighting shader from Godot 4.1, grabbing the specular calculation code, and customizing it for myself.
It would be nice if the documentation had more lighting examples for those looking to customize the light model. At the very least it should have an example for specular.
URL to the documentation page (if already existing):
https://docs.godotengine.org/en/stable/tutorials/shaders/shader_reference/spatial_shader.html#light-built-ins