CHAPTER 10

image

Effects, Tips, and Tricks

In this chapter, we will introduce a variety of WebGL effects, tips, and tricks such as these:

  • Basic image processing
  • Image processing using convolution filters
  • Antialiasing
  • Nonphotorealistic shaders
  • Framebuffers and renderbuffers
  • Picking objects from the canvas
  • Shadow map implementation

Effects

A wide variety of effects can be achieved through image-processing and convolution filters such as sharpening, blurring, grayscale, sepia tone, color adjustments, and edge detection.

To apply these effects, we will start by loading a texture image. Then we will alter the raw color values at each pixel in the texture ...

Get Beginning WebGL for HTML5 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.