Today is a hefty juggle between keeping up with family in town and brushing up on OpenGL lighting, but I'm managing!
Today was mainly getting back into lighting calculations. On top of reviewing how to put uniforms in structures (like glUniform, but attaching to "struct.member" instead of "member"), I also went back over ambient, diffuse lighting, and specular calculations, combining them with materials to produce:
Lighting! I always forget about the calculation of specular lighting with the dot product of the view direction and the direction of reflection. I also re-learned how to take those calculations and apply them to texture maps instead of specific material colors to produce specular and diffuse mapping like in these boxes below. Imagine multiplying the texture sample by the light quantity instead of a regular color value:
What's next? Going back over the main lights (directional, point, spot with soft cone blending) and multiple point lights before getting back into the advanced stuff with the framebuffer. Onward!
No comments:
Post a Comment