© Kyle Halladay 2019
Kyle HalladayPractical Shader Developmenthttps://doi.org/10.1007/978-1-4842-4457-9_9

9. Your First Lighting Model

Kyle Halladay1 
(1)
Bristol, UK
 

Diffuse lighting is great for rendering matte (nonshiny) objects, but we need a few more tools in our toolbox if we want to be able to properly render all the objects that a game might have. For example, plastics, metals, mirrors, and wet surfaces are all impossible to render well with just diffuse lighting. Instead, we need to learn some new lighting math to handle shininess. Almost nothing is entirely shiny, or entirely matte, so we’ll have to combine our diffuse lighting calculations with these new ones in order to be able to render everything well.

Games commonly combine several different ...

Get Practical Shader Development: Vertex and Fragment Shaders for Game Developers now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.