Time for Action: Post-Process Effects

Let's see a few post-processing effects in action:

  1. Open the ch10_01_post-process.html file in your browser, like so:
  1. The controls dropdown allows you to switch between different sample effects. Try them out to get a feel for the effects they have on the scene. We've already looked at grayscale, so let's examine the rest of the filters individually.
  2. The invert effect, similar to grayscale in that it only modifies the color output, inverts each color channel:
#version 300 esprecision mediump float;uniform sampler2D uSampler;in vec2 vTextureCoords;out vec4 fragColor;void main(void) { vec4 frameColor ...

Get Real-Time 3D Graphics with WebGL 2 - Second Edition 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.