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 custom effects


Panda3D comes with a handy feature that enables you to conveniently define off-screen render buffers that can be used to render scene information into one or more textures. This allows you to redirect rendering output to intermediate textures that can be used as a base for exciting visuals. Filtering and recombining the previously generated texture data then create the end results of these image-based special effects. This recipe will show you how to use this feature, as it is the basis for any image based rendering effect you are going to build using this engine.

Getting ready

Set up your project folder as in Setting up the game structure found in Chapter 1. Add a directory called shaders at the same level as the src and models directories. Make sure these directories are in Panda3D's asset search path.

How to do it...

Follow these steps to implement a custom post-processing effect:

  1. Open Application.py and add the following listed code:

    from direct.showbase.ShowBase import...