OpenGL 4.0 Shading Language Cookbook and over one million other books are available for Amazon Kindle. Learn more

Vous voulez voir cette page en français ? Cliquez ici.


or
Sign in to turn on 1-Click ordering.
More Buying Choices
Have one to sell? Sell yours here
Start reading OpenGL 4.0 Shading Language Cookbook on your Kindle in under a minute.

Don't have a Kindle? Get your Kindle here, or download a FREE Kindle Reading App.

OpenGL 4.0 Shading Language Cookbook [Paperback]

David Wolff
4.5 out of 5 stars  See all reviews (2 customer reviews)
Price: CDN$ 56.47 & FREE Shipping. Details
o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o
Usually ships within 1 to 2 months.
Ships from and sold by Amazon.ca. Gift-wrap available.

Formats

Amazon Price New from Used from
Kindle Edition CDN $16.49  
Paperback CDN $56.47  
There is a newer edition of this item:
OpenGL 4 Shading Language Cookbook, Second Edition OpenGL 4 Shading Language Cookbook, Second Edition
Currently unavailable
Join Amazon Student in Canada


Book Description

July 1 2011

Over 60 highly focused, practical recipes to maximize your OpenGL Shading language use

  • A full set of recipes demonstrating simple and advanced techniques for producing high-quality, real-time 3D graphics using GLSL 4.0
  • How to use the OpenGL Shading Language to implement lighting and shading techniques
  • Use the new features of GLSL 4.0 including tessellation and geometry shaders
  • How to use textures in GLSL as part of a wide variety of techniques from basic texture mapping to deferred shading
  • Simple, easy-to-follow examples with GLSL source code, as well as a basic description of the theory behind each technique

In Detail

The OpenGL Shading Language (GLSL) is a programming language used for customizing parts of the OpenGL graphics pipeline that were formerly fixed-function, and are executed directly on the GPU. It provides programmers with unprecedented flexibility for implementing effects and optimizations utilizing the power of modern GPUs. With version 4.0, the language has been further refined to provide programmers with greater flexibility, and additional features have been added such as an entirely new stage called the tessellation shader.

The OpenGL Shading Language 4.0 Cookbook provides easy-to-follow examples that first walk you through the theory and background behind each technique then go on to provide and explain the GLSL and OpenGL code needed to implement it. Beginning level through to advanced techniques are presented including topics such as texturing, screen-space techniques, lighting, shading, tessellation shaders, geometry shaders, and shadows.

The OpenGL Shading Language 4.0 Cookbook is a practical guide that takes you from the basics of programming with GLSL 4.0 and OpenGL 4.0, through basic lighting and shading techniques, to more advanced techniques and effects. It presents techniques for producing basic lighting and shading effects; examples that demonstrate how to make use of textures for a wide variety of effects and as part of other techniques; examples of screen-space techniques, shadowing, tessellation and geometry shaders, noise, and animation.

The OpenGL Shading Language 4.0 Cookbook provides examples of modern shading techniques that can be used as a starting point for programmers to expand upon to produce modern, interactive, 3D computer graphics applications.

What you will learn from this book

  • Compile, install, and communicate with shader programs
  • Use new features of GLSL 4.0 such as subroutines and uniform blocks
  • Implement basic lighting and shading techniques such as diffuse and specular shading, per-fragment shading, and spotlights
  • Apply single or multiple textures
  • Use textures as environment maps for simulating reflection or refraction
  • Implement screen-space techniques such as gamma correction, blur filters, and deferred shading
  • Implement geometry and tessellation shaders
  • Learn shadowing techniques including shadow mapping and screen space ambient occlusion
  • Use noise in shaders
  • Use shaders for animation

Approach

This hands-on guide cuts short the preamble and gets straight to the point - actually creating graphics, instead of just theoretical learning. Each recipe is specifically tailored to satisfy your appetite for producing real-time 3-D graphics using GLSL 4.0.

Who this book is written for

If you are an OpenGL programmer looking to use the modern features of GLSL 4.0 to create real-time, three-dimensional graphics, then this book is for you. Familiarity with OpenGL programming, along with the typical 3D coordinate systems, projections, and transformations is assumed. It can also be useful for experienced GLSL programmers who are looking to implement the techniques that are presented here.


Frequently Bought Together

OpenGL 4.0 Shading Language Cookbook + OpenGL Programming Guide: The Official Guide to Learning OpenGL, Version 4.3 (8th Edition)
Price For Both: CDN$ 96.15

One of these items ships sooner than the other.


Customers Who Bought This Item Also Bought


Product Details


Inside This Book (Learn More)
Browse Sample Pages
Front Cover | Copyright | Table of Contents | Excerpt | Index | Back Cover
Search inside this book:

What Other Items Do Customers Buy After Viewing This Item?


Customer Reviews

