Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
OpenGL 4.0 Shading Language Cookbook

You're reading from   OpenGL 4.0 Shading Language Cookbook With over 60 recipes, this Cookbook will teach you both the elementary and finer points of the OpenGL Shading Language, and get you familiar with the specific features of GLSL 4.0. A totally practical, hands-on guide.

Arrow left icon
Product type Paperback
Published in Jul 2011
Publisher Packt
ISBN-13 9781849514767
Length 340 pages
Edition 1st Edition
Tools
Arrow right icon
Toc

Table of Contents (16) Chapters Close

OpenGL 4.0 Shading Language Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
1. Getting Started with GLSL 4.0 FREE CHAPTER 2. The Basics of GLSL Shaders 3. Lighting, Shading Effects, and Optimizations 4. Using Textures 5. Image Processing and Screen Space Techniques 6. Using Geometry and Tessellation Shaders 7. Shadows 8. Using Noise in Shaders 9. Animation and Particles Index

Introduction


It's easy to use shaders to create a smooth looking surface, but that is not always the desired goal. If we want to create realistic looking objects, we need to simulate the imperfections of real surfaces. That includes things such as scratches, rust, dents, and erosion. It is somewhat surprising how challenging it can be to make surfaces look like they have really been subjected to these natural processes. Similarly, we sometimes want to represent natural surfaces such as wood grain or natural phenomena such as clouds.

All of the preceding effects have qualities that are random in nature. Therefore, you might imagine that we could generate them by simply using random data. However, random data such as the kind that is generated from a pseudorandom number generator is not very useful in computer graphics. There are two main reasons:

  • First, we need data that is repeatable, so that the object will render in the same way during each frame of the animation. (We could achieve this...

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