OpenGL 4 Shading Language Cookbook, 2/e (Paperback) (OpenGL 4著色語言食譜(第二版))

David Wolff

  • 出版商: Packt Publishing
  • 出版日期: 2013-12-24
  • 售價: $2,380
  • 貴賓價: 9.5$2,261
  • 語言: 英文
  • 頁數: 394
  • 裝訂: Paperback
  • ISBN: 1782167021
  • ISBN-13: 9781782167020
  • 相關分類: OpenGL
  • 海外代購書籍(需單獨結帳)

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

相關主題

商品描述

Acquiring the skills of OpenGL Shading Language is so much easier with this cookbook. You'll be creating graphics rather than learning theory, gaining a high level of capability in modern 3D programming along the way.

Overview

  • Discover simple and advanced techniques for leveraging modern OpenGL and GLSL
  • Learn how to use the newest features of GLSL including compute shaders, geometry, and tessellation shaders
  • Get to grips with a wide range of techniques for implementing shadows using shadow maps, shadow volumes, and more
  • Clear, easy-to-follow examples with detailed explanations and full, cross-platform source code available from GitHub

In Detail

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, the language has been further refined to provide programmers with greater power and flexibility, with new stages such as tessellation and compute.

OpenGL 4 Shading Language Cookbook provides easy-to-follow examples that first walk you through the theory and background behind each technique, and then go on to provide and explain the GLSL and OpenGL code needed to implement it. Beginner level through to advanced techniques are presented including topics such as texturing, screen-space techniques, lighting, shading, tessellation shaders, geometry shaders, compute shaders, and shadows.

OpenGL Shading Language 4 Cookbook is a practical guide that takes you from the fundamentals of programming with modern GLSL and OpenGL, through to advanced techniques. The recipes build upon each other and take you quickly from novice to advanced level code.

You’ll see essential lighting and shading techniques; 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 including HDR rendering, bloom, and blur; shadowing techniques; tessellation, geometry, and compute shaders; how to use noise effectively; and animation with particle systems.

OpenGL Shading Language 4 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, debug, and communicate with shader programs
  • Use new features of GLSL 4 such as subroutines, sampler objects, and uniform blocks
  • Implement core lighting and shading techniques such as diffuse and specular shading, per-fragment shading, and spotlights
  • Use textures for a variety of effects including cube maps for reflection or refraction
  • Implement screen-space techniques such as HDR, bloom, blur filters, order-independent transparency, and deferred shading
  • Utilize noise in shaders
  • Use shaders for animation
  • Make use of compute shaders for physics, animation, and general computing
  • Learn how to use new OpenGL features such as shader storage buffer objects, and image load/store

商品描述(中文翻譯)

這本烹飪書將幫助您更輕鬆地掌握OpenGL Shading Language的技巧。在學習理論的同時,您將能夠創建圖形,並在現代3D編程中獲得高水平的能力。

概述:
- 探索使用現代OpenGL和GLSL的簡單和高級技術
- 學習如何使用GLSL的最新功能,包括計算着色器、幾何着色器和曲面細分着色器
- 掌握使用陰影貼圖、陰影體積等多種技術實現陰影效果
- 提供清晰易懂的示例,詳細解釋並提供跨平台的完整源代碼(可從GitHub獲取)

詳細內容:
OpenGL Shading Language(GLSL)是一種用於自定義OpenGL圖形管道的編程語言,它曾經是固定功能的一部分,現在直接在GPU上執行。它為程序員提供了前所未有的靈活性,可以利用現代GPU的強大功能來實現效果和優化。在第4版中,該語言進一步完善,為程序員提供了更大的能力和靈活性,包括曲面細分和計算等新階段。

《OpenGL 4 Shading Language Cookbook》提供了易於理解的示例,首先介紹每個技術背後的理論和背景,然後提供並解釋實現所需的GLSL和OpenGL代碼。從初學者級別到高級技術,包括紋理、屏幕空間技術、照明、着色、曲面細分着色器、幾何着色器、計算着色器和陰影等主題。

《OpenGL Shading Language 4 Cookbook》是一本實用指南,從現代GLSL和OpenGL的編程基礎開始,進一步介紹高級技術。這些示例相互依賴,並能夠快速將您從初學者提升到高級程度。

您將學到以下內容:
- 編譯、調試和與着色器程序通信
- 使用GLSL 4的新功能,如子程序、取樣器對象和統一塊
- 實現核心照明和着色技術,如漫反射和鏡面着色、片段着色和聚光燈
- 使用紋理實現各種效果,包括用於反射或折射的立方體貼圖
- 實現屏幕空間技術,如HDR、泛光、模糊濾鏡、無序透明和延遲着色
- 在着色器中使用噪音
- 使用着色器進行動畫
- 利用計算着色器進行物理、動畫和一般計算
- 學習如何使用新的OpenGL功能,如着色器存儲緩衝對象和圖像讀取/寫入