3 star
0
2 star
0
1 star
0
4.5 out of 5 stars
4.5 out of 5 stars
Most helpful customer reviews
4.0 out of 5 stars OpenGL 4.0 Shading Language Cookbook Nov. 30 2011
Format:Paperback
Title: OpenGL 4.0 Shading Language Cookbook
Author: David Wolf
Publisher: Packt Publishing Ltd.
ISBN: 9781849514767
Pages: 340

Review submitted 30th November 2011

Before delving into the brave new world of OpenGL 4.0 fragment shaders, make sure that your graphics card can support them.

Supported Cards include: Nvidia GeForce 400, 500 series, ATI Radeon HD 5000, 6000 series

Essentially, this book is aimed at the intermediate to advanced C\C++ programmer, who also has experience with the implementation of fixed-function OpenGL applications, and who wishes to transition into the more direct GPU control-code, which shaders provide.

The book contains clear and concise examples of OpenGL code and it makes frequent reference to a couple of external libraries - GLEW and the GLM (mathematics library). The main IDE seems to be Nokia's Qt Creator, which is a strange choice, given that most professionals are probably using Visual Studio with GLUT.

If what I've just written makes no sense to you whatsoever, then this is not the book for you.
It is very 'programmer-centric', covering not just the shaders, but how you bind and interface with them via your main application code. Although for artists like myself, who have a programming background, it is the ideal reference (or should I say recipe) book.

In chapter one, the author eases you into the subject by demonstrating how to create a basic OpenGL application with the additional libraries previously mentioned. I found this a bit tricky because I wasn't use to Qt Creator.
Read more ›
Was this review helpful to you?
5.0 out of 5 stars Re-education for OpenGL veterans Nov. 25 2011
By Sol_HSA
Format:Paperback
I got a request from PACKT to review an OpenGL book they've published. It looked like a fun thing to do, so I said okay.

First off, this book is perfect for people who already know their way around OpenGL, but may not be too deep into shaders yet, and/or have some legacy bits in their engines.

The book does walk you through setting up a shader based application, and explains what kinds of support libraries you're going to need (always managing to pick the "other" lib than the ones I've used - they like glew more than glee, for instance - but the libs they picked still work as advertised, so I'm not saying they're bad choises. Oddly, there's no mention of SDL or SFML though), but knowing how OpenGL generally works as well as how the math generally works is taken for granted.

On the positive side you won't have to browse through hundred pages of basic matrix and vector math, or compilation basics, which I feel is a good thing.

