OpenGL 4.0 Shading Language Cookbook (Paperback)
暫譯: OpenGL 4.0 着色語言食譜 (平裝本)

David Wolff

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

相關主題

商品描述

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.

商品描述(中文翻譯)

超過 60 個高度專注且實用的配方,以最大化您對 OpenGL Shading Language 的使用


  • 一整套配方,展示使用 GLSL 4.0 產生高品質即時 3D 圖形的簡單和進階技術

  • 如何使用 OpenGL Shading Language 實現照明和陰影技術

  • 使用 GLSL 4.0 的新功能,包括細分和幾何著色器

  • 如何在 GLSL 中使用紋理,作為從基本紋理映射到延遲著色的各種技術的一部分

  • 簡單易懂的範例,附有 GLSL 原始碼,以及每種技術背後理論的基本描述

詳細內容

OpenGL Shading Language (GLSL) 是一種用於自定義 OpenGL 圖形管線中以前為固定功能的部分的程式語言,並直接在 GPU 上執行。它為程式設計師提供了前所未有的靈活性,以利用現代 GPU 的強大功能來實現效果和優化。隨著 4.0 版本的推出,該語言進一步精煉,為程式設計師提供了更大的靈活性,並新增了如細分著色器這樣的全新階段。

OpenGL Shading Language 4.0 Cookbook 提供易於遵循的範例,首先引導您了解每種技術背後的理論和背景,然後提供並解釋實現所需的 GLSL 和 OpenGL 代碼。從初學者到進階技術的主題,包括紋理處理、螢幕空間技術、照明、陰影、細分著色器、幾何著色器和陰影等。

OpenGL Shading Language 4.0 Cookbook 是一本實用指南,帶您從 GLSL 4.0 和 OpenGL 4.0 的基本編程開始,經過基本的照明和陰影技術,直到更進階的技術和效果。它展示了產生基本照明和陰影效果的技術;範例展示如何利用紋理來實現各種效果,並作為其他技術的一部分;螢幕空間技術、陰影、細分和幾何著色器、噪聲和動畫的範例。

OpenGL Shading Language 4.0 Cookbook 提供現代著色技術的範例,這些範例可以作為程式設計師擴展的起點,以產生現代的互動式 3D 電腦圖形應用程式。

您將從本書中學到什麼


  • 編譯、安裝和與著色器程式通訊

  • 使用 GLSL 4.0 的新功能,如子程序和統一區塊

  • 實現基本的照明和陰影技術,如漫反射和鏡面反射陰影、每片段陰影和聚光燈

  • 應用單一或多個紋理

  • 使用紋理作為環境貼圖以模擬反射或折射

  • 實現螢幕空間技術,如伽瑪校正、模糊濾鏡和延遲著色

  • 實現幾何和細分著色器

  • 學習陰影技術,包括陰影映射和螢幕空間環境遮蔽

  • 在著色器中使用噪聲

  • 使用著色器進行動畫

方法

這本實用指南省略了前言,直接切入重點 - 實際創建圖形,而不僅僅是理論學習。每個配方都是專門為滿足您使用 GLSL 4.0 產生即時 3D 圖形的需求而量身定做的。

本書的讀者對象

如果您是希望利用 GLSL 4.0 的現代功能來創建即時三維圖形的 OpenGL 程式設計師,那麼這本書就是為您而寫的。假設您對 OpenGL 編程有一定的熟悉度,以及對典型的 3D 坐標系、投影和變換的了解。對於希望實現本書中介紹的技術的經驗豐富的 GLSL 程式設計師來說,這本書也會很有幫助。