ABSTRACT

Introduction Shaders allow for a stunning level of realism in games, and the rate at which the hardware is improving is staggering . I purposely wrote this book to address core principles of game art creation that don’t change or that change very slowly . Hardware and technology change rapidly, but that doesn’t alter the basics of texture, shader, and material creation-at least not yet . Figure 3 .1 shows some recent screenshots provided by Unigine Corporation of shaders in action . The top scene is from Tropics, a benchmark demo that depicts tropical paradise using many shaders: ocean waves stretch off into infinity and undulate, sparkle, refract, and so on . The lagoon islands have sandy beaches with crisp shadows and crawling crabs . There is a ton of detail in this one shot alone as the sun sets on the scene, bathing the huts in color and shadow . The vegetation sways as a gentle ocean breeze passes through . In the animated version of this image (running in real time as a game), you can see the waves crashing on the shore and the clouds moving; there is a lot going on! The two following images show the DirectX 9 version and the DirectX 11 version of the same scene . You can see that the roof and stonework in the building are the places of the most distinction between

the two scenes . In the image on the left, the stonework is flat; in the right, it stands out prominently, even casting shadows . This is because DirectX 11 now uses tessellation, which is one of the more important DirectX 11 features . Tessellation uses a height map to determine the extent to which a feature should protrude from a surface and actually divides up the mesh and pushes the geometry out from the surface .