Computer Graphics Programming in OpenGL with Java, 3rd Edition
- Length: 516 pages
- Edition: 3
- Language: English
- Publisher: Mercury Learning
- Publication Date: 2021-09-20
- ISBN-10: 1683927362
- ISBN-13: 9781683927365
- Sales Rank: #0 (See Top 100 Books)
This new edition provides step-by-step instruction on modern 3D graphics shader programming in OpenGL with Java, along with its theoretical foundations. It is appropriate both for computer science graphics courses, and for professionals interested in mastering 3D graphics skills. It has been designed in a 4-color, “teach-yourself” format with numerous examples that the reader can run just as presented. Every shader stage is explored, from the basics of modeling, textures, lighting, shadows, etc., through advanced techniques such as tessellation, normal mapping, noise maps, as well as new chapters on simulating water, stereoscopy, and ray tracing. FEATURES * Covers modern OpenGL 4.0+ shader programming in Java, with instructions for both PC/Windows and Macintosh * Illustrates every technique with running code examples. Everything needed to install the libraries, and complete source code for each example * Includes step-by-step instruction for using each GLSL programmable pipeline stage (vertex, tessellation, geometry, and fragment) * Explores practical examples for modeling, lighting and shadows (including soft shadows), terrain, water, and 3D materials such as wood and marble * Adds new chapters on simulating water, stereoscopy, and ray tracing with compute shaders * Explains how to optimize code with tools such as Nvidia’s Nsight debugger * Includes companion files with code, object models, figures, and more
Preface What’s New in This Editio Intended Audience How to Use This Book Acknowledgments About the Authors Chapter 1 Getting Star 1.1 Languages and Li 1.1.1 Java 1.1.2 OpenGL 1.1.3 JOGL 1.1.4 JOML 1.2 Installation and C Chapter 2 The OpenGL 2.1 The OpenGL Pipe 2.1.1 Java/JOG 2.1.2 Vertex an 2.1.3 Tessellati 2.1.4 Geometry 2.1.5 Rasteriza 2.1.6 Fragment 2.1.7 Pixel Ope 2.2 Detecting OpenGL and GLSL Errors 2.3 Reading GLSL Source Code from Files 2.4 Building Objects from Vertices 2.5 Animating a Scene 2.6 Organizing the Java Code Files Chapter 3 Mathematical Foundations 3.1 3D Coordinate Systems 3.2 Points 3.3 Matrices 3.4 Transformation Matrices 3.4.1 Translation 3.4.2 Scaling 3.4.3 Rotation 3.5 Vectors 3.5.1 Uses for Dot Product 3.5.2 Uses for Cross Product 3.6 Local and World Space 3.7 Eye Space and the Synthetic Camera 3.8 Projection Matrices 3.8.1 The Perspective Projection Matrix 3.8.2 The Orthographic Projection Matrix 3.9 Look-At Matrix 3.10 GLSL Functions for Building Matrix Transforms Chapter 4 Managing 3D Graphics Data 4.1 Buffers and Vertex Attributes 4.2 Uniform Variables 4.3 Interpolation of Vertex Attributes 4.4 Model-View and Perspective Matrices 4.5 Our First 3D Program—A 3D Cube 4.6 Rendering Multiple Copies of an Object 4.6.1 Instancing 4.7 Rendering Multiple Different Models in a Scene 4.8 Matrix Stacks 4.9 Combating “Z-Fighting” Artifacts 4.10 Other Options for Primitives 4.11 Coding for Performance 4.11.1 Minimizing Dynamic Memory Allocation 4.11.2 Pre-Computing the Perspective Matrix 4.11.3 Back-Face Culling Chapter 5 Texture Mapping 5.1 Loading Texture Image Files 5.2 Texture Coordinates 5.3 Creating a Texture Object 5.4 Constructing Texture Coordinates 5.5 Loading Texture Coordinates into Buffers 5.6 Using the Texture in a Shader: Sampler Variables and Texture Units 5.7 Texture Mapping: Example Program 5.8 Mipmapping 5.9 Anisotropic Filtering 5.10 Wrapping and Tiling 5.11 Perspective Distortion 5.12 Loading Texture Image Files using Java AWT Classes Chapter 6 3D Models 6.1 Procedural Models—Building a Sphere 6.2 OpenGL Indexing—Building a Torus 6.2.1 The Torus 6.2.2 Indexing in OpenGL 6.3 Loading Externally Produced Models Chapter 7 Lighting 7.1 Lighting Models 7.2 Lights 7.3 Materials 7.4 ADS Lighting Computations 7.5 Implementing ADS Lighting 7.5.1 Gouraud Shading 7.5.2 Phong Shading 7.6 Combining Lighting and Textures Chapter 8 Shadows 8.1 The Importance of Shadows 8.2 Projective Shadows 8.3 Shadow Volumes 8.4 Shadow Mapping 8.4.1 Shadow Mapping (Pass One)—“Draw” Objects from Light Position 8.4.2 Shadow Mapping (Intermediate Step)—Copying the Z-Buffer to a Texture 8.4.3 Shadow Mapping (Pass Two)—Rendering the Scene with Shadows 8.5 A Shadow Mapping Example 8.6 Shadow Mapping Artifacts 8.7 Soft Shadows 8.7.1 Soft Shadows in the Real World 8.7.2 Generating Soft Shadows—Percentage Closer Filtering (PCF) 8.7.3 A Soft Shadow/PCF Program Chapter 9 Sky and Backgrounds 9.1 Skyboxes 9.2 Skydomes 9.3 Implementing a Skybox 9.3.1 Building a Skybox from Scratch 9.3.2 Using OpenGL Cube Maps 9.4 Environment Mapping Chapter 10 Enhancing Surface Detail 10.1 Bump Mapping 10.2 Normal Mapping 10.3 Height Mapping Chapter 11 Parametric Surfaces 11.1 Quadratic Bézier Curves 11.2 Cubic Bézier Curves 11.3 Quadratic Bézier Surfaces 11.4 Cubic Bézier Surfaces Chapter 12 Tessellation 12.1 Tessellation in OpenGL 12.2 Tessellation for Bézier Surfaces 12.3 Tessellation for Terrain/Height Maps 12.4 Controlling Level of Detail (LOD) Chapter 13 Geometry Shaders 13.1 Per-Primitive Processing in OpenGL 13.2 Altering Primitives 13.3 Deleting Primitives 13.4 Adding Primitives 13.5 Changing Primitive Types Chapter 14 Other Techniques 14.1 Fog 14.2 Compositing/Blending/Transparency 14.3 User-Defined Clipping Planes 14.4 3D Textures 14.5 Noise 14.6 Noise Application - Marble 14.7 Noise Application - Wood 14.8 Noise Application - Clouds 14.9 Noise Application - Special Effects Chapter 15 Simulating Water 15.1 Pool Surface and Floor Geometry Setup 15.2 Adding Surface Reflection and Refraction 15.3 Adding Surface Waves 15.4 Additional Corrections 15.5 Animating the Water Movement 15.6 Underwater Caustics Chapter 16 Ray Tracing and Compute Shaders 16.1 Compute Shaders 16.1.1 Compiling and Using Compute Shaders 16.1.2 Parallel Computing in Compute Shaders 16.1.3 Work Groups 16.1.4 Work Group Details 16.1.5 Work Group Limitations 16.2 Ray Casting 16.2.1 Defining the 2D Texture Image 16.2.2 Building and Displaying the Ray Cast Image 16.2.3 Ray-Sphere Intersection 16.2.4 Axis-Aligned Ray-Box Intersection 16.2.5 Output of Simple Ray Casting Without Lighting 16.2.6 Adding ADS Lighting 16.2.7 Adding Shadows 16.2.8 Non-Axis-Aligned Ray-Box Intersection 16.2.9 Determining Texture Coordinates 16.2.10 Plane Intersection and Procedural Textures 16.3 Ray Tracing 16.3.1 Reflection 16.3.2 Refraction 16.3.3 Combining Reflection, Refraction, and Textures 16.3.4 Increasing the Number of Rays 16.3.5 Generalizing the Solution 16.3.6 Additional Examples 16.3.7 Blending Colors for Transparent Objects Chapter 17 Stereoscopy for 3D Glasses and VR Headsets 17.1 View and Projection Matrices for Two Eyes 17.2 Anaglyph Rendering 17.3 Side-by-Side Rendering 17.4 Correcting Lens Distortion in Headsets 17.5 A Simple Testing Hardware Configuration Appendix A Installation and Setup for PC (Windows) Appendix B Installation and Setup for Macintosh Appendix C Using the Nsight Graphics Debugger Index
Donate to keep this site alive
1. Disable the AdBlock plugin. Otherwise, you may not get any links.
2. Solve the CAPTCHA.
3. Click download link.
4. Lead to download server to download.