OpenGL(R) Shading Language

by
Format: Paperback
Pub. Date: 2004-01-01
Publisher(s): Addison-Wesley Professional
List Price: $59.99

Rent Textbook

Select for Price
There was a problem. Please try again later.

New Textbook

We're Sorry
Sold Out

Used Textbook

We're Sorry
Sold Out

eTextbook

We're Sorry
Not Available

How Marketplace Works:

  • This item is offered by an independent seller and not shipped from our warehouse
  • Item details like edition and cover design may differ from our description; see seller's comments before ordering.
  • Sellers much confirm and ship within two business days; otherwise, the order will be cancelled and refunded.
  • Marketplace purchases cannot be returned to eCampus.com. Contact the seller directly for inquiries; if no response within two days, contact customer service.
  • Additional shipping costs apply to Marketplace purchases. Review shipping costs at checkout.

Summary

- Shading languages are the most important new development in graphics programming in years - The author is at the very centre of the activity surrounding the OpenGL Shading Language - Both a tutorial and a reference, with lots of practical examples

Table of Contents

Forewordp. xxiii
Foreword to the First Editionp. xxvii
Prefacep. xxxi
About the Authorp. xxxvii
About the Contributorsp. xxxix
Acknowledgmentsp. xli
Review of OpenGL Basicsp. 1
OpenGL Historyp. 1
OpenGL Evolutionp. 3
Execution Modep. l4
The Frame Bufferp. 5
Statep. 8
Processing Pipelinep. 8
Drawing Geometryp. 9
Geometry Specificationp. 9
Per-Vertex Operationsp. 12
Primitive Assemblyp. 14
Primitive Processingp. 14
Rasterizationp. 15
Fragment Processingp. 16
Per-Fragment Operationsp. 16
Frame Buffer Operationsp. 17
Drawing Imagesp. 18
Pixel Unpackingp. 19
Pixel Transferp. 19
Rasterization and Back-End Processingp. 20
Read Controlp. 20
Coordinate Transformsp. 21
Texturingp. 26
Summaryp. 31
Further Informationp. 32
Basicsp. 35
Introduction to the OpenGL Shading Languagep. 35
Why Write Shaders?p. 37
OpenGL Programmable Processorsp. 38
p. 40
p. 43
p. 47
Language Design Considerationsp. 47
C Basisp. 50
Additions to Cp. 50
Additions from C++p. 52
C Features Not Supportedp. 53
Other Differencesp. 53
System Overviewp. 54
Driver Modelp. 54
OpenGL Shading Language Compiler/Linkerp. 56
OpenGL Shading Language APIp. 57
Key Benefitsp. 59
Summaryp. 61
Further Informationp. 63
Language Definitionp. 65
Example Shader Pairp. 65
Data Typesp. 67
Scalarsp. 67
Vectorsp. 69
Matricesp. 70
Samplersp. 71
Structuresp. 72
Arraysp. 73
Voidp. 74
Declarations and Scopep. 74
Type Matching and Promotionp. 75
Initializers and Constructorsp. 75
Type Conversionsp. 77
Qualifiers and Interface to a Shaderp. 78
Attribute Qualifiersp. 79
Uniform Qualifiersp. 79
Varying Qualifiersp. 79
Constant Qualifiersp. 80
Absent Qualifierp. 81
Flow Controlp. 82
Functionsp. 82
Calling Conventionsp. 83
Built-in Functionsp. 84
Operationsp. 85
Indexingp. 86
Swizzlingp. 87
Component-wise Operationp. 87
Preprocessorp. 90
Preprocessor Expressionsp. 93
Error Handlingp. 94
Summaryp. 95
Further Informationp. 95
The OpenGL Programmable Pipelinep. 97
The Vertex Processorp. 98
Vertex Attributesp. 99
Uniform Variablesp. 100
Special Output Variablesp. 101
Built-in Varying Variablesp. 102
User-Defined Varying Variablesp. 103
The Fragment Processorp. 104
Varying Variablesp. 104
Uniform Variablesp. 105
Special Input Variablesp. 106
Special Output Variablesp. 107
Built-in Uniform Variablesp. 108
Built-in Constantsp. 113
Interaction with OpenGL Fixed Functionalityp. 114
Two-Sided Color Modep. 114
Point Size Modep. 115
Clippingp. 116
Raster Positionp. 117
Position Invariancep. 117
Texturingp. 118
Summaryp. 120
Further Informationp. 120
Built-in Functionsp. 123
Angle and Trigonometry Functionsp. 124
Exponential Functionsp. 126
Common Functionsp. 126
Geometric Functionsp. 136
Matrix Functionsp. 138
Vector Relational Functionsp. 139
Texture Access Functionsp. 141
Fragment Processing Functionsp. 144
Noise Functionsp. 145
Summaryp. 147
Further Informationp. 147
Simple Shading Examplep. 149
Brick Shader Overvie
Table of Contents provided by Publisher. All Rights Reserved.

