In this section, you'll learn how to create a custom shader that you can use in postprocessing. We'll create two different shaders. The first one will convert the current image into a grayscale image, and the second one will convert the image into an 8-bit image by reducing the number of colors that are available. Note that creating vertex and fragment shaders is a very broad subject. In this section, we only touch the surface of what can be done by these shaders and how they work. For more in-depth information, you can find the WebGL specification at http://www.khronos.org/webgl/. An additional good resource full of examples is Shadertoy at https://www.shadertoy.com/.
Learning Three.js - the JavaScript 3D Library for WebGL
By :
Learning Three.js - the JavaScript 3D Library for WebGL
By:
Overview of this book
Table of Contents (20 chapters)
Learning Three.js – the JavaScript 3D Library for WebGL Second Edition
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Free Chapter
Creating Your First 3D Scene with Three.js
Basic Components That Make Up a Three.js Scene
Working with the Different Light Sources Available in Three.js
Working with Three.js Materials
Learning to Work with Geometries
Advanced Geometries and Binary Operations
Particles, Sprites, and the Point Cloud
Creating and Loading Advanced Meshes and Geometries
Animations and Moving the Camera
Loading and Working with Textures
Custom Shaders and Render Postprocessing
Adding Physics and Sounds to Your Scene
Index
Customer Reviews