Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Learn OpenGL

You're reading from   Learn OpenGL Beginner's guide to 3D rendering and game development with OpenGL and C++

Arrow left icon
Product type Paperback
Published in Aug 2018
Publisher Packt
ISBN-13 9781789340365
Length 208 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Frahaan Hussain Frahaan Hussain
Author Profile Icon Frahaan Hussain
Frahaan Hussain
Arrow right icon
View More author details
Toc

Effects of lighting , Materials and Lightmaps

In the previous chapter, we discussed how to apply transformations and projections to objects. We also created multiple cubes and a Camera class to clearly view and navigate around those objects. In this chapter, we're going to look at lighting. Firstly, we're going to discuss the basics of colors with respect to our objects and the source of light. We'll also discuss creating a vertex shader and a fragment shader, like we had in the previous chapters for our object box. We'll be creating a shader for an actual light source such as a lamp. You'll also learn how to apply materials to your object cube and you will observe the effect light has on those materials.

In this chapter we'll cover the following topics:

  • The basics of colors in lighting and lighting effects on objects
  • Effect of light on a type...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image