Beginning WebGL for HTML5

Beginning WebGL for HTML5 gets you rapidly up to speed with WebGL, a powerful new graphics language within the browser. You'll render realistic scenes with advanced lighting models, shadows, blending and textures. You'll also use mathematics to model fractals and particle systems. Going be...

Descripción completa

Detalles Bibliográficos
Autor principal: Danchilla, Brian (-)
Formato: Libro electrónico
Idioma:Inglés
Publicado: [Berkeley, Calif.] : Apress 2012.
Edición:1st ed. 2012.
Colección:The expert's voice in Web development Beginning WebGL for HTML5
Materias:
Ver en Biblioteca Universitat Ramon Llull:https://discovery.url.edu/permalink/34CSUC_URL/1im36ta/alma991009628679306719
Tabla de Contenidos:
  • Title Page; Copyright Page; Contents at a Glance; Table of Contents; About the Author; About the Technical Reviewer; Acknowledgments; Introduction; CHAPTER 1: Setting the Scene; A Blank Canvas; Getting Context; WebGL Components; The Drawing Buffers; Primitive Types; Vertex Data; Vertex Buffer Objects (VBOs); Rendering in Two Dimensions; Attributes and Uniforms; The View: Part I; Clip Coordinates; Why Manipulate Coordinates?; The Viewport; Adding Color; Animation and Model Movement; Using requestAnimationFrame; Creating Movement; Model-View Matrix; The View: Part II; Projection Matrix
  • Choosing a Matrix LibraryThree-Dimensional Rendering; 2D Models in a 3D World; An Example with Depth; Using an Index Buffer; Depth Testing; Summary; CHAPTER 2: Shaders 101; Graphics Pipelines; Fixed Functionality or Programmable Shaders; Why Shaders?; The WebGL Graphics Pipeline; GL Shading Language; Background; Shader Roles; Vertex Shader (VS); Fragment Shader (FS); Basic Usage; Setting Up a Shader Program; Clean Up; Loading Shaders with Ajax; XMLHttpRequestObject; Using jQuery; GLSL Specification in More Detail; Primitive Types; Qualifiers; Storage Qualifiers; Parameter Qualifiers
  • Precision QualifiersInvariant Qualifier; Qualifier Order; Built-in Variables; Built-in Constants; Vector Components; Vector and Matrix Operations; Built-in Functions; Angle and Trigonometry Functions; Exponential Functions; Common Functions; Geometric Functions; Matrix and Vector Functions; Texture Lookup Functions; 2D Texture Functions; 3D Texture Functions; Noise Functions; Interactive GLSL Environs; Procedural Shaders; Gradient Color; Stripes; Discarding; Summary; CHAPTER 3: Textures and Lighting; Textures; Texture Coordinates; Texture Objects; texImage2D
  • Loading Images into a Texture ObjectApplication and Shader Interaction; Using a Texture in Our Shader; Texture Options; Texture Filtering; Texture Wrapping; Data Storage; Mipmaps; Texturing a 3D Object; Texture Coordinate Attribute; Adjusting Our Shaders; Data Changes; Toggling State; Toggling Textures On and Off; Multiple Textures; Shader Program Changes; Lighting; Light Components; Types of Lights; Normal Vectors; Lighting Models; Ambient and Directional Light; A Point Light; Texture and Lighting Together; Summary; CHAPTER 4: Increasing Realism; Setup; A Vector Object; Plane Class; Spheres
  • Lighting RevisitedShading Models; Normal Vectors Revisited; Flat Shading; Lambert Reflection; Smooth Shading; Gouraud Shading; Phong shading; Phong Illumination Model; Attenuation; Spotlights; More Advanced Lighting; Fog; Shadows; Ambient Occlusion; Shadow Maps; Depth Buffer; Blending; Reflection and Refraction; Fresnel effect; Fresnel Shader; Putting it All Together; Summary; CHAPTER 5: Physics; Background; Forces Acting Upon Us; Scalars and Vectors; Rates of Change; Code Setup; Storing Information; Interactively Adjusting the Camera; Using the Mouse to Rotate the View
  • Using the Mouse Wheel to Control Zoom