Skip to content

Commit

Permalink
adding subnails
Browse files Browse the repository at this point in the history
  • Loading branch information
patriciogonzalezvivo committed Apr 23, 2016
1 parent ddba374 commit ce98876
Show file tree
Hide file tree
Showing 180 changed files with 93 additions and 6,512 deletions.
1 change: 1 addition & 0 deletions 00/TITLE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Introduction
Binary file modified 00/cmyk-halftone.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 00/halftone.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions 01/TITLE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Getting started
## What is a fragment shader?
File renamed without changes.
6 changes: 1 addition & 5 deletions 02/examples.md → 02/SUMMARY.md
Original file line number Diff line number Diff line change
@@ -1,5 +1 @@
## "Hello World!"

Usually the "Hello world!" example is the first step to learning a new language. In GPU-land rendering text is an overcomplicated task for a first step, instead we'll choose a bright welcoming color to shout our enthusiasm!

Read ["Hello World!"](/02/) to learn more.
Usually the "Hello world!" example is the first step to learning a new language. In GPU-land rendering text is an overcomplicated task for a first step, instead we'll choose a bright welcoming color to shout our enthusiasm!
1 change: 1 addition & 0 deletions 02/TITLE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
## Hello World
File renamed without changes.
4 changes: 0 additions & 4 deletions 03/examples.md → 03/SUMMARY.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
## Uniforms

