3D Game Shaders for Beginners
The first setup renders the mill scene into a framebuffer texture using a variety of vertex and fragment shaders. Here you see the vertex shader outputting the texture coordinate to the fragment shader. For every light, minus the ambient light, Panda3D gives you this convenient struct which is available to both the vertex and fragment shaders.
Source: github.com