Seven Simple Shaders: WebGL Tutorial (Online 3D Media with WebGL) A. Butler

ISBN:

Published: August 19th 2015

Kindle Edition

275 pages


Description

Seven Simple Shaders: WebGL Tutorial (Online 3D Media with WebGL)  by  A. Butler

Seven Simple Shaders: WebGL Tutorial (Online 3D Media with WebGL) by A. Butler
August 19th 2015 | Kindle Edition | PDF, EPUB, FB2, DjVu, audiobook, mp3, ZIP | 275 pages | ISBN: | 9.61 Mb

“Seven Simple Shaders” discusses seven WebGL projects with unique shaders. In the process we provide an overview of the WebGL shader language. The projects include Animated Colors Fade in and Out, Cube Color Animation, Color Filters, RadiatingMore“Seven Simple Shaders” discusses seven WebGL projects with unique shaders. In the process we provide an overview of the WebGL shader language. The projects include Animated Colors Fade in and Out, Cube Color Animation, Color Filters, Radiating colors, Zoom into a Photograph, Multiply Shapes, and Spotlight Effect.We explain how to upload JavaScript arrays and numbers to shader uniforms.

We cover shader uniform types float, mat4, vec2, and vec4. We demonstrate how to pass data to the fragment shader from the vertex shader with varyings. The book discusses how to modify texture coordinates, vertex coordinates, and color channels within the shaders.

We illustrate how to use shader language built-in functions distance(), texture2D(), sin(), and cos(). We demonstrate uploading and processing multiple image files as textures within the shaders.“Seven Simple Shaders” demonstrates WebGL methods getUniformLocation(), uniformMatrix4fv(), uniform1f(), uniform2f(), uniform4f(), drawElements(), vertexAttribPointer(), texParameteri() for magnification filters, and activeTexture().“Seven Simple Shaders” is the third book in the series title “Online 3D Media with WebGL”.

We assume the reader understands JavaScript, HTML, and how to texture map a simple mesh with WebGL. The previous two books provide an easy introduction. This book builds on the foundation provided with “WebGL Textures & Vertices: Beginners Guide” and “WebGL Textures: Introduction to Mipmaps, Sub Images & Atlases”. We repeat some of the information regarding 4 x 4 and perspective projection matrices, and continue to use much of the same initialization source code.Each book in the series “Online 3D Media with WebGL”, shares two JavaScript files which initialize WebGL features.

The files “GLControl.js” and “GLEntity.js” upload buffers and textures. This book includes an overview of the initialization sequence, diagrams, and fully commented source code. We recommend readers understand the basics, however perhaps the diagrams, explanation, and source code provide enough information to pick up from here.AdvantagesShaders provide the power behind WebGL.

Shaders execute within the graphics processing unit (GPU). GPUs are hardware designed for rapid manipulation and display of images, 2D and 3D models. Most mobile devices and desktop computers include a GPU. Properly prepared shaders run much faster than similar operations within software.

Shaders represent the key to high speed graphics with WebGL.Wide WebGL Shader SupportEvery major mobile device and desktop operating system now enables WebGL. Fall of 2014 Apple released the first iPhone with WebGL support. Currently WebGL runs on iPhone with iOS 8, Android phones and tablets, Windows PC with Windows 8.1, Windows Phone with Windows 8.1, and Macintosh with OSX Yosemite. Were writing a series of short tutorials to help readers prepare for a potential wave of online media with WebGL.



Enter the sum





Related Archive Books



Related Books


Comments

Comments for "Seven Simple Shaders: WebGL Tutorial (Online 3D Media with WebGL)":


akademiarozwoju.biz.pl

©2014-2015 | DMCA | Contact us