PacktLib: OpenGL Development Cookbook

OpenGL Development Cookbook

Credits

About the Author

About the Reviewers

www.PacktPub.com

Preface

Introduction to Modern OpenGL

Introduction

Setting up the OpenGL v3.3 core profile on Visual Studio 2010 using the GLEW and freeglut libraries

Designing a GLSL shader class

Rendering a simple colored triangle using shaders

Doing a ripple mesh deformer using the vertex shader

Dynamically subdividing a plane using the geometry shader

Dynamically subdividing a plane using the geometry shader with instanced rendering

Drawing a 2D image in a window using the fragment shader and the SOIL image loading library

3D Viewing and Object Picking

Introduction

Implementing a vector-based camera with FPS style input support

Implementing the free camera

Implementing the target camera

Implementing view frustum culling

Implementing object picking using the depth buffer

Implementing object picking using color

Implementing object picking using scene intersection queries

Offscreen Rendering and Environment Mapping

Introduction

Implementing the twirl filter using the fragment shader

Rendering a skybox using static cube mapping

Implementing a mirror with render-to-texture using FBO

Rendering a reflective object using dynamic cube mapping

Implementing area filtering (sharpening/blurring/embossing) on an image using convolution

Implementing the glow effect

Lights and Shadows

Introduction

Implementing per-vertex and per-fragment point lighting

Implementing per-fragment directional light

Implementing per-fragment point light with attenuation

Implementing per-fragment spot light

Implementing shadow mapping with FBO

Implemeting shadow mapping with percentage closer filtering (PCF)

Implementing variance shadow mapping

Mesh Model Formats and Particle Systems

Introduction

Implementing terrains using the height map

Implementing 3ds model loading using separate buffers

Implementing OBJ model loading using interleaved buffers

Implementing EZMesh model loading

Implementing simple particle system

GPU-based Alpha Blending and Global Illumination

Introduction

Implementing order-independent transparency using front-to-back peeling

Implementing order-independent transparency using dual depth peeling

Implementing screen space ambient occlusion (SSAO)

Implementing global illumination using spherical harmonics lighting

Implementing GPU-based ray tracing

Implementing GPU-based path tracing

GPU-based Volume Rendering Techniques

Introduction

Implementing volume rendering using 3D texture slicing

Implementing volume rendering using single-pass GPU ray casting

Implementing pseudo-isosurface rendering in single-pass GPU ray casting

Implementing volume rendering using splatting

Implementing transfer function for volume classification

Implementing polygonal isosurface extraction using the Marching Tetrahedra algorithm

Implementing volumetric lighting using the half-angle slicing

Skeletal and Physically-based Simulation on the GPU

Introduction

Implementing skeletal animation using matrix palette skinning

Implementing skeletal animation using dual quaternion skinning

Modeling cloth using transform feedback

Implementing collision detection and response on a transform feedback-based cloth model

Implementing a particle system using transform feedback

Index