You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Manoylov Andriy eb8d3c5f80 add ukrainian translation 9 months ago
..
README-ch.md Remove trailing whitespaces 7 years ago
README-de.md % find . -type f -print0 | xargs -0 dos2unix 7 years ago
README-es.md Fixed duplicate word on paragraph 21 (chapter 0) 4 years ago
README-fa.md Fix Persian problem chapter 0 to 6 3 years ago
README-fr.md Fix french translations 2 years ago
README-gr.md Chapters 0, 1, 2 Unchecked 1 year ago
README-id.md added bahasa indonesia support 3 years ago
README-it.md Typo circonvoluzione instead of convolution 7 years ago
README-jp.md RaspberryPi to Raspberry Pi 8 years ago
README-kr.md % find . -type f -print0 | xargs -0 dos2unix 7 years ago
README-pl.md fixing 00 - 05 1 year ago
README-pt.md Portuguese version. intro to chapter 4. 5 years ago
README-ru.md Proofread Russian translation. 7 years ago
README-ua.md add ukrainian translation 9 months ago
README-vi.md 🔎 rephrase, fix some typos and add credit to VI translators 3 years ago
README.md add ukrainian translation 9 months ago
TITLE-gr.md Chapters 0, 1, 2 Unchecked 1 year ago
TITLE-pt.md Portuguese version. intro to chapter 4. 5 years ago
TITLE.md adding subnails 8 years ago
cmyk-halftone.frag Remove trailing whitespaces 7 years ago
cmyk-halftone.png % find . -type f -print0 | xargs -0 optipng 7 years ago
gutenpress.jpg % find . -type f -print0 | xargs -0 jpegoptim 7 years ago
halftone.frag Remove trailing whitespaces 7 years ago
halftone.png % find . -type f -print0 | xargs -0 optipng 7 years ago
index.php Remove trailing whitespaces 7 years ago
journey.jpg first coomit 9 years ago
vangogh.jpg % find . -type f -print0 | xargs -0 jpegoptim 7 years ago

README.md

Introduction

The images above were made in different ways. The first one was made by Van Gogh's hand applying layer over layer of paint. It took him hours. The second was produced in seconds by the combination of four matrices of pixels: one for cyan, one for magenta, one for yellow and one for black. The key difference is that the second image is produced in a non-serial way (that means not step-by-step, but all at the same time).

This book is about the revolutionary computational technique, fragment shaders, that is taking digitally generated images to the next level. You can think of it as the equivalent of Gutenberg's press for graphics.

Gutenberg's press

Fragment shaders give you total control over the pixels rendered on the screen at a super fast speed. This is why they're used in all sort of cases, from video filters on cellphones to incredible 3D video games.

Journey by That Game Company

In the following chapters you will discover how incredibly fast and powerful this technique is and how to apply it to your professional and personal work.

Who is this book for?

This book is written for creative coders, game developers and engineers who have coding experience, a basic knowledge of linear algebra and trigonometry, and who want to take their work to an exciting new level of graphical quality. (If you want to learn how to code, I highly recommend you start with Processing and come back later when you are comfortable with it.)

This book will teach you how to use and integrate shaders into your projects, improving their performance and graphical quality. Because GLSL (OpenGL Shading Language) shaders compile and run on a variety of platforms, you will be able to apply what you learn here to any environment that uses OpenGL, OpenGL ES or WebGL. In other words, you will be able to apply and use your knowledge with Processing sketches, openFrameworks applications, Cinder interactive installations, Three.js websites or iOS/Android games.

What does this book cover?

This book will focus on the use of GLSL pixel shaders. First we'll define what shaders are; then we'll learn how to make procedural shapes, patterns, textures and animations with them. You'll learn the foundations of shading language and apply it to more useful scenarios such as: image processing (image operations, matrix convolutions, blurs, color filters, lookup tables and other effects) and simulations (Conway's game of life, Gray-Scott's reaction-diffusion, water ripples, watercolor effects, Voronoi cells, etc.). Towards the end of the book we'll see a set of advanced techniques based on Ray Marching.

There are interactive examples for you to play with in every chapter. When you change the code, you will see the changes immediately. The concepts can be abstract and confusing, so the interactive examples are essential to helping you learn the material. The faster you put the concepts into motion the easier the learning process will be.

What this book doesn't cover:

What do you need to start?

Not much! If you have a modern browser that can do WebGL (like Chrome, Firefox or Safari) and a internet connection, click the “Next” Chapter button at the end of this page to get started.

Alternatively, based on what you have or what you need from this book you can: