Chapter 11. Custom Shaders and Render Postprocessing

We're getting to the end of the book, and in this chapter, we'll look at the one main feature of Three.js we haven't touched upon: render postprocessing. Besides that, in this chapter, we'll also introduce you to how you can create custom shaders. The main points we'll discuss in this chapter are the following:

  • Setting up Three.js for postprocessing
  • Discussing the basic postprocessing passes provided by Three.js, such as THREE.BloomPass and THREE.FilmPass
  • Applying effects to part of the scene using masks
  • Using THREE.TexturePass to store rendering results
  • Using THREE.ShaderPass to add even more basic postprocessing effects, such as sepia filters, mirror effects, and color adjustments
  • Using THREE.ShaderPass ...

Get Learning Three.js – the JavaScript 3D Library for WebGL - 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.