Learn how to use Uniform variables. Uniform variables, or simply *uniforms* are the variables that carry information equally accessible from all of the threads of your shader. The [GSLS editor](http://editor.thebookofshaders.com/) has three uniforms set up for you.

Read [Uniforms](/03/) to learn more.

```glsl
uniform vec2 u_resolution; // Canvas size (width,height)
uniform vec2 u_mouse; // mouse position in screen pixels
Expand Down
1 change: 1 addition & 0 deletions 03/TITLE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
## Uniforms
1 change: 1 addition & 0 deletions 03/featured_examples.php
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<div class="glslGallery" data="160319050916"></div>
File renamed without changes.
1 change: 1 addition & 0 deletions 04/TITLE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
## Running your shader
4 changes: 0 additions & 4 deletions 05/examples.md → 05/SUMMARY.md
Original file line number Diff line number Diff line change
@@ -1,5 +1 @@
## Shaping functions

Shaping functions is fundamental technique that is recursively used throughout this book that let you control the variation of the value at will. Study how different functions of x are used to create different shapes and try making your own function.

Read [Shaping functions](/05/) to learn more.
2 changes: 2 additions & 0 deletions 05/TITLE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Algorithmic drawing
## Shaping functions
Binary file added 05/cubicpulse.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 05/easing.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 05/expstep.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions 05/featured_examples.php
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<div class="glslGallery" data="160414041542,160414041933,160414041756"></div>
Binary file added 05/impulse.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
Binary file added 05/parabola.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 05/pcurve.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 0 additions & 4 deletions 06/examples.md → 06/SUMMARY.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,2 @@
## Colors

Familiarize yourself with how to express colors in shaders. The examples cover how to mix colors and beautifully animate them over time as well as conversion between two different models(RGB and HSB).
In GLSL, colors are simply just vectors, which means you can easily apply the concepts and techniques you learn here to other

Read [Colors](/06/) to learn more.
1 change: 1 addition & 0 deletions 06/TITLE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
## Colors
Binary file added 06/easing.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified 06/mix.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
4 changes: 0 additions & 4 deletions 07/examples.md → 07/SUMMARY.md
Original file line number Diff line number Diff line change
@@ -1,5 +1 @@
## Shapes

Let's look at how to draw simple shapes in a parallel procedural way. In a nutshell, all you need to do is to determine if each pixel belongs to the shape you want to draw or not, and apply different colors accordingly. You can use coordinate system like a grid paper to draw rectangles and squares. We'll look at more advanced concept called distance field to draw more complex shapes.

Read [Shapes](/07/) to learn more.
1 change: 1 addition & 0 deletions 07/TITLE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
## Shapes
Binary file added 07/arrow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 07/batman.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 07/cross.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions 07/featured_examples.php
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<div class="glslGallery" data="160414041142,160414040957,160414040804"></div>
Binary file added 07/line.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 07/rect.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 07/triangle-making.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 07/triangle.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 0 additions & 4 deletions 08/examples.md → 08/SUMMARY.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,2 @@
## Matrix

Matrix is a very powerful tool for manipulating vectors. By mastering how to use matrices, you can freely translate, scale and rotate shapes. Since the technique can be equally applied to anything expressed by vectors, we will look at many more advanced use of matrices later in this book.
Matrices may look complex at a first glance, but you'll find it very handy and useful as you get used to the concept. Let's practice here and learn basics with simple examples.

Read [Matrix](/08/) to learn more.
1 change: 1 addition & 0 deletions 08/TITLE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
## 2D Matrices
Empty file removed 08/TODO.md
Empty file.
Binary file added 08/cross-animated.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified 08/cross-rotate.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified 08/cross-scale.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 08/cross.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 08/matrices.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified 08/matrix.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 0 additions & 4 deletions 09/examples.md → 09/SUMMARY.md
Original file line number Diff line number Diff line change
@@ -1,5 +1 @@
## Patterns

Repetitive patterns are perfect theme for computational sketching. Different from conventional way of drawing, shaders lets you draw everything parallelly at once. Instead of repeating the same procedure many times, you will wrap and repeat the "space". Sounds like Sci-Fi? Let's find out what it really means.

Read [Patterns](/09/) to learn more.
1 change: 1 addition & 0 deletions 09/TITLE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
## Patterns
Empty file removed 09/TODO.md
Empty file.
Binary file added 09/cross.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 09/deco.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 09/dots.png
Binary file added 09/dots1.png
Binary file added 09/dots2.png
Binary file added 09/dots3.png
Binary file added 09/dots4.png
Binary file added 09/dots5.png
Binary file added 09/grid-side.png
Binary file added 09/grid.png
Binary file added 09/lines-wave.png
Binary file added 09/lines.png
Binary file added 09/mirrortiles.png
Binary file added 09/nuts.png
Binary file added 09/rays.png
Binary file added 09/rotatedtiles.png
Binary file added 09/zigzag.png
Binary file added 10/1d-random.png
Binary file added 10/2d-random-dots.png
4 changes: 0 additions & 4 deletions 10/examples.md → 10/SUMMARY.md
Original file line number Diff line number Diff line change
@@ -1,5 +1 @@
## Random

Life is boring if everything was predictable. Though nothing is truly random in computers, we can create pseudo-randomness that looks totally unpredictable using simple tricks to create more interesting patterns and behaviors.

Read [Random](/10/) to learn more.
1 change: 1 addition & 0 deletions 10/TITLE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Generative designs
Empty file removed 10/TODO.md
Empty file.
Binary file added 10/digits.png
Binary file added 10/iching-02.png
Binary file modified 10/ikeda-00.png
Binary file added 10/ikeda-01.png
Binary file added 10/ikeda-02.png
Binary file modified 10/ikeda-03.png
Binary file added 10/ikeda-digits.png
Binary file added 10/ikeda-numered-grid.png
Binary file added 10/ikeda-simple-grid.png
Binary file added 10/matrix.png
Binary file added 11/1d-noise.png
Binary file added 11/2d-gnoise.png
Binary file added 11/2d-pnoise.png
Binary file added 11/2d-snoise-clear.png
Binary file added 11/2d-snoise.png
Binary file added 11/3d-noise.png
Binary file added 11/3d-pnoise.png
Binary file added 11/3d-snoise.png
4 changes: 0 additions & 4 deletions 11/examples.md → 11/SUMMARY.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,2 @@
## Noise

How can we create more natural looking textures like surface of the roads, rocks, trees and clouds? Noise function is the answer.
Since Ken Perlin invented his first noise algorithm in 80s, the technique has been extensively used throughout computer graphics and simulations. Even if you have never heard of the name, it's not possible you have never seen it. Let's look step by step at how the function is built and works. We also cover more efficient version of the algorithm called simplex noise.

Read [Noise](/11/) to learn more.
1 change: 1 addition & 0 deletions 11/TITLE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
## Noise
Empty file removed 11/TODO.md
Empty file.
Binary file modified 11/circleWave-noise.png
Binary file modified 11/iching-03.png
Binary file modified 11/lava-lamp.png
Binary file added 11/splatter.png
Binary file added 11/wood.png
Binary file added 12/1d-fbm.png
Binary file modified 12/2d-fbm.png
File renamed without changes.
Empty file removed 12/TODO.md
Empty file.
Binary file modified 12/clouds.png
Binary file added 12/noise.png
Binary file added 12/ridge.png
Binary file added 12/turbulence.png
File renamed without changes.
Binary file added 13/fractal-tile.png
File renamed without changes.
Empty file removed 14/TODO.md
Empty file.
Binary file added 14/texture-kaleidoscope.png
Binary file added 14/texture-stereo.png
Empty file removed 15/TODO.md
Empty file.
Binary file added 15/add.png
Binary file modified 15/blend.png
Binary file added 15/diff.png
Binary file added 15/div.png
Binary file modified 15/inv.png
Binary file added 15/mult.png
Binary file modified 15/operations.png
Binary file added 15/sub.png
Empty file removed 16/TODO.md
Empty file.
Empty file removed 17/TODO.md
Empty file.
Binary file added 17/grain.png
Binary file modified 17/hatch.png
Binary file added 17/lut-plain.png
Binary file added 17/lut.png
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<canvas id="custom" class="canvas" data-fragment-url="examples/moon.frag" data-textures="examples/images/moon-texture.jpg" width="350px" height="350px"></canvas>
<canvas id="custom" class="canvas" data-fragment-url="src/moon/moon.frag" data-textures="src/moon/moon.jpg" width="350px" height="350px"></canvas>

# The Book of Shaders
*by [Patricio Gonzalez Vivo](http://patriciogonzalezvivo.com/)*
Expand Down
34 changes: 0 additions & 34 deletions examples/05/draw-multi-shaping-func.frag

This file was deleted.

39 changes: 0 additions & 39 deletions examples/05/randj063.frag

This file was deleted.

33 changes: 0 additions & 33 deletions examples/05/stepwise.frag

This file was deleted.

32 changes: 0 additions & 32 deletions examples/06/behrn916-light.frag

This file was deleted.

46 changes: 0 additions & 46 deletions examples/06/dothh489-sunset.frag

This file was deleted.

46 changes: 0 additions & 46 deletions examples/06/dothh489-villareal.frag

This file was deleted.

51 changes: 0 additions & 51 deletions examples/06/henrt555-turner.frag

This file was deleted.

Loading

0 comments on commit ce98876

Please sign in to comment.