Skip to main content

Lighting in Depth

  • Chapter
  • First Online:
Practical Shader Development
  • 1020 Accesses

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

eBook
USD 16.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 69.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2019 Kyle Halladay

About this chapter

Check for updates. Verify currency and authenticity via CrossMark

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

Publish with us

Policies and ethics