Book Image

Panda3D 1.7 Game Developer's Cookbook

Book Image

Panda3D 1.7 Game Developer's Cookbook

Overview of this book

Table of Contents (20 chapters)
Panda3D 1.7 Game Developer's Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Building a deferred rendering pipeline


Although modern graphics cards are able to push millions of polygons per frame, their abilities in terms of lighting are quite limited when using the traditional, forward rendering approach, where all permutations of lights on scene objects have to be calculated to get the final scene lighting. Some engines circumvent this issue by limiting the number of lights that are allowed to affect the scene, by choosing the ones that are nearest.

But what if we wanted hundreds of lights in a scene? How would we realize that? In this recipe we will see how to solve this problem by building a deferred rendering pipeline that is limited by the number of pixels our hardware is able to push, but not the number of lights in our scene.

Getting ready

Create your project folders according to Setting up the game structure, add a directory called shaders and make sure it is in the engine's search path. If that is done, you're ready to go on.

How to do it...

Complete the following...