In the previous chapters, we have created a galaxy made of planes, the Earth, a flat-shaded paper plane, and several camera types. With what we have learned in this chapter, we can extend the example and apply shading. We can add more realism to the Earth by adding a shader and a bump map to it. This way we can simulate the presence of the sun and add some relief to the Earth.
Let's take the galaxy example from Chapter 6 as the starting point for this example. There we made use of several classes to create the galaxy. Let's fresh up our memory by summing them up:
Galaxy
creates a visual representation of the galaxy. It adds the Earth and planes that are used as stars.Player
is responsible for creating a flat-shaded paper plane instance as the visual representation of the player.UserInputHandler
takes care of handling the user's keyboard input in order to move our player.CameraController
is used in order to switch between several camera types...