Abstract
Until now, our scene has been lit only by a single directional light. This has worked for us because we’ve been trying to light a simple outdoor scene, and a directional light is excellent at simulating light from the sun. Many games get by with lighting that isn’t any more complicated than this. However, the drawback for keeping lighting so simple is that it limits the amount of flexibility you have when deciding how your project will look. Since we don’t want to always be limited to lighting things with just the sun, this chapter is going to introduce different types of lights commonly used by video games and how to write shaders that work with multiple lights at once. Along the way, we’ll change our example project to be a night-time scene, with a number of different sources of light all working together.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Author information
Authors and Affiliations
Rights and permissions
Copyright information
© 2019 Kyle Halladay
About this chapter
Cite this chapter
Halladay, K. (2019). Lighting in Depth. In: Practical Shader Development. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-4457-9_12
Download citation
DOI: https://doi.org/10.1007/978-1-4842-4457-9_12
Published:
Publisher Name: Apress, Berkeley, CA
Print ISBN: 978-1-4842-4456-2
Online ISBN: 978-1-4842-4457-9
eBook Packages: Professional and Applied ComputingProfessional and Applied Computing (R0)Apress Access Books