GLSL Essentials

Jacobo Rodríguez

  • 出版商: Packt Publishing
  • 出版日期: 2013-12-27
  • 售價: $1,610
  • 貴賓價: 9.5$1,530
  • 語言: 英文
  • 頁數: 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着色語言的實踐指南,從基礎到高級技巧,逐步引導你。

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

詳細內容:
着色器編程是圖形編程的最大革命。OpenGL着色語言(簡稱:GLSL或GLslang)是一種基於C編程語言語法的高級着色語言。使用GLSL,你可以在GPU(也就是顯卡)上執行代碼。這種技術可以實現更複雜的效果。因此,了解OpenGL的工作原理以及每種着色器類型如何相互作用,以及它們如何集成到系統中,對於圖形編程師來說至關重要。這種知識對於熟悉渲染3D物體的機制至關重要。

《GLSL基礎》是市場上唯一一本從頭開始教你有關着色器的書籍。它向你展示了圖形編程的演變,以便理解為什麼需要圖形渲染管道中的每個階段,以及如何以簡單而簡潔的方式管理它。本書以逐步的方式解釋了着色器的工作原理,並解釋了它們在每個階段如何與應用程序資源交互作用。

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

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

從本書中你將學到:
- 使用頂點着色器在運行時動態位移或變形網格
- 使用片段着色器為像素上色,發揮其強大功能
- 學習Phong照明模型的基礎,為場景增添強調效果
- 結合紋理使場景更加逼真
- 通過執行實例繪製來節省CPU和GPU週期
- 通過即時生成幾何形狀來節省帶寬
- 了解GPU通用編程概念
- 將算法從CPU轉換為GPU以提高性能

方法:
本書是OpenGL着色語言的實踐指南,其中包含幾個實際示例,讓你能夠輕鬆掌握核心概念和GLSL在圖形渲染應用中的使用。

本書適合對着色器編程感興趣的人,無論是想提升技能還是初次接觸圖形編程。如果你想更清楚地了解着色器編程,或者只是想從固定管道系統升級到最先進的着色器編程並熟悉任何基於C的語言,那麼本書將向你展示你需要了解的內容。