GLSL Essentials
暫譯: GLSL 基礎精要

Jacobo Rodríguez

  • 出版商: Packt Publishing
  • 出版日期: 2013-12-27
  • 售價: $1,660
  • 貴賓價: 9.5$1,577
  • 語言: 英文
  • 頁數: 116
  • 裝訂: Paperback
  • ISBN: 1849698007
  • ISBN-13: 9781849698009
  • 相關分類: C 程式語言GPUOpenGL
  • 海外代購書籍(需單獨結帳)

買這商品的人也買了...

相關主題

商品描述

If you're involved in graphics programming, you need to know about shaders, and this is the book to do it. A hands-on guide to the OpenGL Shading Language, it walks you through the absolute basics to advanced techniques.

Overview

  • Learn about shaders in a step-by-step, interactive manner
  • Create stunning visual effects using vertex and fragment shaders
  • Simplify your CPU code and improve your overall performance with instanced drawing through the use of geometry shaders

In Detail

Shader programming has been the largest revolution in graphics programming. OpenGL Shading Language (abbreviated: GLSL or GLslang), is a high-level shading language based on the syntax of the C programming language.With GLSL you can execute code on your GPU (aka graphics card). More sophisticated effects can be achieved with this technique.
Therefore, knowing how OpenGL works and how each shader type interacts with each other, as well as how they are integrated into the system, is imperative for graphic programmers. This knowledge is crucial in order to be familiar with the mechanisms for rendering 3D objects.

GLSL Essentials is the only book on the market that teaches you about shaders from the very beginning. It shows you how graphics programming has evolved, in order to understand why you need each stage in the Graphics Rendering Pipeline, and how to manage it in a simple but concise way. This book explains how shaders work in a step-by-step manner, with an explanation of how they interact with the application assets at each stage.

This book will take you through the graphics pipeline and will describe each section in an interactive and clear way. You will learn how the OpenGL state machine works and all its relevant stages. Vertex shaders, fragment shaders, and geometry shaders will be covered, as well some use cases and an introduction to the math needed for lighting algorithms or transforms. Generic GPU programming (GPGPU) will also be covered.

After reading GLSL Essentials you will be ready to generate any rendering effect you need.

What you will learn from this book

  • Use vertex shaders to dynamically displace or deform a mesh on the fly
  • Colorize your pixels unleashing the power of fragment shaders
  • Learn the basics of the Phong Illumination model to add emphasis to your scenes
  • Combine textures to make your scene more realistic
  • Save CPU and GPU cycles by performing instanced drawing
  • Save bandwidth by generating geometry on the fly
  • Learn about GPU Generic programming concepts
  • Convert algorithms from CPU to GPU to increase performance

Approach

This book is a practical guide to the OpenGL Shading Language, which contains several real-world examples that will allow you to grasp the core concepts easily and the use of the GLSL for graphics rendering applications.

Who this book is written for

If you want upgrade your skills, or are new to shader programming and want to learn about graphic programming, this book is for you. If you want a clearer idea of shader programming, or simply want to upgrade from fixed pipeline systems to state-of-the-art shader programming and are familiar with any C-based language, then this book will show you what you need to know.

商品描述(中文翻譯)

如果您參與圖形程式設計,您需要了解著色器,而這本書正是為此而寫的。這是一本針對 OpenGL Shading Language 的實用指南,從基本概念到進階技術,逐步引導您學習。

概述
- 以逐步互動的方式學習著色器
- 使用頂點著色器和片段著色器創建驚人的視覺效果
- 通過使用幾何著色器簡化您的 CPU 代碼並提高整體性能,實現實例繪製

詳細內容
著色器程式設計是圖形程式設計中最大的革命。OpenGL Shading Language(簡稱:GLSL 或 GLslang)是一種基於 C 程式語言語法的高級著色語言。使用 GLSL,您可以在 GPU(即顯示卡)上執行代碼。這種技術可以實現更複雜的效果。因此,了解 OpenGL 的運作方式、各種著色器類型之間的互動,以及它們如何整合進系統,對於圖形程式設計師來說是至關重要的。這些知識對於熟悉 3D 物件渲染的機制至關重要。

《GLSL Essentials》是市場上唯一一本從頭開始教您著色器的書籍。它展示了圖形程式設計的演變,以便理解為什麼您需要圖形渲染管線中的每個階段,以及如何以簡單而簡潔的方式管理它。本書以逐步的方式解釋著色器的工作原理,並說明它們在每個階段如何與應用資產互動。

本書將帶您了解圖形管線,並以互動和清晰的方式描述每個部分。您將學習 OpenGL 狀態機的運作及其所有相關階段。將涵蓋頂點著色器、片段著色器和幾何著色器,以及一些使用案例和照明算法或變換所需的數學介紹。還將涵蓋通用 GPU 程式設計(GPGPU)。

閱讀完《GLSL Essentials》後,您將能夠生成所需的任何渲染效果。

您將從本書中學到的內容
- 使用頂點著色器動態位移或變形網格
- 利用片段著色器為您的像素上色
- 學習 Phong 照明模型的基本知識,以增強您的場景
- 結合紋理使您的場景更具真實感
- 通過執行實例繪製來節省 CPU 和 GPU 的運算週期
- 通過即時生成幾何體來節省帶寬
- 了解 GPU 通用程式設計概念
- 將算法從 CPU 轉換為 GPU 以提高性能

方法
本書是一本針對 OpenGL Shading Language 的實用指南,包含多個實際案例,讓您輕鬆掌握核心概念及 GLSL 在圖形渲染應用中的使用。

本書的讀者對象
如果您想提升技能,或是對著色器程式設計感到陌生並希望學習圖形程式設計,這本書適合您。如果您想更清楚地了解著色器程式設計,或只是想從固定管線系統升級到最先進的著色器程式設計,並且熟悉任何基於 C 的語言,那麼這本書將告訴您所需了解的內容。