After the basics the book gets to the fun stuff, explaining lighting, texture use, screen space trickery (like bloom and deferred shading), geometry shaders and tesselation, practical shadows (i.e, shadow mapping and PCT filters, but doesn't waste pages on anything "more advanced"), noise and some particle tricks.

All in all I think it's a rather good resource for anyone who wants to upgrade their OpenGL knowledge to more "modern OpenGL", dropping all legacy stuff, but it doesn't mean you don't still have to get your hands on the orange book.
Was this review helpful to you?
Most Helpful Customer Reviews on Amazon.com (beta)
Amazon.com: 4.7 out of 5 stars  9 reviews
4 of 4 people found the following review helpful
5.0 out of 5 stars Re-education for OpenGL veterans Nov. 25 2011
By Sol_HSA - Published on Amazon.com
Format:Paperback
I got a request from PACKT to review an OpenGL book they've published. It looked like a fun thing to do, so I said okay.

First off, this book is perfect for people who already know their way around OpenGL, but may not be too deep into shaders yet, and/or have some legacy bits in their engines.

The book does walk you through setting up a shader based application, and explains what kinds of support libraries you're going to need (always managing to pick the "other" lib than the ones I've used - they like glew more than glee, for instance - but the libs they picked still work as advertised, so I'm not saying they're bad choises. Oddly, there's no mention of SDL or SFML though), but knowing how OpenGL generally works as well as how the math generally works is taken for granted.

On the positive side you won't have to browse through hundred pages of basic matrix and vector math, or compilation basics, which I feel is a good thing.

After the basics the book gets to the fun stuff, explaining lighting, texture use, screen space trickery (like bloom and deferred shading), geometry shaders and tesselation, practical shadows (i.e, shadow mapping and PCT filters, but doesn't waste pages on anything "more advanced"), noise and some particle tricks.

All in all I think it's a rather good resource for anyone who wants to upgrade their OpenGL knowledge to more "modern OpenGL", dropping all legacy stuff, but it doesn't mean you don't still have to get your hands on the orange book.
5 of 6 people found the following review helpful
5.0 out of 5 stars Excellent overview of modern GLSL Oct. 1 2011
By Paul T. Miller - Published on Amazon.com
Format:Kindle Edition
This book covers OpenGL Shading Language Core profile 4 and modern OpenGL usage. It does assume some familiarity with OpenGL and C++, which helps to cut down on a lot of introductory boilerplate. It's best to start reading from the beginning, as examples and recipes build on information from previous chapters and Wolff doesn't waste space repeating the same stuff over and over, which I really appreciated.
All of the examples use the newer OpenGL APIs, and there is some basic background information on how to use them. I found this useful for people like me who have been using the fixed-function API for so long. The examples also use OpenGL Mathematics (GLM), an Open Source toolkit for working with OpenGL-style vectors and matrices. I had been unaware of this toolkit, and I'll most likely be switching to it for my next project. Wolff's style is short and to the point and keeps things moving along.
The meat of the book are the recipes, covering a wide range of shading topics, including emulating the OpenGL 2.0 fixed function pipeline, image processing, soft shadows, synthetic texture generation, and particle systems. There is a lot of information here and it is well written, though it assumes the reader is not a complete novice. Be warned, this is NOT a book for beginners.
I had a couple of minor issues with the book. Most of the examples use C++ and the STL but in a few cases Wolff falls back to using malloc/free for temporary buffers. All of the recipes are based on using geometry, and even in the image processing section it is assumed we'll be processing a 3D scene. It would be nice to have some examples focused entirely on doing 2D image processing of images directly.
Those points are very minor though and in all I thought the book was exactly what I needed to bring my skills up to the most recent OpenGL and GLSL standards.
4 of 5 people found the following review helpful
5.0 out of 5 stars excellent book on core glsl programming Aug. 20 2011
By A C++/C# programer - Published on Amazon.com
Format:Paperback
Finally, I[ve found a book that explains very well the in and out of glsl programming.
The book is core profile all the way, without any opengl 2.1 stub. Chapter 1 details step by step how to set up the glsl programming environment, goes over the meanning of each statement, and shows how to pass the attributes and uniforms from application to the shaders.
However, this is not an introduction to opengl. Reader needs to have knowlege of opengl(fixed function pipeline only) before attempting to read this book.
The example code uses Qt SDK; however, the author separate the rendering and glsl codes out quite cleanly from the Qt's windowing code. It can be used easily with any windowing code such as MFC, fltk, glut, etc.
6 of 8 people found the following review helpful
4.0 out of 5 stars Good luck getting the source code working Feb. 8 2012
By Andrian Gorohovschi - Published on Amazon.com
Format:Paperback|Verified Purchase
I've read a number of books on OpenGL Shading Language, most of them cover the same things and David Wolff is no different.

He definitely cuts back on a lot of 'fluff' (as in you don't need an explanation of a function if you're reading this book).

I was disappointed however by a very poor preparation of the hands on part of this cookbook.

My UI background goes way back to win32 to most recent WPF (and number of embedded, plus web stuff). However, I have only seen Qt in passing, and seeing this in the readme file is disheartening:
"It includes a qmake project file, so building the examples should be
very straightforward as long as you have the Qt SDK installed.
It should also load into Qt Creator quite readily."

It is not straightforward.

The problems so far and counting:
The location for glew and glm are assumed to be on c:\OpenGL ... and are not consistent from chapter to chapter.
This is not mentioned anywhere. README is a good place for that.

GLM version 0.9.0.7 is used. Granted not the author's fault, but easily preventable by including GLM with your source files or at least make a note in the README.

Chapter 9 is missing a header file. Granted you can recreate it yourself from the existing .cpp, but this only speaks poorly on the author's attitude towards cookbook-ing

I have expected a higher level of readiness from a cookbook.

If you're looking for a reference on some algorithms this book is fine, but a better choice is "OpenGL Supper Bible 5th edition" which is self sustained and you can pass it along to a complete novice.

If however you're looking for a reference book on a number of algorithms with do it yourself "hands on", then "GPU Gems" series is a much better choice.
-----------------------------------------------------------------------------------
Many months had passed and I find myself using this book more often than I thought I would.
The math is organized well and so are the explanations.

I was a little too harsh, it deserves 4 stars
1 of 1 people found the following review helpful
5.0 out of 5 stars Super Awesome and Really Great Value Jan. 9 2012
By JamesBedford - Published on Amazon.com
Format:Kindle Edition|Verified Purchase
Really awesome book and incredibly good value. Makes a change to a lot of the really long OpenGL books because you can find the OpenGL nugget you're interested in learning about or using and read the section on that.

My only problem with this book is that the formatting for the Table of Contents could be a LOT better for the Kindle version. Whilst all the hyperlinks will take you directly to wherever you need to go, because this book has a set format for each chapter, the sub-sections for each chapter are repeated over and over again which makes it hard to see what the actual chapter is about. For example,
Title
1
A
B
C
2
A
B
C
3
A
B
C
It's hard to see the numbers for all the letters!
Search Customer Reviews
Only search this product's reviews

Look for similar items by category


Feedback