Excerpts

For just about as long as there has been graphics hardware, there has been programmable graphics hardware. Over the years, building flexibility into graphics hardware designs has been a necessary way of life for hardware developers. Graphics APIs continue to evolve, and because a hardware design can take two years or more from start to finish, the only way to guarantee a hardware product that can support the then-current graphics APIs at its release is to build in some degree of programmability from the very beginning. Until recently, the realm of programming graphics hardware belonged to just a few people, mainly researchers and graphics hardware driver developers. Research into programmable graphics hardware has been taking place for many years, but the point of this research has not been to produce viable hardware and software for application developers and end users. The graphics hardware driver developers have focused on the immediate task of providing support for the important graphics APIs of the time: PHIGS, PEX, Iris GL, OpenGL, Direct3D, and so on. Until recently, none of these APIs exposed the programmability of the underlying hardware, so application developers have been forced into using the fixed functionality provided by traditional graphics APIs. Hardware companies have not exposed the programmable underpinnings of their products because there is a high cost of educating and supporting customers to use low-level, device-specific interfaces and because these interfaces typically change quite radically with each new generation of graphics hardware. Application developers who use such a device-specific interface to a piece of graphics hardware face the daunting task of updating their software for each new generation of hardware that comes along. And forget about supporting the application on hardware from multiple vendors! As we move into the 21 century, some of these fundamental tenets about graphics hardware are being challenged. Application developers are pushing the envelope as never before and demanding a variety of new features in hardware in order to create more and more sophisticated onscreen effects. As a result, new graphics hardware designs are more programmable than ever before. Standard graphics APIs have been challenged to keep up with the pace of hardware innovation. For OpenGL, the result has been a spate of extensions to the core API as hardware vendors struggle to support a range of interesting new features that their customers are demanding. So we are standing today at a crossroads for the graphics industry. A paradigm shift is occurring, one that is taking us from the world of rigid, fixed functionality graphics hardware and graphics APIs to a brave new world where the visual processing unit, or VPU (i.e., graphics hardware), is as important as the central processing unit, or CPU. The VPU will be optimized for processing dynamic media such as 3D graphics and video. Highly parallel processing of floating point data will be the primary task for VPUs, and the flexibility of the VPU will mean that it can also be used to process data other than a stream of traditional graphics commands. Applications can take advantage of the capabilities of both the CPU and the VPU, utilizing the strengths of each to perform the task at hand optimally. This book describes how graphics hardware programmability is exposed through a high-level language in the leading cross-platform 3D graphics API: OpenGL. This language, the OpenGL Shading Language, allows applications to take total control over the most important stages of the graphics processing pipeline. No longer restricted to the graphics rendering algorithms and formulas chosen by hardware designers and frozen in silicon, software developers are beginning to use this programmability to create stunning effects in real-time. Intended Audience The primary audience for this book is application programmers that a

An electronic version of this book is available through VitalSource.

This book is viewable on PC, Mac, iPhone, iPad, iPod Touch, and most smartphones.

By purchasing, you will be able to view this book online, as well as download it, for the chosen number of days.

Digital License

You are licensing a digital product for a set duration. Durations are set forth in the product description, with "Lifetime" typically meaning five (5) years of online access and permanent download to a supported device. All licenses are non-transferable.

More details can be found here.

A downloadable version of this book is available through the eCampus Reader or compatible Adobe readers.

Applications are available on iOS, Android, PC, Mac, and Windows Mobile platforms.

Please view the compatibility matrix prior to purchase.