ARRAY(0xa6c4f318)
 
Customer Review

1 of 1 people found the following review helpful
3.0 out of 5 stars Adequate, but not the book I was hoping for., 24 Mar 2013
Verified Purchase(What is this?)
This review is from: OpenGL Shading Language (3rd Edition) (Kindle Edition)
I have many years of programming experience with OpenGL, and I needed to explore "shaders" (programming the GPU) using OpenGL Shading Language (GLSL), so I bought this book as a companion to my copy of the "Red book" OpenGL Programming Guide: The Official Guide to Learning OpenGL, Versions 3.0 and 3.1 on OpenGL. I'm probably just stupid, but I found it very hard to work out how to use GLSL from this book.

"Shaders" refer to three separate programmes you can run on the GPU: "vertex shaders" which programme per-vertex information, "geometry shaders" which allow optional access to primitive points, lines and triangles, and "fragment shaders" which deal with the rendering of individual pixels. If you choose to write these you generate small programmes which replace certain bits of the built-in graphics pipeline, the aim being to give the programmer much more flexibility and to permit pretty much anything to be done to the graphics data.

So shaders are a bit like islands of accessibility to graphics data in a sea of hidden architecture on the GPU. Certain bits of data are "built-in", and certain graphics processes are also fixed and hidden away from the programmer, and I found it very hard to determine from this book alone exactly what fell into which category, and how I should interface with the built-in graphics processing. To pursue my maritime analogy: if graphics data is like freight sent by shipping, then you intercept cargos en-route, fiddle with them a bit, then send them on. But to do this you need to fit into the shipping schedules, know what freight is on the boat, know what you are and are not allowed to change, how you should load it, and so on.

I found this book very weak on explaining data flow (shipping schedules in my analogy), and also how the data (the cargo) is organised . Without this information you are a bit stuffed! A diagram showing this and listing all the "built-in" variables available at each stage (with their attributes) would have been a priceless help. Fortunately a lot of information about GLSL is available online, and that is just as well because I don't think this book alone would have given me enough information to get the job done.

Once I'd figured out the missing bits and pieces the second half of this book, which is mainly worked examples of how to achieve effects with shaders, proved very useful as a source of ideas. In particular chapter 9, Emulating OPenGL Fixed Functionality, is crucial for a novice at GLSL because you have to start at the beginning with basic transformations, colour, shading and lighting and this shows you how to do it.

In conclusion I'd say that you can learn GLSL from scratch using this book, but you'll also need a web browser in order to answer all the questions it fails to answer. Once you've got going it makes a reasonable reference guide, and the coded examples in the second half are particularly worthwhile. But I do wish the authors had studied Kernighan and Ritchie's The C Programming Language (2nd Edition), in my view the best book ever written on a computer language: clear, concise and well organised ... which this book definitely is not!
Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No

Be the first person to comment on this review.

[Add comment]
Post a comment
To insert a product link use the format: [[ASIN:ASIN product-title]] (What's this?)
Amazon will display this name with all your submissions, including reviews and discussion posts. (Learn more)
Name:
Badge:
This badge will be assigned to you and will appear along with your name.
There was an error. Please try again.
Please see the full guidelines ">here.

Official Comment

As a representative of this product you can post one Official Comment on this review. It will appear immediately below the review wherever it is displayed.   Learn more
The following name and badge will be shown with this comment:
 (edit name)
After clicking on the Post button you will be asked to create your public name, which will be shown with all your contributions.

Is this your product?

If you are the author, artist, manufacturer or an official representative of this product, you can post an Official Comment on this review. It will appear immediately below the review wherever it is displayed.  Learn more
Otherwise, you can still post a regular comment on this review.

Is this your product?

If you are the author, artist, manufacturer or an official representative of this product, you can post an Official Comment on this review. It will appear immediately below the review wherever it is displayed.   Learn more
 
System timed out

We were unable to verify whether you represent the product. Please try again later, or retry now. Otherwise you can post a regular comment.

Since you previously posted an Official Comment, this comment will appear in the comment section below. You also have the option to edit your Official Comment.   Learn more
The maximum number of Official Comments have been posted. This comment will appear in the comment section below.   Learn more
Prompts for sign-in
 


Review Details

Item

3.0 out of 5 stars (1 customer review)
5 star:    (0)
4 star:    (0)
3 star:
 (1)
2 star:    (0)
1 star:    (0)
 
 
 
20.02
Add to wishlist
Reviewer


Location: Tiverton, Devon

Top Reviewer Ranking: 11,980